Merge branch 'develop' into enhancement/AY-5269_Nuke--Publish-intermediate-files-publish-isIntermediate

This commit is contained in:
Jakub Jezek 2024-05-28 12:14:55 +02:00
commit 75f0abc722
No known key found for this signature in database
GPG key ID: 06DBD609ADF27FD9
198 changed files with 308 additions and 143 deletions

View file

@ -52,9 +52,12 @@ IGNORED_MODULES_IN_AYON = set()
MOVED_ADDON_MILESTONE_VERSIONS = {
"applications": VersionInfo(0, 2, 0),
"clockify": VersionInfo(0, 2, 0),
"traypublisher": VersionInfo(0, 2, 0),
"tvpaint": VersionInfo(0, 2, 0),
"nuke": VersionInfo(0, 2, 0),
}
# Inherit from `object` for Python 2 hosts
class _ModuleClass(object):
"""Fake module class for storing AYON addons.

View file

@ -107,7 +107,10 @@ class VersionDelegate(QtWidgets.QStyledItemDelegate):
style = QtWidgets.QApplication.style()
style.drawControl(
style.CE_ItemViewItem, option, painter, option.widget
QtWidgets.QCommonStyle.CE_ItemViewItem,
option,
painter,
option.widget
)
painter.save()
@ -119,9 +122,14 @@ class VersionDelegate(QtWidgets.QStyledItemDelegate):
pen.setColor(fg_color)
painter.setPen(pen)
text_rect = style.subElementRect(style.SE_ItemViewItemText, option)
text_rect = style.subElementRect(
QtWidgets.QCommonStyle.SE_ItemViewItemText,
option
)
text_margin = style.proxy().pixelMetric(
style.PM_FocusFrameHMargin, option, option.widget
QtWidgets.QCommonStyle.PM_FocusFrameHMargin,
option,
option.widget
) + 1
painter.drawText(
@ -207,14 +215,22 @@ class StatusDelegate(QtWidgets.QStyledItemDelegate):
style = QtWidgets.QApplication.style()
style.drawControl(
style.CE_ItemViewItem, option, painter, option.widget
QtWidgets.QCommonStyle.CE_ItemViewItem,
option,
painter,
option.widget
)
painter.save()
text_rect = style.subElementRect(style.SE_ItemViewItemText, option)
text_rect = style.subElementRect(
QtWidgets.QCommonStyle.SE_ItemViewItemText,
option
)
text_margin = style.proxy().pixelMetric(
style.PM_FocusFrameHMargin, option, option.widget
QtWidgets.QCommonStyle.PM_FocusFrameHMargin,
option,
option.widget
) + 1
padded_text_rect = text_rect.adjusted(
text_margin, 0, - text_margin, 0

View file

@ -354,7 +354,7 @@ def imprint(node, data, tab=None):
Examples:
```
import nuke
from ayon_core.hosts.nuke.api import lib
from ayon_nuke.api import lib
node = nuke.createNode("NoOp")
data = {
@ -419,7 +419,7 @@ def add_publish_knob(node):
return node
@deprecated("ayon_core.hosts.nuke.api.lib.set_node_data")
@deprecated("ayon_nuke.api.lib.set_node_data")
def set_avalon_knob_data(node, data=None, prefix="avalon:"):
"""[DEPRECATED] Sets data into nodes's avalon knob
@ -485,7 +485,7 @@ def set_avalon_knob_data(node, data=None, prefix="avalon:"):
return node
@deprecated("ayon_core.hosts.nuke.api.lib.get_node_data")
@deprecated("ayon_nuke.api.lib.get_node_data")
def get_avalon_knob_data(node, prefix="avalon:", create=True):
"""[DEPRECATED] Gets a data from nodes's avalon knob
@ -1028,7 +1028,7 @@ def add_button_render_on_farm(node):
name = "renderOnFarm"
label = "Render On Farm"
value = (
"from ayon_core.hosts.nuke.api.utils import submit_render_on_farm;"
"from ayon_nuke.api.utils import submit_render_on_farm;"
"submit_render_on_farm(nuke.thisNode())"
)
knob = nuke.PyScript_Knob(name, label, value)
@ -2469,7 +2469,7 @@ def _launch_workfile_app():
host_tools.show_workfiles(parent=None, on_top=True)
@deprecated("ayon_core.hosts.nuke.api.lib.start_workfile_template_builder")
@deprecated("ayon_nuke.api.lib.start_workfile_template_builder")
def process_workfile_builder():
""" [DEPRECATED] Process workfile builder on nuke start

View file

@ -28,7 +28,7 @@ from ayon_core.pipeline import (
)
from ayon_core.pipeline.workfile import BuildWorkfile
from ayon_core.tools.utils import host_tools
from ayon_core.hosts.nuke import NUKE_ROOT_DIR
from ayon_nuke import NUKE_ROOT_DIR
from ayon_core.tools.workfile_template_build import open_template_ui
from .lib import (
@ -188,10 +188,10 @@ def reload_config():
"""
for module in (
"ayon_core.hosts.nuke.api.actions",
"ayon_core.hosts.nuke.api.menu",
"ayon_core.hosts.nuke.api.plugin",
"ayon_core.hosts.nuke.api.lib",
"ayon_nuke.api.actions",
"ayon_nuke.api.menu",
"ayon_nuke.api.plugin",
"ayon_nuke.api.lib",
):
log.info("Reloading module: {}...".format(module))

View file

@ -1049,7 +1049,7 @@ def convert_to_valid_instaces():
}
return mapping[product_type]
from ayon_core.hosts.nuke.api import workio
from ayon_nuke.api import workio
task_name = get_current_task_name()

View file

@ -1,12 +1,12 @@
from ayon_core.pipeline import AYON_INSTANCE_ID, AVALON_INSTANCE_ID
from ayon_core.pipeline.create.creator_plugins import ProductConvertorPlugin
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
INSTANCE_DATA_KNOB,
get_node_data,
get_avalon_knob_data,
NODE_TAB_NAME,
)
from ayon_core.hosts.nuke.api.plugin import convert_to_valid_instaces
from ayon_nuke.api.plugin import convert_to_valid_instaces
import nuke

View file

@ -1,6 +1,6 @@
from nukescripts import autoBackdrop
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
NukeCreator,
maintained_selection,
select_nodes
@ -10,6 +10,8 @@ from ayon_core.hosts.nuke.api import (
class CreateBackdrop(NukeCreator):
"""Add Publishable Backdrop"""
settings_category = "nuke"
identifier = "create_backdrop"
label = "Nukenodes (backdrop)"
product_type = "nukenodes"

View file

@ -1,10 +1,10 @@
import nuke
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
NukeCreator,
NukeCreatorError,
maintained_selection
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
create_camera_node_by_version
)
@ -12,6 +12,8 @@ from ayon_core.hosts.nuke.api.lib import (
class CreateCamera(NukeCreator):
"""Add Publishable Camera"""
settings_category = "nuke"
identifier = "create_camera"
label = "Camera (3d)"
product_type = "camera"

View file

@ -1,5 +1,5 @@
import nuke
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
NukeCreator,
NukeCreatorError,
maintained_selection
@ -9,6 +9,8 @@ from ayon_core.hosts.nuke.api import (
class CreateGizmo(NukeCreator):
"""Add Publishable Group as gizmo"""
settings_category = "nuke"
identifier = "create_gizmo"
label = "Gizmo (group)"
product_type = "gizmo"

View file

@ -1,5 +1,5 @@
import nuke
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
NukeCreator,
NukeCreatorError,
maintained_selection
@ -9,6 +9,8 @@ from ayon_core.hosts.nuke.api import (
class CreateModel(NukeCreator):
"""Add Publishable Camera"""
settings_category = "nuke"
identifier = "create_model"
label = "Model (3d)"
product_type = "model"

View file

@ -1,7 +1,7 @@
import nuke
import six
import sys
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
INSTANCE_DATA_KNOB,
NukeCreator,
NukeCreatorError,
@ -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"

View file

@ -11,11 +11,14 @@ from ayon_core.lib import (
UISeparatorDef,
EnumDef
)
from ayon_core.hosts.nuke import api as napi
from ayon_core.hosts.nuke.api.plugin import exposed_write_knobs
from ayon_nuke import api as napi
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"

View file

@ -8,11 +8,14 @@ from ayon_core.pipeline import (
from ayon_core.lib import (
BoolDef
)
from ayon_core.hosts.nuke import api as napi
from ayon_core.hosts.nuke.api.plugin import exposed_write_knobs
from ayon_nuke import api as napi
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"

View file

@ -8,11 +8,14 @@ from ayon_core.pipeline import (
from ayon_core.lib import (
BoolDef
)
from ayon_core.hosts.nuke import api as napi
from ayon_core.hosts.nuke.api.plugin import exposed_write_knobs
from ayon_nuke import api as napi
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"

View file

@ -1,11 +1,11 @@
import ayon_api
import ayon_core.hosts.nuke.api as api
import ayon_nuke.api as api
from ayon_core.pipeline import (
AutoCreator,
CreatedInstance,
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
INSTANCE_DATA_KNOB,
set_node_data
)
@ -13,6 +13,9 @@ import nuke
class WorkfileCreator(AutoCreator):
settings_category = "nuke"
identifier = "workfile"
product_type = "workfile"

View file

@ -1,6 +1,6 @@
from ayon_core.lib import Logger
from ayon_core.pipeline import InventoryAction
from ayon_core.hosts.nuke.api.lib import set_avalon_knob_data
from ayon_nuke.api.lib import set_avalon_knob_data
class RepairOldLoaders(InventoryAction):

View file

@ -1,5 +1,5 @@
from ayon_core.pipeline import InventoryAction
from ayon_core.hosts.nuke.api.command import viewer_update_and_undo_stop
from ayon_nuke.api.command import viewer_update_and_undo_stop
class SelectContainers(InventoryAction):

View file

@ -4,7 +4,7 @@
from ayon_core.lib import Logger
from ayon_core.pipeline import load
from ayon_core.hosts.nuke.api import lib
from ayon_nuke.api import lib
log = Logger.get_logger(__name__)

View file

@ -6,7 +6,7 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
find_free_space_to_paste_nodes,
maintained_selection,
reset_selection,
@ -14,8 +14,8 @@ from ayon_core.hosts.nuke.api.lib import (
get_avalon_knob_data,
set_avalon_knob_data
)
from ayon_core.hosts.nuke.api.command import viewer_update_and_undo_stop
from ayon_core.hosts.nuke.api import containerise, update_container
from ayon_nuke.api.command import viewer_update_and_undo_stop
from ayon_nuke.api import containerise, update_container
class LoadBackdropNodes(load.LoaderPlugin):
@ -25,6 +25,8 @@ class LoadBackdropNodes(load.LoaderPlugin):
representations = {"*"}
extensions = {"nk"}
settings_category = "nuke"
label = "Import Nuke Nodes"
order = 0
icon = "eye"

View file

@ -5,12 +5,12 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
maintained_selection
)
@ -24,6 +24,8 @@ class AlembicCameraLoader(load.LoaderPlugin):
representations = {"*"}
extensions = {"abc"}
settings_category = "nuke"
label = "Load Alembic Camera"
icon = "camera"
color = "orange"

View file

@ -12,11 +12,11 @@ from ayon_core.pipeline.colorspace import (
get_imageio_file_rules_colorspace_from_filepath,
get_current_context_imageio_config_preset,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
get_imageio_input_colorspace,
maintained_selection
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop,
@ -26,7 +26,7 @@ from ayon_core.lib.transcoding import (
VIDEO_EXTENSIONS,
IMAGE_EXTENSIONS
)
from ayon_core.hosts.nuke.api import plugin
from ayon_nuke.api import plugin
class LoadClip(plugin.NukeLoader):
@ -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"
@ -61,7 +63,8 @@ class LoadClip(plugin.NukeLoader):
# option gui
options_defaults = {
"start_at_workfile": True,
"add_retime": True
"add_retime": True,
"deep_exr": False
}
node_name_template = "{class_name}_{ext}"
@ -78,6 +81,11 @@ class LoadClip(plugin.NukeLoader):
"add_retime",
help="Load with retime",
default=cls.options_defaults["add_retime"]
),
qargparse.Boolean(
"deep_exr",
help="Read with deep exr",
default=cls.options_defaults["deep_exr"]
)
]
@ -113,6 +121,9 @@ class LoadClip(plugin.NukeLoader):
add_retime = options.get(
"add_retime", self.options_defaults["add_retime"])
deep_exr = options.get(
"deep_exr", self.options_defaults["deep_exr"])
repre_id = repre_entity["id"]
self.log.debug(
@ -153,13 +164,21 @@ class LoadClip(plugin.NukeLoader):
return
read_name = self._get_node_name(context)
# Create the Loader with the filename path set
read_node = nuke.createNode(
"Read",
"name {}".format(read_name),
inpanel=False
)
read_node = None
if deep_exr:
# Create the Loader with the filename path set
read_node = nuke.createNode(
"DeepRead",
"name {}".format(read_name),
inpanel=False
)
else:
# Create the Loader with the filename path set
read_node = nuke.createNode(
"Read",
"name {}".format(read_name),
inpanel=False
)
# get colorspace
colorspace = (
@ -171,14 +190,14 @@ class LoadClip(plugin.NukeLoader):
# we will switch off undo-ing
with viewer_update_and_undo_stop():
read_node["file"].setValue(filepath)
self.set_colorspace_to_node(
read_node,
filepath,
project_name,
version_entity,
repre_entity
)
if read_node.Class() == "Read":
self.set_colorspace_to_node(
read_node,
filepath,
project_name,
version_entity,
repre_entity
)
self._set_range_to_node(
read_node, first, last, start_at_workfile, slate_frames
@ -328,13 +347,14 @@ class LoadClip(plugin.NukeLoader):
# to avoid multiple undo steps for rest of process
# we will switch off undo-ing
with viewer_update_and_undo_stop():
self.set_colorspace_to_node(
read_node,
filepath,
project_name,
version_entity,
repre_entity
)
if read_node.Class() == "Read":
self.set_colorspace_to_node(
read_node,
filepath,
project_name,
version_entity,
repre_entity
)
self._set_range_to_node(read_node, first, last, start_at_workfile)

View file

@ -8,7 +8,7 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -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

View file

@ -8,8 +8,8 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api import lib
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import lib
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -23,6 +23,8 @@ class LoadEffectsInputProcess(load.LoaderPlugin):
representations = {"*"}
extensions = {"json"}
settings_category = "nuke"
label = "Load Effects - Input Process"
order = 0
icon = "eye"

View file

@ -5,13 +5,13 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
maintained_selection,
get_avalon_knob_data,
set_avalon_knob_data,
swap_node_with_dependency,
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -25,6 +25,8 @@ class LoadGizmo(load.LoaderPlugin):
representations = {"*"}
extensions = {"nk"}
settings_category = "nuke"
label = "Load Gizmo"
order = 0
icon = "dropbox"

View file

@ -6,14 +6,14 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
maintained_selection,
create_backdrop,
get_avalon_knob_data,
set_avalon_knob_data,
swap_node_with_dependency,
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -27,6 +27,8 @@ class LoadGizmoInputProcess(load.LoaderPlugin):
representations = {"*"}
extensions = {"nk"}
settings_category = "nuke"
label = "Load Gizmo - Input Process"
order = 0
icon = "eye"

View file

@ -7,10 +7,10 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
get_imageio_input_colorspace
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -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

View file

@ -11,6 +11,8 @@ class MatchmoveLoader(load.LoaderPlugin):
representations = {"*"}
extensions = {"py"}
settings_category = "nuke"
defaults = ["Camera", "Object"]
label = "Run matchmove script"

View file

@ -5,8 +5,8 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api.lib import maintained_selection
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api.lib import maintained_selection
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -22,6 +22,8 @@ class AlembicModelLoader(load.LoaderPlugin):
representations = {"*"}
extensions = {"abc"}
settings_category = "nuke"
label = "Load Alembic"
icon = "cube"
color = "orange"

View file

@ -10,7 +10,7 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
containerise,
viewer_update_and_undo_stop,
update_container,
@ -24,6 +24,8 @@ class LoadOcioLookNodes(load.LoaderPlugin):
representations = {"*"}
extensions = {"json"}
settings_category = "nuke"
label = "Load OcioLook [nodes]"
order = 0
icon = "cc"

View file

@ -5,8 +5,8 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.nuke.api.lib import get_avalon_knob_data
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api.lib import get_avalon_knob_data
from ayon_nuke.api import (
containerise,
update_container,
viewer_update_and_undo_stop
@ -20,6 +20,8 @@ class LinkAsGroup(load.LoaderPlugin):
representations = {"*"}
extensions = {"nk"}
settings_category = "nuke"
label = "Load Precomp"
order = 0
icon = "file"

View file

@ -1,6 +1,6 @@
from pprint import pformat
import pyblish.api
from ayon_core.hosts.nuke.api import lib as pnlib
from ayon_nuke.api import lib as pnlib
import nuke
@ -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))

View file

@ -2,7 +2,7 @@ import os
import nuke
import pyblish.api
from ayon_core.lib import get_version_from_path
import ayon_core.hosts.nuke.api as napi
import ayon_nuke.api as napi
from ayon_core.pipeline import KnownPublishError
@ -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()

View file

@ -13,5 +13,7 @@ class CollectFramerate(pyblish.api.ContextPlugin):
"nukeassist"
]
settings_category = "nuke"
def process(self, context):
context.data["fps"] = nuke.root()["fps"].getValue()

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
import os
import nuke
import pyblish.api
from ayon_core.hosts.nuke import api as napi
from ayon_nuke import api as napi
from ayon_core.pipeline import publish
@ -14,6 +14,8 @@ class CollectNukeWrites(pyblish.api.InstancePlugin,
hosts = ["nuke", "nukeassist"]
families = ["render", "prerender", "image"]
settings_category = "nuke"
# cache
_write_nodes = {}
_frame_ranges = {}

View file

@ -5,7 +5,7 @@ import nuke
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
maintained_selection,
reset_selection,
select_nodes
@ -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"]

View file

@ -6,7 +6,7 @@ import nuke
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api.lib import maintained_selection
from ayon_nuke.api.lib import maintained_selection
class ExtractCamera(publish.Extractor):
@ -17,6 +17,8 @@ class ExtractCamera(publish.Extractor):
families = ["camera"]
hosts = ["nuke"]
settings_category = "nuke"
# presets
write_geo_knobs = [
("file_type", "abc"),

View file

@ -4,8 +4,8 @@ import nuke
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api import utils as pnutils
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api import utils as pnutils
from ayon_nuke.api.lib import (
maintained_selection,
reset_selection,
select_nodes
@ -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"]

View file

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

View file

@ -4,7 +4,7 @@ import nuke
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
maintained_selection,
select_nodes
)
@ -18,6 +18,8 @@ class ExtractModel(publish.Extractor):
families = ["model"]
hosts = ["nuke"]
settings_category = "nuke"
# presets
write_geo_knobs = [
("file_type", "abc"),

View file

@ -1,6 +1,6 @@
import nuke
import pyblish.api
from ayon_core.hosts.nuke.api.lib import maintained_selection
from ayon_nuke.api.lib import maintained_selection
class CreateOutputNode(pyblish.api.ContextPlugin):
@ -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

View file

@ -10,7 +10,7 @@ class ExtractOutputDirectory(pyblish.api.InstancePlugin):
label = "Output Directory"
optional = True
# targets = ["process"]
settings_category = "nuke"
def process(self, instance):

View file

@ -4,7 +4,7 @@ import shutil
import pyblish.api
import clique
import nuke
from ayon_core.hosts.nuke import api as napi
from ayon_nuke import api as napi
from ayon_core.pipeline import publish
from ayon_core.lib import collect_frames
@ -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")

View file

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

View file

@ -2,8 +2,8 @@ import os
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api import plugin
from ayon_core.hosts.nuke.api.lib import maintained_selection
from ayon_nuke.api import plugin
from ayon_nuke.api.lib import maintained_selection
class ExtractReviewDataLut(publish.Extractor):
@ -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:

View file

@ -4,8 +4,8 @@ from pprint import pformat
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api import plugin
from ayon_core.hosts.nuke.api.lib import maintained_selection
from ayon_nuke.api import plugin
from ayon_nuke.api.lib import maintained_selection
class ExtractReviewIntermediates(publish.Extractor):
@ -22,6 +22,8 @@ class ExtractReviewIntermediates(publish.Extractor):
families = ["review"]
hosts = ["nuke"]
settings_category = "nuke"
# presets
viewer_lut_raw = None
outputs = {}

View file

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

View file

@ -7,7 +7,7 @@ import pyblish.api
import six
from ayon_core.pipeline import publish
from ayon_core.hosts.nuke.api import (
from ayon_nuke.api import (
maintained_selection,
duplicate_node,
get_view_process_node
@ -27,6 +27,8 @@ class ExtractSlateFrame(publish.Extractor):
families = ["slate"]
hosts = ["nuke"]
settings_category = "nuke"
# Settings values
key_value_mapping = {
"f_submission_note": {

View file

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

View file

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

View file

@ -10,7 +10,7 @@ from ayon_core.pipeline.publish import (
PublishXmlValidationError,
OptionalPyblishPluginMixin
)
from ayon_core.hosts.nuke.api import SelectInstanceNodeAction
from ayon_nuke.api import SelectInstanceNodeAction
class ValidateCorrectAssetContext(
@ -34,6 +34,8 @@ class ValidateCorrectAssetContext(
]
optional = True
settings_category = "nuke"
@classmethod
def apply_settings(cls, project_settings):
"""Apply deprecated settings from project settings.

View file

@ -1,6 +1,6 @@
import nuke
import pyblish
from ayon_core.hosts.nuke import api as napi
from ayon_nuke import api as napi
from ayon_core.pipeline.publish import (
ValidateContentsOrder,
@ -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

View file

@ -1,7 +1,7 @@
import pyblish.api
from ayon_core.pipeline.publish import get_errored_instances_from_context
from ayon_core.hosts.nuke.api.lib import link_knobs
from ayon_nuke.api.lib import link_knobs
from ayon_core.pipeline.publish import (
OptionalPyblishPluginMixin,
PublishValidationError
@ -52,6 +52,9 @@ class ValidateExposedKnobs(
label = "Validate Exposed Knobs"
actions = [RepairExposedKnobs]
hosts = ["nuke"]
settings_category = "nuke"
product_types_mapping = {
"render": "CreateWriteRender",
"prerender": "CreateWritePrerender",

View file

@ -1,6 +1,6 @@
import pyblish
from ayon_core.pipeline import PublishXmlValidationError
from ayon_core.hosts.nuke import api as napi
from ayon_nuke import api as napi
import nuke
@ -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"]

View file

@ -32,6 +32,8 @@ class ValidateKnobs(pyblish.api.ContextPlugin):
actions = [RepairContextAction]
optional = True
settings_category = "nuke"
knobs = "{}"
def process(self, context):

View file

@ -1,6 +1,6 @@
import pyblish.api
from ayon_core.hosts.nuke import api as napi
from ayon_nuke import api as napi
from ayon_core.pipeline.publish import RepairAction
from ayon_core.pipeline import (
PublishXmlValidationError,
@ -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"

View file

@ -25,6 +25,8 @@ class ValidateProxyMode(pyblish.api.ContextPlugin):
hosts = ["nuke"]
actions = [FixProxyMode]
settings_category = "nuke"
def process(self, context):
rootNode = nuke.root()

View file

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

View file

@ -5,7 +5,7 @@ from ayon_core.pipeline import (
OptionalPyblishPluginMixin
)
from ayon_core.pipeline.publish import RepairAction
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
WorkfileSettings
)
@ -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

View file

@ -2,7 +2,7 @@ from collections import defaultdict
import pyblish.api
from ayon_core.pipeline.publish import get_errored_instances_from_context
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
get_write_node_template_attr,
set_node_knobs_from_settings,
color_gui_to_int
@ -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

View file

@ -4,7 +4,7 @@ from ayon_core.pipeline.workfile.workfile_template_builder import (
CreatePlaceholderItem,
PlaceholderCreateMixin,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
find_free_space_to_paste_nodes,
get_extreme_positions,
get_group_io_nodes,
@ -18,7 +18,7 @@ from ayon_core.hosts.nuke.api.lib import (
duplicate_node,
node_tempfile,
)
from ayon_core.hosts.nuke.api.workfile_template_builder import (
from ayon_nuke.api.workfile_template_builder import (
NukePlaceholderPlugin
)

View file

@ -4,7 +4,7 @@ from ayon_core.pipeline.workfile.workfile_template_builder import (
LoadPlaceholderItem,
PlaceholderLoadMixin,
)
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
find_free_space_to_paste_nodes,
get_extreme_positions,
get_group_io_nodes,
@ -18,7 +18,7 @@ from ayon_core.hosts.nuke.api.lib import (
duplicate_node,
node_tempfile,
)
from ayon_core.hosts.nuke.api.workfile_template_builder import (
from ayon_nuke.api.workfile_template_builder import (
NukePlaceholderPlugin
)

View file

@ -3,7 +3,7 @@ import os
import nuke
import nukescripts
from ayon_core.pipeline import Anatomy, get_current_project_name
from ayon_core.hosts.nuke.api.lib import (
from ayon_nuke.api.lib import (
set_node_knobs_from_settings,
get_nuke_imageio_settings
)

View file

@ -1,5 +1,5 @@
from ayon_core.pipeline import install_host
from ayon_core.hosts.nuke.api import NukeHost
from ayon_nuke.api import NukeHost
host = NukeHost()
install_host(host)

Some files were not shown because too many files have changed in this diff Show more