mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
removed host from arguments of instance
This commit is contained in:
parent
b862b2b953
commit
dcb74c333b
1 changed files with 11 additions and 10 deletions
|
|
@ -366,13 +366,8 @@ class CreatedInstance:
|
|||
)
|
||||
|
||||
def __init__(
|
||||
self, family, subset_name, data, creator, host=None, new=True
|
||||
self, family, subset_name, data, creator, new=True
|
||||
):
|
||||
if host is None:
|
||||
import avalon.api
|
||||
|
||||
host = avalon.api.registered_host()
|
||||
self.host = host
|
||||
self.creator = creator
|
||||
|
||||
# Instance members may have actions on them
|
||||
|
|
@ -490,6 +485,14 @@ class CreatedInstance:
|
|||
def creator_identifier(self):
|
||||
return self.creator.identifier
|
||||
|
||||
@property
|
||||
def create_context(self):
|
||||
return self.creator.create_context
|
||||
|
||||
@property
|
||||
def host(self):
|
||||
return self.create_context.host
|
||||
|
||||
@property
|
||||
def has_set_asset(self):
|
||||
"""Asset name is set in data."""
|
||||
|
|
@ -591,9 +594,7 @@ class CreatedInstance:
|
|||
return output
|
||||
|
||||
@classmethod
|
||||
def from_existing(
|
||||
cls, instance_data, creator, host=None
|
||||
):
|
||||
def from_existing(cls, instance_data, creator):
|
||||
"""Convert instance data from workfile to CreatedInstance."""
|
||||
instance_data = copy.deepcopy(instance_data)
|
||||
|
||||
|
|
@ -603,7 +604,7 @@ class CreatedInstance:
|
|||
subset_name = instance_data.get("subset", None)
|
||||
|
||||
return cls(
|
||||
family, subset_name, instance_data, creator, host, new=False
|
||||
family, subset_name, instance_data, creator, new=False
|
||||
)
|
||||
|
||||
def set_publish_plugins(self, attr_plugins):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue