Add property wind turbine concept and update project gallery
This commit is contained in:
42
source/samford-v009-wind/verify_wind_turbine.py
Normal file
42
source/samford-v009-wind/verify_wind_turbine.py
Normal file
@@ -0,0 +1,42 @@
|
||||
"""Reopen either saved v009 scene and validate geometry, preservation and tour."""
|
||||
import bpy
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
s = bpy.context.scene
|
||||
detail = bpy.data.collections['DETAIL - full geometry for renders']
|
||||
detail.hide_viewport = False
|
||||
bpy.context.view_layer.update()
|
||||
objects = bpy.data.collections['39 WIND - property turbine concept'].objects
|
||||
assert len([o for o in objects if o.name.startswith('WIND - rotor blade')]) == 3
|
||||
mast = bpy.data.objects['WIND - tapered freestanding mast']
|
||||
assert abs(mast.location.x + 36) < .001 and abs(mast.location.y - 40) < .001
|
||||
assert abs(mast.dimensions.z - 17.75) < .001
|
||||
assert all('FAST | '+o.name in bpy.data.objects for o in objects)
|
||||
assert all(bpy.data.objects['FAST | '+o.name].hide_render for o in objects)
|
||||
assert len(bpy.data.collections['24 LATER - Shadow spaces only'].objects) == 26
|
||||
required = ['ISLAND - honed marble countertop', 'FAST | Garden Buddha statue',
|
||||
'CONTAINER WATER - steel base frame', 'Living woven jute rug',
|
||||
'Fuller garden borders - curved lanceolate leaves']
|
||||
assert all(name in bpy.data.objects for name in required)
|
||||
assert not any('table tennis' in o.name.lower() for o in s.objects)
|
||||
assert all(m in bpy.data.materials.values() for o in s.objects if o.type=='MESH' for m in o.data.materials if m)
|
||||
fonts = [o for o in bpy.data.collections['22 PLAY - guided camera tour'].objects if o.type=='FONT']
|
||||
captions = []
|
||||
for frame in range(1,3841,120):
|
||||
s.frame_set(frame+20)
|
||||
visible = [o.data.body for o in fonts if o.scale.length > .5]
|
||||
assert len(visible)==1, (frame,visible)
|
||||
captions.extend(visible)
|
||||
assert captions[-1].startswith('32 / WIND') and captions[-2].startswith('31 /')
|
||||
assert s.frame_end == 3840
|
||||
assert s.camera.name == 'PLAY TOUR camera'
|
||||
report = dict(status='PASS', model=Path(bpy.data.filepath).name,
|
||||
turbine_objects=len(objects), rotor_blades=3, hub_height_m=18,
|
||||
rotor_diameter_m=6, concept_xy=[-36,40], tour_chapters=32,
|
||||
tour_seconds=160, captions=captions, preserved_features=required,
|
||||
future_outline_objects=26, material_references_valid=True,
|
||||
dimensions_status='Illustrative placeholders, not engineered')
|
||||
target = Path(bpy.data.filepath).with_suffix('.verification.json')
|
||||
target.write_text(json.dumps(report,indent=2)+'\n')
|
||||
print('WIND_VERIFIED',target,flush=True)
|
||||
Reference in New Issue
Block a user