apply modifiers during export

This commit is contained in:
SleepKiller 2019-11-13 16:38:55 +13:00
parent 66b541417e
commit fd0ba8720b
1 changed files with 5 additions and 2 deletions

View File

@ -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)