mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 11:50:53 +00:00
fix(Blenvy:Blender): fixed issue with materials not exported if there was an export parameter change
This commit is contained in:
parent
d08c235122
commit
0b02a24313
@ -54,6 +54,7 @@ def generate_temporary_scene_and_export(settings, gltf_export_settings, gltf_out
|
||||
else:
|
||||
set_active_collection(bpy.context.scene, temp_root_collection.name)
|
||||
# generate contents of temporary scene
|
||||
|
||||
scene_filler_data = tempScene_filler(temp_root_collection)
|
||||
# export the temporary scene
|
||||
try:
|
||||
|
@ -26,7 +26,7 @@ def is_object_dynamic(object):
|
||||
if component_name == 'Dynamic':
|
||||
is_dynamic = True
|
||||
break"""
|
||||
print("IS OBJECT DYNAMIC", object, is_dynamic)
|
||||
#print("IS OBJECT DYNAMIC", object, is_dynamic)
|
||||
|
||||
return is_dynamic
|
||||
|
||||
|
@ -15,9 +15,10 @@ def get_materials_to_export(changes_per_material, changed_export_parameters, blu
|
||||
local_materials = [material for material in all_materials if material.library is None]
|
||||
materials_to_export = []
|
||||
|
||||
# print("export_materials_library", export_materials_library, "change detection", change_detection, "changed_export_parameters", changed_export_parameters)
|
||||
if export_materials_library and change_detection:
|
||||
if changed_export_parameters:
|
||||
materials_to_export = [bpy.data.materials[material_name] for material_name in list(changes_per_material.keys())] # TODO: should be based on the list of materials in use
|
||||
materials_to_export = local_materials
|
||||
else :
|
||||
changed_materials = [bpy.data.materials[material_name] for material_name in list(changes_per_material.keys())]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user