mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
make self publish button optional
This commit is contained in:
parent
9eefc288a9
commit
4f52c70093
7 changed files with 56 additions and 2 deletions
|
|
@ -168,6 +168,7 @@ class HoudiniCreator(NewCreator, HoudiniCreatorBase):
|
|||
"""Base class for most of the Houdini creator plugins."""
|
||||
selected_nodes = []
|
||||
settings_name = None
|
||||
_add_self_publish_button = False
|
||||
|
||||
def create(self, subset_name, instance_data, pre_create_data):
|
||||
try:
|
||||
|
|
@ -194,7 +195,10 @@ class HoudiniCreator(NewCreator, HoudiniCreatorBase):
|
|||
self)
|
||||
self._add_instance_to_context(instance)
|
||||
imprint(instance_node, instance.data_to_store())
|
||||
add_self_publish_button(instance_node)
|
||||
|
||||
if self._add_self_publish_button:
|
||||
add_self_publish_button(instance_node)
|
||||
|
||||
return instance
|
||||
|
||||
except hou.Error as er:
|
||||
|
|
@ -300,6 +304,11 @@ class HoudiniCreator(NewCreator, HoudiniCreatorBase):
|
|||
def apply_settings(self, project_settings):
|
||||
"""Method called on initialization of plugin to apply settings."""
|
||||
|
||||
# Apply General Settings
|
||||
self._add_self_publish_button = \
|
||||
project_settings["houdini"]["general"]["add_self_publish_button"]
|
||||
|
||||
# Apply Creator Settings
|
||||
settings_name = self.settings_name
|
||||
if settings_name is None:
|
||||
settings_name = self.__class__.__name__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue