This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixes shaders from GLideN64-Scene-Ripper for OBJ/etc export. | |
# Instructions: select objects you want to fix, then run this | |
# script from the Text editor. | |
# Tested with Blender 3.6. | |
import bpy | |
# Whether to connect the diffuse texture's alpha to the | |
# Principled Alpha socket in the simplified material. | |
CONNECT_ALPHA = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import array | |
import struct | |
from . import hxapy_header as hxa | |
# *** Read functions | |
def read_u8(f): | |
return f.read(1)[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
#### SETUP MESH AND MATERIALS | |
# Create mesh | |
bpy.ops.mesh.primitive_cube_add() | |
ob = bpy.context.object | |
# Create materials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/a/568618 | |
def gen_primes(): | |
D = {} | |
q = 2 | |
while True: | |
if q not in D: | |
yield q | |
D[q * q] = [q] | |
else: | |
for p in D[q]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Model Checker</title> | |
<style type="text/css"> | |
body { | |
font-family: Arial,Verdana,sans-serif; | |
} | |
.filebox { | |
font-size: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy import * | |
# glTF equation taken from Appendix C of the spec | |
# When time = t_cur, the value of the curve is p | |
v_k, v_kp1, t_k, t_kp1, b_k, a_kp1, t_cur = symbols('v_k v_kp1 t_k t_kp1 b_k a_kp1 t_cur') | |
t = (t_cur - t_k) / (t_kp1 - t_k) | |
p0 = v_k | |
m0 = (t_kp1 - t_k) * b_k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Splits apicula's .daes into multiple .daes with one animation each. | |
# Original script by Inferry: <https://www.vg-resource.com/thread-30547-post-634261.html#pid634261> | |
import sys, os, copy | |
import xml.etree.ElementTree as ET | |
ET.register_namespace('', "http://www.collada.org/2005/11/COLLADASchema") | |
def main(path): | |
tree = ET.parse(path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Use ndstool to dump the FS off an NDS ROM, then use apicula to recursively | |
# search all files for models, etc. | |
import sys, os, subprocess, random, shutil | |
# !!! IMPORTANT !!! | |
# Change these to the paths to ndstool and apicula on your system. | |
NDSTOOL_CMD = 'ndstool' | |
APICULA_CMD = 'apicula' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate crossbeam; | |
extern crate reqwest; | |
extern crate serde; | |
extern crate serde_json; | |
use crossbeam::atomic::AtomicCell; | |
use crossbeam::thread::scope; | |
use reqwest::Client; | |
use serde::Deserialize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notes on how IQM 2 animations work: | |
(see http://sauerbraten.org/iqm/iqm.txt) | |
There is just one global animation strip for the whole file. Each iqmanim is | |
defined by picking out one subrange of frames from this global strip. | |
Every joint has one iqmpose. Every iqmpose has ten channels for the ten TRS | |
properties (Tx Ty Tz Qx Qy Qz Qw Sx Sy Sz). Every channel maps a frame | |
number to the value of that TRS property at that frame. A channel can be | |
either constant or variable. |
NewerOlder