3d8825f5a9
REGISTRY rewritten around the central rule: a character folder is born only when a body ships to ariki-game (<character>_base_v<NN> = ship ordinal). lena_nude dissolves accordingly: - characters/female/lena_base_v01/ — SHIPPED 2026-08-10: AccuRig GLB carrier, T-pose/rig FBX + JSON, previews, frozen README - characters/work/lena/ — the live lane: recipes 01-47 (incl. new 36-47: refill/sheets/clay/despeckle/musculature/spin/AccuRig export/graft/pose QC), masters (athletic_v04 blend + textures, accurig blend), lane-history README - hires_claude/hires_work intermediates (blends, logs, probes) pruned Supporting docs: AGENTS.md, working-files rule, rig-graft plan addendum, originals README, prune_lane.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36 lines
1.5 KiB
Python
36 lines
1.5 KiB
Python
# Stage 44: save a blend that ALREADY contains the turntable, so viewing her needs no scripting.
|
|
#
|
|
# blender --background --python 44_make_spin_blend.py -- <in.blend> <out.blend> [seconds_per_turn]
|
|
#
|
|
# 43_spin.py has to run inside a live GUI session, and a GUI Blender launched from this agent gets
|
|
# reaped when the launching command finishes. Baking the animation into the file instead means it
|
|
# survives: open the file, press spacebar.
|
|
import bpy, sys, math
|
|
|
|
argv = sys.argv[sys.argv.index("--") + 1:]
|
|
SRC, OUT = argv[0], argv[1]
|
|
SEC = float(argv[2]) if len(argv) > 2 else 50.0
|
|
FPS = 24
|
|
|
|
bpy.ops.wm.open_mainfile(filepath=SRC)
|
|
ob = max([o for o in bpy.data.objects if o.type == 'MESH'], key=lambda o: len(o.data.vertices))
|
|
scn = bpy.context.scene
|
|
scn.render.fps = FPS
|
|
scn.sync_mode = 'FRAME_DROP' # honour real time, or playback is a blur
|
|
n = int(round(SEC * FPS))
|
|
scn.frame_start = 1
|
|
scn.frame_end = n # frame n+1 repeats frame 1, so the loop is seamless
|
|
scn.frame_set(1)
|
|
|
|
bpy.context.preferences.edit.keyframe_new_interpolation_type = 'LINEAR'
|
|
ob.animation_data_clear()
|
|
ob.rotation_mode = 'XYZ'
|
|
ob.rotation_euler = (0.0, 0.0, 0.0)
|
|
ob.keyframe_insert("rotation_euler", index=2, frame=1)
|
|
ob.rotation_euler = (0.0, 0.0, 2.0 * math.pi)
|
|
ob.keyframe_insert("rotation_euler", index=2, frame=n + 1)
|
|
ob.rotation_euler = (0.0, 0.0, 0.0)
|
|
|
|
bpy.ops.wm.save_as_mainfile(filepath=OUT)
|
|
print(f"SPINBLEND_DONE {n} frames @ {FPS}fps = {SEC:.0f}s per turn -> {OUT}")
|