mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
working on plugins for nuke
This commit is contained in:
parent
4d031f6b86
commit
1820373b53
6 changed files with 9 additions and 12 deletions
|
|
@ -10,7 +10,9 @@ class CrateWriteExr(avalon.api.Creator):
|
|||
hosts = ["nuke"]
|
||||
family = "write"
|
||||
icon = "sign-out"
|
||||
|
||||
# TODO: create container of metadata into user knob
|
||||
# TODO: if write node selected it will add metadata
|
||||
|
||||
# def __init__(self, *args, **kwargs):
|
||||
# super(CrateWriteExr, self).__init__(*args, **kwargs)
|
||||
# self.data.setdefault("subset", "this")
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
import pyblish.api
|
||||
|
||||
|
||||
class CollectCurrentFile(pyblish.api.ContextPlugin):
|
||||
class SelectCurrentFile(pyblish.api.ContextPlugin):
|
||||
"""Inject the current working file into context"""
|
||||
|
||||
order = pyblish.api.CollectorOrder - 0.1
|
||||
label = "Collect Current File"
|
||||
order = pyblish.api.CollectorOrder
|
||||
hosts = ["nuke"]
|
||||
families = ["workfile"]
|
||||
|
||||
def process(self, context):
|
||||
import os
|
||||
import nuke
|
||||
current_file = nuke.root().name()
|
||||
|
||||
normalised = os.path.normpath(current_file)
|
||||
|
||||
context.data["current_file"] = normalised
|
||||
context.data["currentFile"] = normalised
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ class CollectNukeWrites(pyblish.api.ContextPlugin):
|
|||
knob.setValue(False)
|
||||
node.addKnob(knob)
|
||||
|
||||
value = bool(node["render_local"].getValue())
|
||||
|
||||
# Compare against selection
|
||||
selection = instance.context.data.get("selection", [])
|
||||
if selection:
|
||||
|
|
@ -73,11 +71,8 @@ class CollectNukeWrites(pyblish.api.ContextPlugin):
|
|||
else:
|
||||
value = False
|
||||
|
||||
def instanceToggled(instance, value):
|
||||
instance[0]["render_local"].setValue(value)
|
||||
|
||||
instance.data.update({
|
||||
"instanceToggled": instanceToggled,
|
||||
"asset": os.environ["AVALON_ASSET"], # todo: not a constant
|
||||
"path": nuke.filename(node),
|
||||
"subset": subset,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class CollectNukeRenderMode(pyblish.api.InstancePlugin):
|
|||
order = pyblish.api.CollectorOrder + 0.4
|
||||
label = "Collect Render Mode"
|
||||
hosts = ["nuke"]
|
||||
families = ["write", "render"]
|
||||
families = ["write", "render.local"]
|
||||
|
||||
def process(self, instance):
|
||||
"""Collect all image sequence tools"""
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ class ExtractScriptSave(pyblish.api.Extractor):
|
|||
label = 'Script Save'
|
||||
order = pyblish.api.Extractor.order - 0.45
|
||||
hosts = ['nuke']
|
||||
families = ['script']
|
||||
|
||||
def process(self, instance):
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue