mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-27 05:46:59 +00:00
Compare commits
1 Commits
a3d95b8425
...
2e87921fef
Author | SHA1 | Date | |
---|---|---|---|
|
2e87921fef |
Binary file not shown.
@ -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
|
||||||
|
|
||||||
|
@ -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)
|
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user