mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 17:04:54 +01:00
Separate get_template_name into its own method + use self.default_template_name
This commit is contained in:
parent
8f8b578f0c
commit
6ff7167d54
1 changed files with 14 additions and 8 deletions
|
|
@ -172,14 +172,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
)
|
||||
)
|
||||
|
||||
# Define publish template name from profiles
|
||||
filter_criteria = self.get_profile_filter_criteria(instance)
|
||||
profile = filter_profiles(self.template_name_profiles,
|
||||
filter_criteria,
|
||||
logger=self.log)
|
||||
template_name = "publish"
|
||||
if profile:
|
||||
template_name = profile["template_name"]
|
||||
template_name = self._get_template_name(instance)
|
||||
|
||||
subset = self.register_subset(instance)
|
||||
|
||||
|
|
@ -582,6 +575,19 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
|
||||
return families
|
||||
|
||||
def _get_template_name(self, instance):
|
||||
"""Return anatomy template name to use for integration"""
|
||||
|
||||
# Define publish template name from profiles
|
||||
filter_criteria = self.get_profile_filter_criteria(instance)
|
||||
profile = filter_profiles(self.template_name_profiles,
|
||||
filter_criteria,
|
||||
logger=self.log)
|
||||
template_name = self.default_template_name
|
||||
if profile:
|
||||
template_name = profile["template_name"]
|
||||
return template_name
|
||||
|
||||
def register_subset(self, instance):
|
||||
asset = instance.data.get("assetEntity")
|
||||
subset_name = instance.data["subset"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue