mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
define 'settings_category' on plugins
This commit is contained in:
parent
f629148ae9
commit
0f033d394a
19 changed files with 40 additions and 0 deletions
|
|
@ -89,6 +89,8 @@ class TVPaintCreatorCommon:
|
|||
|
||||
|
||||
class TVPaintCreator(Creator, TVPaintCreatorCommon):
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def collect_instances(self):
|
||||
self._collect_create_instances()
|
||||
|
||||
|
|
@ -140,6 +142,8 @@ class TVPaintCreator(Creator, TVPaintCreatorCommon):
|
|||
|
||||
|
||||
class TVPaintAutoCreator(AutoCreator, TVPaintCreatorCommon):
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def collect_instances(self):
|
||||
self._collect_create_instances()
|
||||
|
||||
|
|
@ -152,6 +156,7 @@ class TVPaintAutoCreator(AutoCreator, TVPaintCreatorCommon):
|
|||
|
||||
class Loader(LoaderPlugin):
|
||||
hosts = ["tvpaint"]
|
||||
settings_category = "tvpaint"
|
||||
|
||||
@staticmethod
|
||||
def get_members_from_container(container):
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ class CollectOutputFrameRange(pyblish.api.InstancePlugin):
|
|||
hosts = ["tvpaint"]
|
||||
families = ["review", "render"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, instance):
|
||||
folder_entity = instance.data.get("folderEntity")
|
||||
if not folder_entity:
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ class CollectRenderInstances(pyblish.api.InstancePlugin):
|
|||
hosts = ["tvpaint"]
|
||||
families = ["render", "review"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
ignore_render_pass_transparency = False
|
||||
|
||||
def process(self, instance):
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class CollectWorkfile(pyblish.api.InstancePlugin):
|
|||
hosts = ["tvpaint"]
|
||||
families = ["workfile"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, instance):
|
||||
context = instance.context
|
||||
current_file = context.data["currentFile"]
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ class CollectWorkfileData(pyblish.api.ContextPlugin):
|
|||
hosts = ["tvpaint"]
|
||||
actions = [ResetTVPaintWorkfileMetadata]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, context):
|
||||
current_project_id = execute_george("tv_projectcurrentid")
|
||||
execute_george("tv_projectselect {}".format(current_project_id))
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class ExtractConvertToEXR(pyblish.api.InstancePlugin):
|
|||
hosts = ["tvpaint"]
|
||||
families = ["render"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
enabled = False
|
||||
|
||||
# Replace source PNG files or just add
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class ExtractSequence(pyblish.api.InstancePlugin):
|
|||
hosts = ["tvpaint"]
|
||||
families = ["review", "render"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
# Modifiable with settings
|
||||
review_bg = [255, 255, 255, 1.0]
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ class IncrementWorkfileVersion(pyblish.api.ContextPlugin):
|
|||
optional = True
|
||||
hosts = ["tvpaint"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, context):
|
||||
|
||||
assert all(result["success"] for result in context.data["results"]), (
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ class ValidateAssetName(
|
|||
hosts = ["tvpaint"]
|
||||
actions = [FixFolderPaths]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, context):
|
||||
if not self.is_active(context.data):
|
||||
return
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class ValidateLayersGroup(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.ValidatorOrder
|
||||
families = ["renderPass"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, instance):
|
||||
# Prepare layers
|
||||
layers_by_name = instance.context.data["layersByName"]
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ class ValidateLayersVisiblity(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.ValidatorOrder
|
||||
families = ["review", "render"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, instance):
|
||||
layers = instance.data.get("layers")
|
||||
# Instance have empty layers
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ class ValidateMarks(
|
|||
optional = True
|
||||
actions = [ValidateMarksRepair]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
@staticmethod
|
||||
def get_expected_data(context):
|
||||
scene_mark_in = context.data["sceneMarkIn"]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ class ValidateMissingLayers(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.ValidatorOrder
|
||||
families = ["renderPass"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, instance):
|
||||
# Prepare layers
|
||||
layers_by_name = instance.context.data["layersByName"]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ class ValidateRenderLayerGroups(pyblish.api.ContextPlugin):
|
|||
label = "Validate Render Layers Group"
|
||||
order = pyblish.api.ValidatorOrder + 0.1
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, context):
|
||||
# Prepare layers
|
||||
render_layers_by_group_id = collections.defaultdict(list)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class ValidateLayersGroup(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.ValidatorOrder + 0.1
|
||||
families = ["renderPass"]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, instance):
|
||||
# Prepare layers
|
||||
layers_data = instance.context.data["layersData"]
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ class ValidateProjectSettings(
|
|||
|
||||
label = "Validate Scene Settings"
|
||||
order = pyblish.api.ValidatorOrder
|
||||
|
||||
settings_category = "tvpaint"
|
||||
optional = True
|
||||
|
||||
def process(self, context):
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ class ValidateStartFrame(
|
|||
order = pyblish.api.ValidatorOrder
|
||||
hosts = ["tvpaint"]
|
||||
actions = [RepairStartFrame]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
optional = True
|
||||
|
||||
def process(self, context):
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ class ValidateWorkfileMetadata(pyblish.api.ContextPlugin):
|
|||
|
||||
actions = [ValidateWorkfileMetadataRepair]
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
required_keys = {"project_name", "folder_path", "task_name"}
|
||||
|
||||
def process(self, context):
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ class ValidateWorkfileProjectName(pyblish.api.ContextPlugin):
|
|||
label = "Validate Workfile Project Name"
|
||||
order = pyblish.api.ValidatorOrder
|
||||
|
||||
settings_category = "tvpaint"
|
||||
|
||||
def process(self, context):
|
||||
workfile_context = context.data.get("workfile_context")
|
||||
# If workfile context is missing than project is matching to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue