mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix problem when updating or removing layout with non loaded objects
This commit is contained in:
parent
6f2c16fc6d
commit
c07bcb2b21
1 changed files with 6 additions and 0 deletions
|
|
@ -48,8 +48,14 @@ class BlendLayoutLoader(plugin.AssetLoader):
|
|||
bpy.data.objects.remove(obj)
|
||||
|
||||
def _remove_asset_and_library(self, asset_group):
|
||||
if not asset_group.get(AVALON_PROPERTY):
|
||||
return
|
||||
|
||||
libpath = asset_group.get(AVALON_PROPERTY).get('libpath')
|
||||
|
||||
if not libpath:
|
||||
return
|
||||
|
||||
# Check how many assets use the same library
|
||||
count = 0
|
||||
for obj in bpy.data.collections.get(AVALON_CONTAINERS).all_objects:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue