def __gather_gltf(exporter, export_settings): export_settings['bounding_box_max_x'] = 0 export_settings['bounding_box_max_y'] = 0 export_settings['bounding_box_max_z'] = 0 export_settings['bounding_box_min_x'] = 0 export_settings['bounding_box_min_y'] = 0 export_settings['bounding_box_min_z'] = 0 active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2( export_settings) print(f'gather_gltf2 complete') plan = { 'active_scene_idx': active_scene_idx, 'scenes': scenes, 'animations': animations } export_user_extensions('gather_gltf_hook', export_settings, plan) active_scene_idx, scenes, animations = plan['active_scene_idx'], plan[ 'scenes'], plan['animations'] if export_settings['gltf_draco_mesh_compression']: gltf2_io_draco_compression_extension.compress_scene_primitives( scenes, export_settings) exporter.add_draco_extension() for idx, scene in enumerate(scenes): exporter.add_scene(scene, idx == active_scene_idx) for animation in animations: exporter.add_animation(animation) exporter.add_original_extensions(bpy.context.scene['extensionsRequired'], bpy.context.scene['extensionsUsed']) bounding_box_max = [ export_settings['bounding_box_max_x'], export_settings['bounding_box_max_y'], export_settings['bounding_box_max_z'], ] bounding_box_min = [ export_settings['bounding_box_min_x'], export_settings['bounding_box_min_y'], export_settings['bounding_box_min_z'], ] extensions = { "ASOBO_asset_optimized": { "BoundingBoxMax": bounding_box_max, "BoundingBoxMin": bounding_box_min, "MajorVersion": 4, "MinorVersion": 2 }, "ASOBO_normal_map_convention": { "tangent_space_convention": "DirectX" } } exporter.add_asobo_bounding_box(extensions)
def __gather_gltf(exporter, export_settings): active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings) if export_settings['gltf_draco_mesh_compression']: gltf2_io_draco_compression_extension.compress_scene_primitives(scenes, export_settings) exporter.add_draco_extension() for idx, scene in enumerate(scenes): exporter.add_scene(scene, idx==active_scene_idx) for animation in animations: exporter.add_animation(animation)
def __gather_gltf(exporter, export_settings): scenes, animations = gltf2_blender_gather.gather_gltf2(export_settings) if export_settings['gltf_draco_mesh_compression']: gltf2_io_draco_compression_extension.compress_scene_primitives(scenes, export_settings) exporter.add_draco_extension() for scene in scenes: exporter.add_scene(scene) for animation in animations: exporter.add_animation(animation)
def __gather_gltf(exporter, export_settings): active_scene_idx, scenes, animations = gltf2_blender_gather.gather_gltf2( export_settings) plan = { 'active_scene_idx': active_scene_idx, 'scenes': scenes, 'animations': animations } export_user_extensions('gather_gltf_hook', export_settings, plan) active_scene_idx, scenes, animations = plan['active_scene_idx'], plan[ 'scenes'], plan['animations'] if export_settings['gltf_draco_mesh_compression']: gltf2_io_draco_compression_extension.compress_scene_primitives( scenes, export_settings) exporter.add_draco_extension() for idx, scene in enumerate(scenes): exporter.add_scene(scene, idx == active_scene_idx) for animation in animations: exporter.add_animation(animation)