20 lines
2.0 KiB
Python
20 lines
2.0 KiB
Python
import bpy,json,os
|
|
s=bpy.context.scene;out=os.path.dirname(__file__)
|
|
chapters=json.load(open(out+'/tour-chapters-daily-life.json'))
|
|
fonts=[o for o in bpy.data.collections['22 PLAY - guided camera tour'].objects if o.type=='FONT']
|
|
issues=[];captions=[]
|
|
for c in chapters:
|
|
frame=c.get('start',c.get('start_frame',1))+30;s.frame_set(frame);bpy.context.view_layer.update()
|
|
shown=[o.data.body for o in fonts if o.scale.length>.5]
|
|
captions.append({'frame':frame,'titles':shown})
|
|
if len(shown)!=1:issues.append({'frame':frame,'titles':shown})
|
|
required=['OVEN - insulated glass door','INDUCTION - four zone glass cooktop','ISLAND - honed marble countertop','COPPER STOCKPOT','COPPER SAUCEPAN','COPPER FRYING PAN','PULL UP BAR - dedicated steel frame','OUTDOOR TABLE - ten place timber top','SHADED WALKING LOOP - garden and quiet room','HARVEST BENCH - garden sorting surface','PANTRY - tall timber cabinet','FREEZER - compact upright']
|
|
missing=[n for n in required if n not in bpy.data.objects]
|
|
report={'chapters':len(chapters),'end_frame':s.frame_end,'fps':s.render.fps,'missing':missing,'caption_issues':issues,'caption_samples':captions,'render_engine':s.render.engine,'render_size':[s.render.resolution_x,s.render.resolution_y],'detail_render_enabled':not bpy.data.collections['DETAIL - full geometry for renders'].hide_render,'fast_excluded_from_render':bpy.data.collections['00 FAST TOUR - lightweight viewport'].hide_render,'training_steps':sum(o.name.startswith('Training access step') for o in s.objects),'play_steps':sum(o.name.startswith('Play deck access step') for o in s.objects)}
|
|
json.dump(report,open(out+'/daily-life-verification.json','w'),indent=2)
|
|
assert not missing and not issues,report
|
|
assert report['chapters']==30 and s.frame_end==3600 and s.render.fps==24
|
|
assert report['detail_render_enabled'] and report['fast_excluded_from_render']
|
|
assert report['training_steps']==3 and report['play_steps']==3
|
|
print('VERIFIED '+json.dumps({k:v for k,v in report.items() if k!='caption_samples'}),flush=True)
|