define 'settings_category' on plugins

This commit is contained in:
Jakub Trllo 2024-05-22 18:08:09 +02:00
parent f629148ae9
commit 0f033d394a
19 changed files with 40 additions and 0 deletions

View file

@ -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):

View file

@ -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:

View file

@ -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):

View file

@ -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"]

View file

@ -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))

View file

@ -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

View file

@ -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]

View file

@ -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"]), (

View file

@ -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

View file

@ -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"]

View file

@ -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

View file

@ -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"]

View file

@ -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"]

View file

@ -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)

View file

@ -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"]

View file

@ -16,6 +16,8 @@ class ValidateProjectSettings(
label = "Validate Scene Settings"
order = pyblish.api.ValidatorOrder
settings_category = "tvpaint"
optional = True
def process(self, context):

View file

@ -27,6 +27,8 @@ class ValidateStartFrame(
order = pyblish.api.ValidatorOrder
hosts = ["tvpaint"]
actions = [RepairStartFrame]
settings_category = "tvpaint"
optional = True
def process(self, context):

View file

@ -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):

View file

@ -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