cycloneslider
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/wacggq0abkde/public_html/wp-includes/functions.php on line 6114cartel
domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init
action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home2/wacggq0abkde/public_html/wp-includes/functions.php on line 6114tl;dr: some usefull Python snippets for Nuke.
.__author__ Boris Martinez import nuke, re, math, os def AutoReadFromWrite(): try: n = nuke.selectedNode() except: m = nuke.message('select a WriteNode,dude') m.show() else: if n.Class() == 'Write': #fetching data from the write node p = n.knob('file').getValue() fstf = n.knob('first').getValue() lstf = n;knob('last').getValue() colorspace = str(i.knob('colorspace').getValue() #fetching data from the write node r = nuke.createNode('Read') r.knob('file').setValue(p) r.knob('first').setValue(int(firstFrame)) r.knob('last').setValue(int(lastFrame)) r.knob('origfirst').setValue(int(firstFrame)) r.knob('origlast').setValue(int(lastFrame)) r.knob('colorspace').setValue(colorspace) else: m = nuke.message("Select a Write node, dude!") AutoReadFromWrite()
.__author__ Boris Martinez import nuke,os def AutoExploreFromRead(): try: n = nuke.selectedNode() f = n.knob("file").getValue() p = os.path.dirname(f) print "path is %s" %p os.startfile(p) except: p = nuke.message("no file selected") p.show() print "no file selected" AutoExploreFromRead()
.__author__ Boris Martinez import nuke import random import nukescripts def lightRandomizer(m,i,o): try: nodes = nuke.selectedNodes() variation = None for light in nodes: for e in range(i,o): variation = random.randrange(1,5) if light.Class() == "Light2": light['intensity'].setAnimated() light['intensity'].setValueAt(variation * m,e) except: ep = nuke.message("No nodes selected") ep.show() def lightRandExpression(): nodes = nuke.selectedNodes() variation = None for light in nodes: variation = random.randrange(1,5) if light.Class() == "Light2": light['intensity'].setExpression("random(frame)") light['intensity'].setAnimated() #creating the panel for introducing a multiplicator and launching the lightRandomizer function class modalPanel(nukescripts.PythonPanel): def __init__(self): nukescripts.PythonPanel.__init__(self,"multiplier") self.m = nuke.Double_Knob("intensity multiplier", "intensity multiplier: ") self.addKnob( self.m ) self.fRange = nuke.String_Knob('fRange', 'Animation Range', '%s-%s' % (nuke.root().firstFrame(), nuke.root().lastFrame())) self.addKnob(self.fRange) def showModalDialog( self ): nukescripts.PythonPanel.showModalDialog(self) def giveMultValue(self): return self.m.getValue() def giveFrameRangeValue(self): return self.fRange.getValue() #wrapper function def lightRandmWrapper(): panel = modalPanel() # an instance from the modalPanel Class show = panel.showModalDialog() multiplier = panel.giveMultValue() frameRange = panel.giveFrameRangeValue() frameRangeSplitted = frameRange.split("-") ini = int(frameRangeSplitted[0]) fin = int(frameRangeSplitted[-1]) #print "frameRange is: ", frameRange #print type(frameRange) lightRandomizer(multiplier,ini,fin) #p = nuke.message (" Boris says: lights randomized, cool!") #p.show() lightRandmWrapper() #lightRandExpression