feat: retire the gantry and billboard districts and light the rest as steel
This commit is contained in:
@@ -13,16 +13,21 @@ here = Path(__file__).resolve().parent
|
||||
root = here.parents[2]
|
||||
scene = bpy.data.scenes['Roadside Districts']
|
||||
output = root / 'src/assets/nightdrive-districts.glb'
|
||||
# Retired in round 6: the overhead gantry and the sign truss now own the road,
|
||||
# and the billboards' light strips read as garbled text. They stay authored in
|
||||
# the .blend but are no longer exported.
|
||||
RETIRED = {'gantry', 'billboard'}
|
||||
exported = [o for o in scene.objects if o.name.rsplit('_', 1)[0] not in RETIRED]
|
||||
|
||||
for obj in scene.objects:
|
||||
obj.select_set(True)
|
||||
obj.select_set(obj in exported)
|
||||
bpy.ops.export_scene.gltf(
|
||||
filepath=str(output), export_format='GLB', use_selection=True, use_active_scene=True,
|
||||
export_apply=True, export_normals=False, export_texcoords=False, export_materials='NONE',
|
||||
export_animations=False, export_cameras=False, export_lights=False, export_yup=True,
|
||||
)
|
||||
triangles = 0
|
||||
for obj in scene.objects:
|
||||
for obj in exported:
|
||||
obj.data.calc_loop_triangles()
|
||||
triangles += len(obj.data.loop_triangles)
|
||||
provenance = {
|
||||
@@ -30,7 +35,8 @@ provenance = {
|
||||
'source': 'nightdrive-districts.blend',
|
||||
'authorship': 'Original procedural modelling in Blender for this portfolio (author-districts.py); no external assets.',
|
||||
'editable_scene': 'Roadside Districts',
|
||||
'pieces': sorted({o.name.rsplit('_', 1)[0] for o in scene.objects}),
|
||||
'pieces': sorted({o.name.rsplit('_', 1)[0] for o in exported}),
|
||||
'retired': sorted(RETIRED),
|
||||
'triangles': triangles,
|
||||
'attributes': 'POSITION + indices; flat normals derived at runtime',
|
||||
'export': '../../../src/assets/nightdrive-districts.glb',
|
||||
|
||||
Reference in New Issue
Block a user