mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Bugfix: houdini hard coded project settings (#5400)
* get poject settings in creator * add comment about reading ext from project settings * update validator to get project settings * update comment about reading ext from project settings * revert explicit edits it's automated * remove redundant line
This commit is contained in:
parent
250dcbcd91
commit
bdaf86700b
3 changed files with 21 additions and 2 deletions
|
|
@ -167,6 +167,7 @@ class HoudiniCreatorBase(object):
|
|||
class HoudiniCreator(NewCreator, HoudiniCreatorBase):
|
||||
"""Base class for most of the Houdini creator plugins."""
|
||||
selected_nodes = []
|
||||
settings_name = None
|
||||
|
||||
def create(self, subset_name, instance_data, pre_create_data):
|
||||
try:
|
||||
|
|
@ -294,3 +295,21 @@ class HoudiniCreator(NewCreator, HoudiniCreatorBase):
|
|||
|
||||
"""
|
||||
return [hou.ropNodeTypeCategory()]
|
||||
|
||||
def apply_settings(self, project_settings, system_settings):
|
||||
"""Method called on initialization of plugin to apply settings."""
|
||||
|
||||
settings_name = self.settings_name
|
||||
if settings_name is None:
|
||||
settings_name = self.__class__.__name__
|
||||
|
||||
settings = project_settings["houdini"]["create"]
|
||||
settings = settings.get(settings_name)
|
||||
if settings is None:
|
||||
self.log.debug(
|
||||
"No settings found for {}".format(self.__class__.__name__)
|
||||
)
|
||||
return
|
||||
|
||||
for key, value in settings.items():
|
||||
setattr(self, key, value)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class CreateArnoldAss(plugin.HoudiniCreator):
|
|||
defaults = ["Main"]
|
||||
|
||||
# Default extension: `.ass` or `.ass.gz`
|
||||
# however calling HoudiniCreator.create()
|
||||
# will override it by the value in the project settings
|
||||
ext = ".ass"
|
||||
|
||||
def create(self, subset_name, instance_data, pre_create_data):
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ from openpype.pipeline import (
|
|||
)
|
||||
from openpype.pipeline.publish import RepairAction
|
||||
|
||||
from openpype.pipeline.publish import RepairAction
|
||||
|
||||
|
||||
class ValidateWorkfilePaths(
|
||||
pyblish.api.InstancePlugin, OptionalPyblishPluginMixin):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue