Compare commits
1 Commits
bb79838593
...
cfd0b3dbd6
Author | SHA1 | Date |
---|---|---|
Beni Bachmann | cfd0b3dbd6 |
3
TODO.md
3
TODO.md
|
@ -226,7 +226,7 @@ Blender side:
|
|||
- [ ] materials_path custom property should be ignored both in the list of fixable component AND on export
|
||||
- [ ] if we want to add material_infos & others as normal components they should not be editable, so we need another attribute, and adapt the UI for that
|
||||
|
||||
- [ ] if material library is toggled, then changes to materials should not change the blueprints that are using them => not really: as the name & co might change
|
||||
- [ ] if material library is toggled, then changes to materials should not change the blueprints that are using them ?
|
||||
- [ ] material assets seem to be added to list regardless of whether material exports are enabled or not
|
||||
- [ ] review & upgrade overall logic of material libraries, their names & output path
|
||||
- [ ] persist exported materials path in blueprints so that it can be read from library file users
|
||||
|
@ -253,7 +253,6 @@ Blender side:
|
|||
- [x] rename all "main scene xx" to "level scene"
|
||||
- [x] make sure the "add scene" button is not available unless you have actually selected one
|
||||
- [x] make auto export be on by default, however bail out early by detecting if there are any level/blueprint scenes
|
||||
- [x] remove custom components to filter out correctly from exported blueprints list
|
||||
|
||||
Bevy Side:
|
||||
- [x] deprecate BlueprintName & BlueprintPath & use BlueprintInfo instead
|
||||
|
|
|
@ -3,7 +3,16 @@ import bpy
|
|||
from blenvy.core.object_makers import (make_empty)
|
||||
from blenvy.add_ons.bevy_components.utils import is_component_valid_and_enabled
|
||||
from ..constants import custom_properties_to_filter_out
|
||||
from ..utils import remove_unwanted_custom_properties
|
||||
|
||||
def remove_unwanted_custom_properties(object):
|
||||
to_remove = []
|
||||
component_names = list(object.keys()) # to avoid 'IDPropertyGroup changed size during iteration' issues
|
||||
for component_name in component_names:
|
||||
if not is_component_valid_and_enabled(object, component_name):
|
||||
to_remove.append(component_name)
|
||||
for cp in custom_properties_to_filter_out + to_remove:
|
||||
if cp in object:
|
||||
del object[cp]
|
||||
|
||||
# TODO: rename actions ?
|
||||
# reference https://github.com/KhronosGroup/glTF-Blender-IO/blob/main/addons/io_scene_gltf2/blender/exp/animation/gltf2_blender_gather_action.py#L481
|
||||
|
|
|
@ -6,9 +6,6 @@ from .duplicate_object import duplicate_object
|
|||
from .export_gltf import export_gltf
|
||||
from blenvy.core.scene_helpers import add_scene_property
|
||||
from ..constants import custom_properties_to_filter_out
|
||||
from ..utils import remove_unwanted_custom_properties
|
||||
|
||||
|
||||
"""
|
||||
generates a temporary scene, fills it with data, cleans up after itself
|
||||
* named using temp_scene_name
|
||||
|
@ -30,9 +27,6 @@ def generate_temporary_scene_and_export(settings, gltf_export_settings, gltf_out
|
|||
print("entry in additional data", entry, "value", additional_data[entry], "in", additional_data.name)
|
||||
temp_scene[entry] = additional_data[entry]
|
||||
|
||||
# we remove everything from the black list
|
||||
remove_unwanted_custom_properties(temp_scene)
|
||||
|
||||
# save active scene
|
||||
active_scene = bpy.context.window.scene
|
||||
# and selected collection
|
||||
|
|
|
@ -7,5 +7,5 @@ custom_properties_to_filter_out = [
|
|||
'components_meta', 'Components_meta',
|
||||
'_combine', 'template',
|
||||
'Blenvy_scene_type', 'blenvy_scene_type',
|
||||
'materials_path', 'export_path',
|
||||
'Materials_path', 'Export_path'
|
||||
]
|
||||
|
|
|
@ -58,7 +58,10 @@ def draw_settings_ui(layout, auto_export_settings):
|
|||
|
||||
# materials
|
||||
section.prop(auto_export_settings, "export_materials_library")
|
||||
|
||||
section = section.box()
|
||||
section.enabled = controls_enabled and auto_export_settings.export_materials_library
|
||||
#section.prop(auto_export_settings, "materials_path")
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,18 +2,6 @@ import posixpath
|
|||
import bpy
|
||||
from pathlib import Path
|
||||
from blenvy.assets.assets_scan import get_blueprint_asset_tree, get_level_scene_assets_tree2
|
||||
from blenvy.add_ons.bevy_components.utils import is_component_valid_and_enabled
|
||||
from .constants import custom_properties_to_filter_out
|
||||
|
||||
def remove_unwanted_custom_properties(object):
|
||||
to_remove = []
|
||||
component_names = list(object.keys()) # to avoid 'IDPropertyGroup changed size during iteration' issues
|
||||
for component_name in component_names:
|
||||
if not is_component_valid_and_enabled(object, component_name):
|
||||
to_remove.append(component_name)
|
||||
for cp in custom_properties_to_filter_out + to_remove:
|
||||
if cp in object:
|
||||
del object[cp]
|
||||
|
||||
def assets_to_fake_ron(list_like):
|
||||
result = []
|
||||
|
|
|
@ -183,6 +183,13 @@ class BlenvyManager(PropertyGroup):
|
|||
print("setting", setting, settings[setting])
|
||||
setattr(self, setting, settings[setting])
|
||||
except:pass
|
||||
"""if "mode" in settings:
|
||||
self.mode = settings["mode"]
|
||||
|
||||
asset_path_names = ['project_root_path', 'assets_path', 'blueprints_path', 'levels_path', 'materials_path']
|
||||
for asset_path_name in asset_path_names:
|
||||
if asset_path_name in settings:
|
||||
setattr(self, asset_path_name, settings[asset_path_name])"""
|
||||
|
||||
self.settings_save_enabled = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue