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: <\/strong>some usefull Python snippets for Nuke.<\/p>\n<\/div><\/div>\nsnippet #1<\/strong><\/h6>\n<\/div><\/div>\n
.__author__ Boris Martinez\r\n\r\nimport nuke, re, math, os\r\n\r\ndef AutoReadFromWrite():\r\n\r\n try:\r\n n = nuke.selectedNode()\r\n\t\t\r\n except:\r\n \r\n m = nuke.message('select a WriteNode,dude')\r\n m.show()\r\n\telse:\r\n\t\tif n.Class() == 'Write':\r\n\t\t\t#fetching data from the write node\r\n p = n.knob('file').getValue()\r\n\t\t\tfstf = n.knob('first').getValue()\r\n\t\t\tlstf = n;knob('last').getValue()\r\n\t\t\tcolorspace = str(i.knob('colorspace').getValue()\r\n\t\t\t#fetching data from the write node\r\n r = nuke.createNode('Read')\r\n r.knob('file').setValue(p)\r\n\t\t\tr.knob('first').setValue(int(firstFrame))\r\n\t\t\tr.knob('last').setValue(int(lastFrame))\r\n\t\t\tr.knob('origfirst').setValue(int(firstFrame))\r\n\t\t\tr.knob('origlast').setValue(int(lastFrame))\r\n\t\t\tr.knob('colorspace').setValue(colorspace)\r\n\t\telse:\r\n\t\t\tm = nuke.message("Select a Write node, dude!")\r\n\t\t\r\n\t\t\r\n AutoReadFromWrite()\r\n<\/pre><\/div><\/div>\n<\/div><\/div>\n<\/div>\n
snippet #2<\/strong><\/h6>\n<\/div><\/div>\n
.__author__ Boris Martinez\r\n\r\nimport nuke,os\r\n\r\ndef AutoExploreFromRead():\r\n \r\n try:\r\n n = nuke.selectedNode()\r\n f = n.knob("file").getValue()\r\n p = os.path.dirname(f)\r\n print "path is %s" %p\r\n os.startfile(p)\r\n except:\r\n p = nuke.message("no file selected")\r\n p.show()\r\n print "no file selected"\r\n\r\nAutoExploreFromRead()<\/pre><\/div><\/div>\n
snippet #3<\/strong><\/h6>\n<\/div><\/div>\n
.__author__ Boris Martinez\r\n\r\nimport nuke\r\nimport random\r\nimport nukescripts\r\n\r\n\r\ndef lightRandomizer(m,i,o):\r\n try:\r\n nodes = nuke.selectedNodes()\r\n variation = None\r\n for light in nodes:\r\n for e in range(i,o):\r\n variation = random.randrange(1,5)\r\n if light.Class() == "Light2":\r\n\r\n light['intensity'].setAnimated()\r\n light['intensity'].setValueAt(variation * m,e)\r\n except:\r\n ep = nuke.message("No nodes selected")\r\n ep.show()\r\n\r\ndef lightRandExpression():\r\n nodes = nuke.selectedNodes()\r\n variation = None\r\n for light in nodes:\r\n variation = random.randrange(1,5)\r\n if light.Class() == "Light2":\r\n light['intensity'].setExpression("random(frame)")\r\n light['intensity'].setAnimated()\r\n\r\n#creating the panel for introducing a multiplicator and launching the lightRandomizer function\r\n\r\nclass modalPanel(nukescripts.PythonPanel):\r\n\r\n def __init__(self):\r\n nukescripts.PythonPanel.__init__(self,"multiplier")\r\n self.m = nuke.Double_Knob("intensity multiplier", "intensity multiplier: ")\r\n self.addKnob( self.m )\r\n self.fRange = nuke.String_Knob('fRange', 'Animation Range', '%s-%s' % (nuke.root().firstFrame(), nuke.root().lastFrame()))\r\n self.addKnob(self.fRange)\r\n\r\n def showModalDialog( self ):\r\n nukescripts.PythonPanel.showModalDialog(self)\r\n\r\n def giveMultValue(self):\r\n return self.m.getValue()\r\n\r\n def giveFrameRangeValue(self):\r\n return self.fRange.getValue()\r\n\r\n#wrapper function\r\n\r\ndef lightRandmWrapper():\r\n panel = modalPanel() # an instance from the modalPanel Class\r\n show = panel.showModalDialog()\r\n multiplier = panel.giveMultValue()\r\n frameRange = panel.giveFrameRangeValue()\r\n frameRangeSplitted = frameRange.split("-")\r\n ini = int(frameRangeSplitted[0])\r\n fin = int(frameRangeSplitted[-1])\r\n\r\n #print "frameRange is: ", frameRange\r\n #print type(frameRange)\r\n\r\n lightRandomizer(multiplier,ini,fin)\r\n #p = nuke.message (" Boris says: lights randomized, cool!")\r\n #p.show()\r\n\r\nlightRandmWrapper()\r\n#lightRandExpression\r\n\r\n<\/pre><\/div><\/div>\n<\/div><\/div>\n<\/div>\n