Preserve homestead context and garden-centred Blender design
This commit is contained in:
6
source/samford-spacious-tour/inspect_scene.py
Normal file
6
source/samford-spacious-tour/inspect_scene.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import bpy,json
|
||||
from mathutils import Vector
|
||||
def center(o): return o.matrix_world@(sum((Vector(v) for v in o.bound_box),Vector())/8)
|
||||
report={c.name:[{'name':o.name,'center':[round(v,2) for v in center(o)],'location':[round(v,2) for v in o.location],'dimensions':[round(v,2) for v in o.dimensions]} for o in c.objects if o.type in ['MESH','CAMERA','LIGHT','FONT']] for c in bpy.data.collections}
|
||||
json.dump(report,open('/tmp/samford-scene-inventory.json','w'),indent=2)
|
||||
print({c.name:len(c.objects) for c in bpy.data.collections})
|
||||
Reference in New Issue
Block a user