mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
moving instnance id so it is imprinted once created
addressing issue form here https://github.com/ynput/OpenPype/pull/4943#issuecomment-1542241467
This commit is contained in:
parent
27ac1b4590
commit
dfea365474
1 changed files with 7 additions and 3 deletions
|
|
@ -44,6 +44,11 @@ class CreateSaver(NewCreator):
|
|||
"{workdir}/renders/fusion/{subset}/{subset}.{frame}.{ext}")
|
||||
|
||||
def create(self, subset_name, instance_data, pre_create_data):
|
||||
instance_data.update({
|
||||
"id": "pyblish.avalon.instance",
|
||||
"subset": subset_name
|
||||
})
|
||||
|
||||
# TODO: Add pre_create attributes to choose file format?
|
||||
file_format = "OpenEXRFormat"
|
||||
|
||||
|
|
@ -52,7 +57,6 @@ class CreateSaver(NewCreator):
|
|||
args = (-32768, -32768) # Magical position numbers
|
||||
saver = comp.AddTool("Saver", *args)
|
||||
|
||||
instance_data["subset"] = subset_name
|
||||
self._update_tool_with_data(saver, data=instance_data)
|
||||
|
||||
saver["OutputFormat"] = file_format
|
||||
|
|
@ -173,7 +177,7 @@ class CreateSaver(NewCreator):
|
|||
attrs = tool.GetAttrs()
|
||||
|
||||
ctx_data = {}
|
||||
keys = ["asset", "subset", "task", "variant"]
|
||||
keys = ["id", "asset", "subset", "task", "variant"]
|
||||
for key in keys:
|
||||
ctx_data[key] = tool.GetData(f"openpype.{key}")
|
||||
|
||||
|
|
@ -188,7 +192,7 @@ class CreateSaver(NewCreator):
|
|||
"active": not passthrough,
|
||||
"family": self.family,
|
||||
# Unique identifier for instance and this creator
|
||||
"id": "pyblish.avalon.instance",
|
||||
"id": ctx_data["id"],
|
||||
"creator_identifier": self.identifier,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue