Compare commits

..

1 Commits

Author SHA1 Message Date
Mark Moissette
2e87921fef
Merge ce473a357e into bb4b07b7af 2024-03-22 13:00:41 +00:00
4 changed files with 6 additions and 29 deletions

View File

@ -1,7 +1,5 @@
import os import os
import bpy import bpy
from .get_standard_exporter_settings import get_standard_exporter_settings
from .preferences import (AutoExportGltfPreferenceNames) from .preferences import (AutoExportGltfPreferenceNames)
def generate_gltf_export_preferences(addon_prefs): def generate_gltf_export_preferences(addon_prefs):
@ -39,31 +37,10 @@ def generate_gltf_export_preferences(addon_prefs):
export_optimize_animation_size=False export_optimize_animation_size=False
) )
for key in addon_prefs.__annotations__.keys(): for key in addon_prefs.__annotations__.keys():
if str(key) not in AutoExportGltfPreferenceNames: if str(key) not in AutoExportGltfPreferenceNames:
#print("overriding setting", key, "value", getattr(addon_prefs,key)) #print("overriding setting", key, "value", getattr(addon_prefs,key))
gltf_export_preferences[key] = getattr(addon_prefs, key) gltf_export_preferences[key] = getattr(addon_prefs,key)
"""standard_gltf_exporter_settings = get_standard_exporter_settings()
print("standard settings", standard_gltf_exporter_settings)
constant_keys = [
'export_cameras',
'export_extras', # For custom exported properties.
'export_lights',
]
# a certain number of essential params should NEVER be overwritten , no matter the settings of the standard exporter
for key in standard_gltf_exporter_settings.keys():
if str(key) not in constant_keys:
gltf_export_preferences[key] = standard_gltf_exporter_settings.get(key)
print("final export preferences", gltf_export_preferences)"""
return gltf_export_preferences return gltf_export_preferences

View File

@ -1,9 +1,6 @@
import bpy import bpy
def get_standard_exporter_settings(): def get_standard_exporter_settings():
settings_key = 'glTF2ExportSettings'
for scene in bpy.data.scenes: for scene in bpy.data.scenes:
if settings_key in scene: if 'glTF2ExportSettings' in scene:
settings = scene[settings_key] print("standard exporter settings", scene['glTF2ExportSettings'])
#print("standard exporter settings", settings, dict(settings))
return dict(settings)

View File

@ -208,6 +208,9 @@ def get_scenes(addon_prefs):
return [level_scene_names, level_scenes, library_scene_names, library_scenes] return [level_scene_names, level_scenes, library_scene_names, library_scenes]
def inject_blueprints_list_into_main_scene(scene): def inject_blueprints_list_into_main_scene(scene):
print("injecting assets/blueprints data into scene") print("injecting assets/blueprints data into scene")
root_collection = scene.collection root_collection = scene.collection