model/blend: material inputs traced through reroutes, mix, colour adjustments, colour ramps and node groups; unresolved links flagged with neutral values; roughness / metallic image textures with their channel; vertex colours; bump; UDIM images with the <UDIM> token and their tiles
This commit is contained in:
1 parent
8fd5a4c3f2
commit
3a56a66ac1
13 files changed
+1781
-531
No files matched your search
@@ -7,7 +7,7 @@
|
||||
# old demos (fetched, never committed; 32-bit pointers, big-endian SGI / PowerPC files among them), with references
|
||||
# from Blender 4.1 (5.0 dropped big-endian files).
|
||||
# tests/gen/blend_<ver>.luau { { name, data, ref } } (<ver>: 279, 293, 35, 41, cur, old)
|
||||
# tests/gen/blend_files.luau sibling files the scenes refer to ({ ["outside.png"] = bytes })
|
||||
# tests/gen/blend_files.luau sibling files the scenes refer to ({ ["outside.png"] = bytes, UDIM tiles })
|
||||
import json, os, shutil, subprocess, tempfile
|
||||
|
||||
INPUTS = ["tools/fixtures/_blend_make.py", "tools/fixtures/_blend_ref.py"]
|
||||
@@ -118,6 +118,7 @@ def generate(ctx):
|
||||
if not ok:
|
||||
raise RuntimeError("blend: the reference Blender failed: " + log[-2000:])
|
||||
sibling = None
|
||||
tiles = {}
|
||||
for tag, (out, files) in made.items():
|
||||
cases = []
|
||||
for f in files:
|
||||
@@ -132,10 +133,15 @@ def generate(ctx):
|
||||
ctx.emit("blend_" + name, cases)
|
||||
if sibling is None and os.path.exists(os.path.join(out, "outside.png")):
|
||||
sibling = open(os.path.join(out, "outside.png"), "rb").read()
|
||||
for tile in ("udim.1001.png", "udim.1002.png"):
|
||||
if tile not in tiles and os.path.exists(os.path.join(out, tile)):
|
||||
tiles[tile] = open(os.path.join(out, tile), "rb").read()
|
||||
for tag, _ in OLD + [("cur", None)]:
|
||||
if tag not in made:
|
||||
ctx.emit("blend_" + tag, [])
|
||||
ctx.emit("blend_old", old_samples(ctx, tmp))
|
||||
ctx.emit("blend_files", {"outside.png": sibling or b""})
|
||||
files = {"outside.png": sibling or b""}
|
||||
files.update(tiles)
|
||||
ctx.emit("blend_files", files)
|
||||
ctx.emit("blend_versions", sorted(made.keys()))
|
||||
shutil.rmtree(tmp, ignore_errors=True)
|
||||
Reference in new issue
Block a user