From 5f58f18cd95d71835614ff51f7107dece5202121 Mon Sep 17 00:00:00 2001 From: Simone Barbieri Date: Wed, 14 Apr 2021 15:59:15 +0100 Subject: [PATCH] Fixed problem that published objects not in the instance --- openpype/hosts/blender/plugins/publish/extract_abc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/blender/plugins/publish/extract_abc.py b/openpype/hosts/blender/plugins/publish/extract_abc.py index e1eef61560..a7653d9f5a 100644 --- a/openpype/hosts/blender/plugins/publish/extract_abc.py +++ b/openpype/hosts/blender/plugins/publish/extract_abc.py @@ -52,6 +52,8 @@ class ExtractABC(openpype.api.Extractor): old_scale = scene.unit_settings.scale_length + bpy.ops.object.select_all(action='DESELECT') + selected = list() for obj in instance: @@ -67,12 +69,11 @@ class ExtractABC(openpype.api.Extractor): # We set the scale of the scene for the export scene.unit_settings.scale_length = 0.01 - self.log.info(new_context) - # We export the abc bpy.ops.wm.alembic_export( new_context, - filepath=filepath + filepath=filepath, + selected=True ) view_layer.active_layer_collection = old_active_layer_collection