diff --git a/addons/io_scene_swbf_msh/msh_model_gather.py b/addons/io_scene_swbf_msh/msh_model_gather.py index e1aa472..21e058b 100644 --- a/addons/io_scene_swbf_msh/msh_model_gather.py +++ b/addons/io_scene_swbf_msh/msh_model_gather.py @@ -15,14 +15,17 @@ def gather_models() -> List[Model]: """ Gathers the Blender objects from the current scene and returns them as a list of Model objects. """ + depsgraph = bpy.context.evaluated_depsgraph_get() parents = create_parents_set() models_list: List[Model] = [] - for obj in bpy.context.scene.objects: - if obj.type in SKIPPED_OBJECT_TYPES and obj.name not in parents: + for uneval_obj in bpy.context.scene.objects: + if uneval_obj.type in SKIPPED_OBJECT_TYPES and uneval_obj.name not in parents: continue + obj = uneval_obj.evaluated_get(depsgraph) + model = Model() model.name = obj.name model.model_type = get_model_type(obj)