diff --git a/tools/gltf_auto_export/auto_export/get_levels_to_export.py b/tools/gltf_auto_export/auto_export/get_levels_to_export.py index a93e9e9..4b4370f 100644 --- a/tools/gltf_auto_export/auto_export/get_levels_to_export.py +++ b/tools/gltf_auto_export/auto_export/get_levels_to_export.py @@ -5,9 +5,6 @@ from ..helpers.helpers_scenes import (get_scenes, ) # IF collection_instances_combine_mode is not 'split' check for each scene if any object in changes_per_scene has an instance in the scene def changed_object_in_scene(scene_name, changes_per_scene, blueprints_data, collection_instances_combine_mode): # Embed / EmbedExternal - """if collection_instances_combine_mode == "Split": # 1 => Embed - return False""" - blueprints_from_objects = blueprints_data.blueprints_from_objects blueprint_instances_in_scene = blueprints_data.blueprint_instances_per_main_scene.get(scene_name, None) @@ -34,7 +31,6 @@ def changed_object_in_scene(scene_name, changes_per_scene, blueprints_data, coll # changes => list of changed objects (regardless of wether they have been changed in main scene or in lib scene) # wich of those objects are blueprint instances # we need a list of changed objects that are blueprint instances - return level_needs_export return False diff --git a/tools/gltf_auto_export/auto_export/operators.py b/tools/gltf_auto_export/auto_export/operators.py index ddea709..ef43a29 100644 --- a/tools/gltf_auto_export/auto_export/operators.py +++ b/tools/gltf_auto_export/auto_export/operators.py @@ -178,10 +178,10 @@ class AutoExportGLTF(Operator, AutoExportGltfAddonPreferences):#, ExportHelper): # if there were no setting before, it is new, we need export changed = False if previous_auto_settings == None: - print("previous settings missing, exporting") + #print("previous settings missing, exporting") changed = True elif previous_gltf_settings == None: - print("previous gltf settings missing, exporting") + #print("previous gltf settings missing, exporting") previous_gltf_settings = bpy.data.texts.new(".gltf_auto_export_gltf_settings_previous") previous_gltf_settings.write(json.dumps({})) if current_gltf_settings == None: @@ -194,18 +194,17 @@ class AutoExportGLTF(Operator, AutoExportGltfAddonPreferences):#, ExportHelper): auto_settings_changed = sorted(json.loads(previous_auto_settings.as_string()).items()) != sorted(json.loads(current_auto_settings.as_string()).items()) if current_auto_settings != None else False gltf_settings_changed = sorted(json.loads(previous_gltf_settings.as_string()).items()) != sorted(json.loads(current_gltf_settings.as_string()).items()) if current_gltf_settings != None else False - print("auto settings previous", sorted(json.loads(previous_auto_settings.as_string()).items())) + """print("auto settings previous", sorted(json.loads(previous_auto_settings.as_string()).items())) print("auto settings current", sorted(json.loads(current_auto_settings.as_string()).items())) print("auto_settings_changed", auto_settings_changed) print("gltf settings previous", sorted(json.loads(previous_gltf_settings.as_string()).items())) print("gltf settings current", sorted(json.loads(current_gltf_settings.as_string()).items())) - print("gltf_settings_changed", gltf_settings_changed) + print("gltf_settings_changed", gltf_settings_changed)""" changed = auto_settings_changed or gltf_settings_changed # now write the current settings to the "previous settings" if current_auto_settings != None: - print("writing settings") previous_auto_settings = bpy.data.texts[".gltf_auto_export_settings_previous"] if ".gltf_auto_export_settings_previous" in bpy.data.texts else bpy.data.texts.new(".gltf_auto_export_settings_previous") previous_auto_settings.clear() previous_auto_settings.write(current_auto_settings.as_string()) # TODO : check if this is always valid @@ -294,15 +293,9 @@ class AutoExportGLTF(Operator, AutoExportGltfAddonPreferences):#, ExportHelper): changes_per_scene[scene][object_name] = bpy.data.objects[object_name] bubble_up_changes(bpy.data.objects[object_name], changes_per_scene[scene]) # now bubble up for instances & parents - - - - previous_stored.clear() previous_stored.write(json.dumps(current)) - - print("changes per scene alternative", changes_per_scene) return changes_per_scene