mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
🔀 Merge remote-tracking branch 'origin/develop' into enhancement/OP-3075_houdini-new-publisher
This commit is contained in:
commit
f8a59021b0
256 changed files with 5497 additions and 3429 deletions
|
|
@ -7,7 +7,11 @@ from uuid import uuid4
|
|||
from contextlib import contextmanager
|
||||
|
||||
from openpype.client import get_assets
|
||||
from openpype.host import INewPublisher
|
||||
from openpype.settings import (
|
||||
get_system_settings,
|
||||
get_project_settings
|
||||
)
|
||||
from openpype.host import IPublishHost
|
||||
from openpype.pipeline import legacy_io
|
||||
from openpype.pipeline.mongodb import (
|
||||
AvalonMongoDB,
|
||||
|
|
@ -20,11 +24,6 @@ from .creator_plugins import (
|
|||
discover_creator_plugins,
|
||||
)
|
||||
|
||||
from openpype.api import (
|
||||
get_system_settings,
|
||||
get_project_settings
|
||||
)
|
||||
|
||||
UpdateData = collections.namedtuple("UpdateData", ["instance", "changes"])
|
||||
|
||||
|
||||
|
|
@ -402,8 +401,12 @@ class CreatedInstance:
|
|||
self.creator = creator
|
||||
|
||||
# Instance members may have actions on them
|
||||
# TODO implement members logic
|
||||
self._members = []
|
||||
|
||||
# Data that can be used for lifetime of object
|
||||
self._transient_data = {}
|
||||
|
||||
# Create a copy of passed data to avoid changing them on the fly
|
||||
data = copy.deepcopy(data or {})
|
||||
# Store original value of passed data
|
||||
|
|
@ -597,6 +600,26 @@ class CreatedInstance:
|
|||
|
||||
return self
|
||||
|
||||
@property
|
||||
def transient_data(self):
|
||||
"""Data stored for lifetime of instance object.
|
||||
|
||||
These data are not stored to scene and will be lost on object
|
||||
deletion.
|
||||
|
||||
Can be used to store objects. In some host implementations is not
|
||||
possible to reference to object in scene with some unique identifier
|
||||
(e.g. node in Fusion.). In that case it is handy to store the object
|
||||
here. Should be used that way only if instance data are stored on the
|
||||
node itself.
|
||||
|
||||
Returns:
|
||||
Dict[str, Any]: Dictionary object where you can store data related
|
||||
to instance for lifetime of instance object.
|
||||
"""
|
||||
|
||||
return self._transient_data
|
||||
|
||||
def changes(self):
|
||||
"""Calculate and return changes."""
|
||||
|
||||
|
|
@ -772,7 +795,7 @@ class CreateContext:
|
|||
"""
|
||||
|
||||
missing = set(
|
||||
INewPublisher.get_missing_publish_methods(host)
|
||||
IPublishHost.get_missing_publish_methods(host)
|
||||
)
|
||||
return missing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue