Fix problem with AVALON_CONTAINER collection and workfile instance

This commit is contained in:
Simone Barbieri 2024-01-10 12:03:08 +00:00
parent b012e169d4
commit 0a6edc648c

View file

@ -311,11 +311,13 @@ class BaseCreator(Creator):
) )
return return
# Rename the instance node in the scene if subset or asset changed # Rename the instance node in the scene if subset or asset changed.
# Do not rename the instance if the family is workfile, as the
# workfile instance is included in the AVALON_CONTAINER collection.
if ( if (
"subset" in changes.changed_keys "subset" in changes.changed_keys
or asset_name_key in changes.changed_keys or asset_name_key in changes.changed_keys
): ) and created_instance.family != "workfile":
asset_name = data[asset_name_key] asset_name = data[asset_name_key]
if AYON_SERVER_ENABLED: if AYON_SERVER_ENABLED:
asset_name = asset_name.split("/")[-1] asset_name = asset_name.split("/")[-1]