mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
OP-3909 - remove initialization of AfterEffectsHost
Initialization might be expensive, use self.host instead.
This commit is contained in:
parent
64148737ff
commit
b52a2eef1f
2 changed files with 2 additions and 5 deletions
|
|
@ -7,7 +7,6 @@ from openpype.pipeline import (
|
|||
CreatorError,
|
||||
legacy_io,
|
||||
)
|
||||
from openpype.hosts.aftereffects.api import AfterEffectsHost
|
||||
|
||||
|
||||
class RenderCreator(Creator):
|
||||
|
|
@ -24,13 +23,12 @@ class RenderCreator(Creator):
|
|||
["create"]
|
||||
["RenderCreator"]
|
||||
["defaults"])
|
||||
self._host = AfterEffectsHost()
|
||||
|
||||
def get_icon(self):
|
||||
return resources.get_openpype_splash_filepath()
|
||||
|
||||
def collect_instances(self):
|
||||
for instance_data in self._host.list_instances():
|
||||
for instance_data in self.host.list_instances():
|
||||
# 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,6 @@ from openpype.pipeline import (
|
|||
CreatedInstance,
|
||||
legacy_io,
|
||||
)
|
||||
from openpype.hosts.aftereffects.api import AfterEffectsHost
|
||||
|
||||
|
||||
class AEWorkfileCreator(AutoCreator):
|
||||
|
|
@ -18,7 +17,7 @@ class AEWorkfileCreator(AutoCreator):
|
|||
return []
|
||||
|
||||
def collect_instances(self):
|
||||
for instance_data in AfterEffectsHost().list_instances():
|
||||
for instance_data in self.host.list_instances():
|
||||
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