3ba86b2ea8
Bulk import of the working lanes that were living untracked on the PC. Content: - characters/ Lena/male body lanes, bakes, texture work, run logs - clothing/ garment pipeline, configs, gates, contract docs - garments/ MD-authored garment sources (.zprj/.zpac) - UAL-Lib/ Universal Animation Library 2 source (.blend/.fbx/.glb) - tools/ blender_bridge, iclone_bridge, md_bridge, tailor, glm_agent - docs/, plans/, dev/, .agents/plans/ Repo hygiene: - .gitattributes: LFS now covers .blend, .zprj, .zpac, .obj, .npy and the Reallusion .iAvatar/.ccAvatar/.ccRestore containers. Without this the ~3.8 GB in this commit would land as raw blobs. .png/.jpg are left out on purpose — ~250 are already tracked raw and converting them would rewrite every one without shrinking history. - .gitignore: exclude /accurig/ (~1 GB AccuRig program files, redistributable from Reallusion, nothing authored here) and /dev/null/ (git-lfs hook copies dropped by a `>/dev/null` redirect on Windows). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
import bpy, sys
|
|
import numpy as np
|
|
argv = sys.argv[sys.argv.index("--") + 1:]
|
|
bpy.ops.wm.open_mainfile(filepath=argv[0])
|
|
ob = max([o for o in bpy.data.objects if o.type=='MESH'], key=lambda o: len(o.data.vertices))
|
|
me = ob.data
|
|
act = np.load(argv[1])["active"]
|
|
lay = me.color_attributes.new(name="dbg", type='FLOAT_COLOR', domain='POINT')
|
|
n = len(me.vertices)
|
|
cols = np.zeros((n, 4), dtype=np.float32)
|
|
cols[:, 3] = 1.0
|
|
cols[act, 0] = 1.0 # red = replaced
|
|
cols[~act, 1] = 0.6 # green = untouched
|
|
lay.data.foreach_set("color", cols.reshape(-1))
|
|
mat = bpy.data.materials.new("dbg")
|
|
mat.use_nodes = True
|
|
nt = mat.node_tree
|
|
vc = nt.nodes.new("ShaderNodeVertexColor")
|
|
vc.layer_name = "dbg"
|
|
bsdf = next(x for x in nt.nodes if x.type == 'BSDF_PRINCIPLED')
|
|
nt.links.new(vc.outputs["Color"], bsdf.inputs["Base Color"])
|
|
me.materials.clear()
|
|
me.materials.append(mat)
|
|
import math
|
|
from mathutils import Vector
|
|
scn = bpy.context.scene
|
|
w = bpy.data.worlds.new("W"); w.color=(0.2,0.2,0.2); scn.world = w
|
|
sun = bpy.data.objects.new("S", bpy.data.lights.new("S",'SUN'))
|
|
sun.data.energy = 3; sun.data.use_shadow = False
|
|
sun.rotation_euler = (math.radians(60),0,math.radians(75))
|
|
bpy.context.collection.objects.link(sun)
|
|
cam = bpy.data.objects.new("C", bpy.data.cameras.new("C"))
|
|
cam.data.lens = 85
|
|
bpy.context.collection.objects.link(cam)
|
|
scn.camera = cam
|
|
scn.render.engine = 'BLENDER_EEVEE'
|
|
scn.render.resolution_x = scn.render.resolution_y = 1000
|
|
ctr = Vector((0,0,0.675))
|
|
yaw = math.radians(40)
|
|
cam.location = ctr + Vector((math.sin(yaw)*0.66, -math.cos(yaw)*0.66, 0.02))
|
|
cam.rotation_euler = (ctr - cam.location).to_track_quat('-Z','Y').to_euler()
|
|
scn.render.filepath = argv[2]
|
|
bpy.ops.render.render(write_still=True)
|
|
print("DBG_OK")
|