mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Add settings category "nuke" to various plugins for consistency.
- Added a common settings category "nuke" to multiple plugin files.
This commit is contained in:
parent
3d6f1a7c27
commit
f18f50ad9c
58 changed files with 131 additions and 11 deletions
|
|
@ -10,6 +10,8 @@ from ayon_nuke.api import (
|
|||
class CreateBackdrop(NukeCreator):
|
||||
"""Add Publishable Backdrop"""
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_backdrop"
|
||||
label = "Nukenodes (backdrop)"
|
||||
product_type = "nukenodes"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ from ayon_nuke.api.lib import (
|
|||
class CreateCamera(NukeCreator):
|
||||
"""Add Publishable Camera"""
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_camera"
|
||||
label = "Camera (3d)"
|
||||
product_type = "camera"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ from ayon_nuke.api import (
|
|||
class CreateGizmo(NukeCreator):
|
||||
"""Add Publishable Group as gizmo"""
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_gizmo"
|
||||
label = "Gizmo (group)"
|
||||
product_type = "gizmo"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ from ayon_nuke.api import (
|
|||
class CreateModel(NukeCreator):
|
||||
"""Add Publishable Camera"""
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_model"
|
||||
label = "Model (3d)"
|
||||
product_type = "model"
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ from ayon_core.pipeline import (
|
|||
class CreateSource(NukeCreator):
|
||||
"""Add Publishable Read with source"""
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_source"
|
||||
label = "Source (read)"
|
||||
product_type = "source"
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ from ayon_nuke.api.plugin import exposed_write_knobs
|
|||
|
||||
|
||||
class CreateWriteImage(napi.NukeWriteCreator):
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_write_image"
|
||||
label = "Image (write)"
|
||||
product_type = "image"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ from ayon_nuke.api.plugin import exposed_write_knobs
|
|||
|
||||
|
||||
class CreateWritePrerender(napi.NukeWriteCreator):
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_write_prerender"
|
||||
label = "Prerender (write)"
|
||||
product_type = "prerender"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ from ayon_nuke.api.plugin import exposed_write_knobs
|
|||
|
||||
|
||||
class CreateWriteRender(napi.NukeWriteCreator):
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "create_write_render"
|
||||
label = "Render (write)"
|
||||
product_type = "render"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ import nuke
|
|||
|
||||
|
||||
class WorkfileCreator(AutoCreator):
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
identifier = "workfile"
|
||||
product_type = "workfile"
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class LoadBackdropNodes(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"nk"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Import Nuke Nodes"
|
||||
order = 0
|
||||
icon = "eye"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ class AlembicCameraLoader(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"abc"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Alembic Camera"
|
||||
icon = "camera"
|
||||
color = "orange"
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ class LoadClip(plugin.NukeLoader):
|
|||
ext.lstrip(".") for ext in IMAGE_EXTENSIONS.union(VIDEO_EXTENSIONS)
|
||||
)
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Clip"
|
||||
order = -20
|
||||
icon = "file-video-o"
|
||||
|
|
|
|||
|
|
@ -22,13 +22,14 @@ class LoadEffects(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"json"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Effects - nodes"
|
||||
order = 0
|
||||
icon = "cc"
|
||||
color = "white"
|
||||
ignore_attr = ["useLifetime"]
|
||||
|
||||
|
||||
def load(self, context, name, namespace, data):
|
||||
"""
|
||||
Loading function to get the soft effects to particular read node
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"json"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Effects - Input Process"
|
||||
order = 0
|
||||
icon = "eye"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class LoadGizmo(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"nk"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Gizmo"
|
||||
order = 0
|
||||
icon = "dropbox"
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ class LoadGizmoInputProcess(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"nk"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Gizmo - Input Process"
|
||||
order = 0
|
||||
icon = "eye"
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ class LoadImage(load.LoaderPlugin):
|
|||
"image",
|
||||
}
|
||||
representations = {"*"}
|
||||
extensions = set(
|
||||
ext.lstrip(".") for ext in IMAGE_EXTENSIONS
|
||||
)
|
||||
extensions = set(ext.lstrip(".") for ext in IMAGE_EXTENSIONS)
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Image"
|
||||
order = -10
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class MatchmoveLoader(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"py"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
defaults = ["Camera", "Object"]
|
||||
|
||||
label = "Run matchmove script"
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ class AlembicModelLoader(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"abc"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Alembic"
|
||||
icon = "cube"
|
||||
color = "orange"
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ class LoadOcioLookNodes(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"json"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load OcioLook [nodes]"
|
||||
order = 0
|
||||
icon = "cc"
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ class LinkAsGroup(load.LoaderPlugin):
|
|||
representations = {"*"}
|
||||
extensions = {"nk"}
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
label = "Load Precomp"
|
||||
order = 0
|
||||
icon = "file"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class CollectBackdrops(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke"]
|
||||
families = ["nukenodes"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
self.log.debug(pformat(instance.data))
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class CollectContextData(pyblish.api.ContextPlugin):
|
|||
label = "Collect context data"
|
||||
hosts = ['nuke']
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context): # sourcery skip: avoid-builtin-shadow
|
||||
root_node = nuke.root()
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,7 @@ class CollectFramerate(pyblish.api.ContextPlugin):
|
|||
"nukeassist"
|
||||
]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context):
|
||||
context.data["fps"] = nuke.root()["fps"].getValue()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class CollectGizmo(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke"]
|
||||
families = ["gizmo"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
gizmo_node = instance.data["transientData"]["node"]
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class CollectRenderOnFarm(pyblish.api.ContextPlugin):
|
|||
label = "Collect Render On Farm"
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context):
|
||||
if not context.data.get("render_on_farm", False):
|
||||
return
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class CollectModel(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke"]
|
||||
families = ["model"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
geo_node = instance.data["transientData"]["node"]
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class CollectInstanceData(pyblish.api.InstancePlugin):
|
|||
label = "Collect Nuke Instance Data"
|
||||
hosts = ["nuke", "nukeassist"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
# presets
|
||||
sync_workfile_version_on_families = []
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ class CollectNukeReads(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke", "nukeassist"]
|
||||
families = ["source"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
self.log.debug("checking instance: {}".format(instance))
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ class CollectSlate(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke"]
|
||||
families = ["render"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
node = instance.data["transientData"]["node"]
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ class CollectWorkfile(pyblish.api.InstancePlugin):
|
|||
hosts = ['nuke']
|
||||
families = ["workfile"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance): # sourcery skip: avoid-builtin-shadow
|
||||
|
||||
script_data = instance.context.data["scriptData"]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ class CollectNukeWrites(pyblish.api.InstancePlugin,
|
|||
hosts = ["nuke", "nukeassist"]
|
||||
families = ["render", "prerender", "image"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
# cache
|
||||
_write_nodes = {}
|
||||
_frame_ranges = {}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class ExtractBackdropNode(publish.Extractor):
|
|||
hosts = ["nuke"]
|
||||
families = ["nukenodes"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
tmp_nodes = []
|
||||
child_nodes = instance.data["transientData"]["childNodes"]
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ class ExtractCamera(publish.Extractor):
|
|||
families = ["camera"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
# presets
|
||||
write_geo_knobs = [
|
||||
("file_type", "abc"),
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class ExtractGizmo(publish.Extractor):
|
|||
hosts = ["nuke"]
|
||||
families = ["gizmo"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
tmp_nodes = []
|
||||
orig_grpn = instance.data["transientData"]["node"]
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ class ExtractRenderOnFarm(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke"]
|
||||
families = ["render_on_farm"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
if not instance.context.data.get("render_on_farm", False):
|
||||
return
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ class ExtractModel(publish.Extractor):
|
|||
families = ["model"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
# presets
|
||||
write_geo_knobs = [
|
||||
("file_type", "abc"),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ class CreateOutputNode(pyblish.api.ContextPlugin):
|
|||
label = 'Output Node Create'
|
||||
order = pyblish.api.ExtractorOrder + 0.4
|
||||
families = ["workfile"]
|
||||
hosts = ['nuke']
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context):
|
||||
# capture selection state
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class ExtractOutputDirectory(pyblish.api.InstancePlugin):
|
|||
label = "Output Directory"
|
||||
optional = True
|
||||
|
||||
# targets = ["process"]
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class NukeRenderLocal(publish.Extractor,
|
|||
hosts = ["nuke"]
|
||||
families = ["render.local", "prerender.local", "image.local"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
child_nodes = (
|
||||
instance.data.get("transientData", {}).get("childNodes")
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ class ExtractReviewData(publish.Extractor):
|
|||
families = ["review"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
fpath = instance.data["path"]
|
||||
ext = os.path.splitext(fpath)[-1][1:]
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ class ExtractReviewDataLut(publish.Extractor):
|
|||
families = ["review"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
self.log.debug("Creating staging dir...")
|
||||
if "representations" in instance.data:
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ class ExtractReviewIntermediates(publish.Extractor):
|
|||
families = ["review"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
# presets
|
||||
viewer_lut_raw = None
|
||||
outputs = {}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ class ExtractScriptSave(pyblish.api.InstancePlugin):
|
|||
"""Save current Nuke workfile script"""
|
||||
label = 'Script Save'
|
||||
order = pyblish.api.ExtractorOrder - 0.1
|
||||
hosts = ['nuke']
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ class ExtractSlateFrame(publish.Extractor):
|
|||
families = ["slate"]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
# Settings values
|
||||
key_value_mapping = {
|
||||
"f_submission_note": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import nuke
|
||||
import pyblish.api
|
||||
|
||||
|
|
@ -10,7 +9,9 @@ class IncrementScriptVersion(pyblish.api.ContextPlugin):
|
|||
label = "Increment Script Version"
|
||||
optional = True
|
||||
families = ["workfile"]
|
||||
hosts = ['nuke']
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context):
|
||||
if not context.data.get("increment_script_version", True):
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ class RemoveOutputNode(pyblish.api.ContextPlugin):
|
|||
label = 'Output Node Remove'
|
||||
order = pyblish.api.IntegratorOrder + 0.4
|
||||
families = ["workfile"]
|
||||
hosts = ['nuke']
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context):
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class ValidateCorrectAssetContext(
|
|||
]
|
||||
optional = True
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
@classmethod
|
||||
def apply_settings(cls, project_settings):
|
||||
"""Apply deprecated settings from project settings.
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ class ValidateBackdrop(
|
|||
hosts = ["nuke"]
|
||||
actions = [SelectCenterInNodeGraph]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
return
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ class ValidateExposedKnobs(
|
|||
label = "Validate Exposed Knobs"
|
||||
actions = [RepairExposedKnobs]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
product_types_mapping = {
|
||||
"render": "CreateWriteRender",
|
||||
"prerender": "CreateWritePrerender",
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ class ValidateGizmo(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke"]
|
||||
actions = [OpenFailedGroupNode]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
grpn = instance.data["transientData"]["node"]
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ class ValidateKnobs(pyblish.api.ContextPlugin):
|
|||
actions = [RepairContextAction]
|
||||
optional = True
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
knobs = "{}"
|
||||
|
||||
def process(self, context):
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ class ValidateOutputResolution(
|
|||
hosts = ["nuke"]
|
||||
actions = [RepairAction]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
missing_msg = "Missing Reformat node in render group node"
|
||||
resolution_msg = "Reformat is set to wrong format"
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ class ValidateProxyMode(pyblish.api.ContextPlugin):
|
|||
hosts = ["nuke"]
|
||||
actions = [FixProxyMode]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, context):
|
||||
|
||||
rootNode = nuke.root()
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ class ValidateRenderedFrames(pyblish.api.InstancePlugin):
|
|||
hosts = ["nuke", "nukestudio"]
|
||||
actions = [RepairCollectionActionToLocal, RepairCollectionActionToFarm]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
node = instance.data["transientData"]["node"]
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ class ValidateScriptAttributes(
|
|||
optional = True
|
||||
actions = [RepairAction]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
return
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ class ValidateNukeWriteNode(
|
|||
actions = [RepairNukeWriteNodeAction]
|
||||
hosts = ["nuke"]
|
||||
|
||||
settings_category = "nuke"
|
||||
|
||||
def process(self, instance):
|
||||
if not self.is_active(instance.data):
|
||||
return
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
name = "nuke"
|
||||
title = "Nuke"
|
||||
version = "0.1.14"
|
||||
version = "0.2.0"
|
||||
|
||||
client_dir = "ayon_nuke"
|
||||
|
||||
ayon_required_addons = {
|
||||
"core": ">0.3.2",
|
||||
}
|
||||
ayon_compatible_addons = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue