apply modifiers during export
This commit is contained in:
parent
66b541417e
commit
fd0ba8720b
|
@ -15,14 +15,17 @@ def gather_models() -> List[Model]:
|
||||||
""" Gathers the Blender objects from the current scene and returns them as a list of
|
""" Gathers the Blender objects from the current scene and returns them as a list of
|
||||||
Model objects. """
|
Model objects. """
|
||||||
|
|
||||||
|
depsgraph = bpy.context.evaluated_depsgraph_get()
|
||||||
parents = create_parents_set()
|
parents = create_parents_set()
|
||||||
|
|
||||||
models_list: List[Model] = []
|
models_list: List[Model] = []
|
||||||
|
|
||||||
for obj in bpy.context.scene.objects:
|
for uneval_obj in bpy.context.scene.objects:
|
||||||
if obj.type in SKIPPED_OBJECT_TYPES and obj.name not in parents:
|
if uneval_obj.type in SKIPPED_OBJECT_TYPES and uneval_obj.name not in parents:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
obj = uneval_obj.evaluated_get(depsgraph)
|
||||||
|
|
||||||
model = Model()
|
model = Model()
|
||||||
model.name = obj.name
|
model.name = obj.name
|
||||||
model.model_type = get_model_type(obj)
|
model.model_type = get_model_type(obj)
|
||||||
|
|
Loading…
Reference in New Issue