changed 'uuid' to 'instance_id' as 'uuid' may not work in maya

This commit is contained in:
Jakub Trllo 2022-02-21 17:09:28 +01:00
parent 0f3879e41c
commit 57e1af7ba8
4 changed files with 15 additions and 15 deletions

View file

@ -14,7 +14,7 @@ Except creating and removing instances are all changes not automatically propaga
## CreatedInstance
Product of creation is "instance" which holds basic data defying it. Core data are `creator_identifier`, `family` and `subset`. Other data can be keys used to fill subset name or metadata modifying publishing process of the instance (more described later). All instances have `id` which holds constant `pyblish.avalon.instance` and `uuid` which is identifier of the instance.
Product of creation is "instance" which holds basic data defying it. Core data are `creator_identifier`, `family` and `subset`. Other data can be keys used to fill subset name or metadata modifying publishing process of the instance (more described later). All instances have `id` which holds constant `pyblish.avalon.instance` and `instance_id` which is identifier of the instance.
Family tells how should be instance processed and subset what name will published item have.
- There are cases when subset is not fully filled during creation and may change during publishing. That is in most of cases caused because instance is related to other instance or instance data do not represent final product.
@ -26,7 +26,7 @@ Family tells how should be instance processed and subset what name will publishe
## Identifier that this data represents instance for publishing (automatically assigned)
"id": "pyblish.avalon.instance",
## Identifier of this specific instance (automatically assigned)
"uuid": <uuid4>,
"instance_id": <uuid4>,
## Instance family (used from Creator)
"family": <family>,

View file

@ -361,7 +361,7 @@ class CreatedInstance:
# their individual children but not on their own
__immutable_keys = (
"id",
"uuid",
"instance_id",
"family",
"creator_identifier",
"creator_attributes",
@ -434,8 +434,8 @@ class CreatedInstance:
if data:
self._data.update(data)
if not self._data.get("uuid"):
self._data["uuid"] = str(uuid4())
if not self._data.get("instance_id"):
self._data["instance_id"] = str(uuid4())
self._asset_is_valid = self.has_set_asset
self._task_is_valid = self.has_set_task
@ -551,7 +551,7 @@ class CreatedInstance:
@property
def id(self):
"""Instance identifier."""
return self._data["uuid"]
return self._data["instance_id"]
@property
def data(self):