Implemented fix for deselecting all objects

This commit is contained in:
Simone Barbieri 2021-10-21 15:35:46 +01:00
parent 6f3f0e6732
commit 3bb391f870
4 changed files with 6 additions and 6 deletions

View file

@ -53,7 +53,7 @@ class CreateCamera(plugin.Creator):
selected.append(asset_group)
bpy.ops.object.parent_set(keep_transform=True)
else:
bpy.ops.object.select_all(action='DESELECT')
plugin.deselect_all()
camera_obj.select_set(True)
asset_group.select_set(True)
bpy.context.view_layer.objects.active = asset_group

View file

@ -91,7 +91,7 @@ class BlendCameraLoader(plugin.AssetLoader):
bpy.data.orphans_purge(do_local_ids=False)
bpy.ops.object.select_all(action='DESELECT')
plugin.deselect_all()
return objects

View file

@ -38,7 +38,7 @@ class FbxCameraLoader(plugin.AssetLoader):
bpy.data.objects.remove(obj)
def _process(self, libpath, asset_group, group_name):
bpy.ops.object.select_all(action='DESELECT')
plugin.deselect_all()
collection = bpy.context.view_layer.active_layer_collection.collection
@ -68,7 +68,7 @@ class FbxCameraLoader(plugin.AssetLoader):
avalon_info = obj[AVALON_PROPERTY]
avalon_info.update({"container_name": group_name})
bpy.ops.object.select_all(action='DESELECT')
plugin.deselect_all()
return objects

View file

@ -23,7 +23,7 @@ class ExtractCamera(api.Extractor):
# Perform extraction
self.log.info("Performing extraction..")
bpy.ops.object.select_all(action='DESELECT')
plugin.deselect_all()
selected = []
@ -56,7 +56,7 @@ class ExtractCamera(api.Extractor):
bpy.context.scene.unit_settings.scale_length = scale_length
bpy.ops.object.select_all(action='DESELECT')
plugin.deselect_all()
if "representations" not in instance.data:
instance.data["representations"] = []