mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
OP-3908 - revert back to AE specific cache method
Standard approach doesn't handle legacy instances, eg. instance without creator_identifier.
This commit is contained in:
parent
64f8e2fc9c
commit
de5decbcbb
3 changed files with 20 additions and 10 deletions
|
|
@ -7,7 +7,7 @@ from openpype.pipeline import (
|
|||
CreatorError,
|
||||
legacy_io,
|
||||
)
|
||||
from openpype.pipeline.create.creator_plugins import cache_and_get_instances
|
||||
from openpype.hosts.aftereffects.api.pipeline import cache_and_get_instances
|
||||
|
||||
|
||||
class RenderCreator(Creator):
|
||||
|
|
@ -29,10 +29,7 @@ class RenderCreator(Creator):
|
|||
return resources.get_openpype_splash_filepath()
|
||||
|
||||
def collect_instances(self):
|
||||
instances = cache_and_get_instances(self,
|
||||
"openpype.aftereffects.instances",
|
||||
self.host.list_instances)
|
||||
for instance_data in instances.values():
|
||||
for instance_data in cache_and_get_instances(self):
|
||||
# legacy instances have family=='render' or 'renderLocal', use them
|
||||
creator_id = (instance_data.get("creator_identifier") or
|
||||
instance_data.get("family", '').replace("Local", ''))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from openpype.pipeline import (
|
|||
CreatedInstance,
|
||||
legacy_io,
|
||||
)
|
||||
from openpype.pipeline.create.creator_plugins import cache_and_get_instances
|
||||
from openpype.hosts.aftereffects.api.pipeline import cache_and_get_instances
|
||||
|
||||
|
||||
class AEWorkfileCreator(AutoCreator):
|
||||
|
|
@ -18,10 +18,7 @@ class AEWorkfileCreator(AutoCreator):
|
|||
return []
|
||||
|
||||
def collect_instances(self):
|
||||
instances = cache_and_get_instances(self,
|
||||
"openpype.aftereffects.instances",
|
||||
self.host.list_instances)
|
||||
for instance_data in instances.values():
|
||||
for instance_data in cache_and_get_instances(self):
|
||||
creator_id = instance_data.get("creator_identifier")
|
||||
if creator_id == self.identifier:
|
||||
subset_name = instance_data["subset"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue