mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
make sure new instances does not share object values
This commit is contained in:
parent
ba73ba7b6c
commit
aed3f4059e
1 changed files with 6 additions and 2 deletions
|
|
@ -44,8 +44,12 @@ class CollectPsdInstances(pyblish.api.InstancePlugin):
|
|||
new_instance = context.create_instance(instance_name)
|
||||
|
||||
# add original instance data except name key
|
||||
new_instance.data.update({k: v for k, v in instance.data.items()
|
||||
if k not in "name"})
|
||||
for key, value in instance.data.items():
|
||||
if key not in ["name"]:
|
||||
# Make sure value is copy since value may be object which
|
||||
# can be shared across all new created objects
|
||||
new_instance.data[key] = copy.deepcopy(value)
|
||||
|
||||
# add subset data from preset
|
||||
new_instance.data.update(subset_data)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue