import bpy, os, sys, math from mathutils import Vector HERE = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(HERE)), "build")) import dra_preview as P sf = bpy.data.scenes["DoorArm | Ship fit"] P.setup(sf, 800) sf.frame_set(1) cd = bpy.data.cameras.new("cc"); cam = bpy.data.objects.new("cc", cd); sf.collection.objects.link(cam); sf.camera = cam cd.lens = 85; cd.clip_start = 0.01 for nm in ("DoorArm_AFT | door fixture A", "DoorArm_AFT | door fixture B"): ob = bpy.data.objects[nm] for o in sf.objects: if o.name.startswith("DoorArm_AFT | door fixture"): o.hide_render = (o.name != nm) for o in sf.objects: if not o.name.startswith("DoorArm_AFT | door fixture") and o.type == "MESH": o.hide_render = True c = ob.location.copy() n = Vector((0, 0.9089, 0.4171)) tgt = c + n * 0.10 cam.location = tgt + n * 0.8 + Vector((0.45, 0, 0.25)) P.look(cam, tgt) sf.render.filepath = os.path.join(HERE, "crit1_fixture_%s.png" % nm[-1]) bpy.ops.render.render(write_still=True, scene=sf.name) print("[crit1] fixture", nm, flush=True)