import bpy,json,os from mathutils import Matrix,Vector O=os.path.dirname(__file__);s=bpy.context.scene chapters=json.load(open(O+'/tour-chapters-container-water.json'));fonts=[o for o in bpy.data.collections['22 PLAY - guided camera tour'].objects if o.type=='FONT'];issues=[] for c in chapters: s.frame_set(c['start']+30);shown=[o.data.body for o in fonts if o.scale.length>.5] if shown!=[c['title']]:issues.append([c['title'],shown]) names=[o.name for o in s.objects] report={'internal_tanks':sum(n.startswith('INTERNAL RAINWATER TANK') for n in names),'old_exposed_tanks_removed':not any(n.startswith('2000 mm dark green poly rainwater tank') for n in names),'container':all(n in names for n in ['CONTAINER WATER - steel base frame','Container corrugated north steel wall','CONTAINER - west inspection cutaway']),'tour_chapters':len(chapters),'caption_issues':issues,'render_size':[s.render.resolution_x,s.render.resolution_y,s.render.resolution_percentage],'kitchen_preserved':'ISLAND - honed marble countertop' in names,'no_table_tennis':not any('table tennis' in n.lower() for n in names)} assert report['internal_tanks']==2 and report['old_exposed_tanks_removed'] and report['container'] and not issues and report['kitchen_preserved'] and report['no_table_tennis'] assert report['render_size']==[2560,1440,100] and s.frame_end==3600 # Internal tank bounding boxes fit within the structural enclosure. for o in s.objects: if o.name.startswith('INTERNAL RAINWATER TANK'): m=Matrix.LocRotScale(o.location,o.rotation_euler.to_quaternion(),o.scale) for b in o.bound_box: v=m@Vector(b);assert -27.98