Not sure if this is relevent at all but you can have argument variables inside 
a nuke script that you can send values to externally such as through a .bat 
file or what we do is sumbit bundles of nuke scripts to backburner with 
arguments. We use it to send whole directories of 360 panorama render into nuke 
scripts which have a grade on them and it spits them all out as rectilinear box 
mapped panos in two different sizes. All we send it is which .exr file is being 
read in but in this case hundreds in a project.

All your blur nodes could have the arg val for its blur amount sent through to 
it. May not be a good option for you if you need to work live in the script as 
well as the arg val causes a no value error while you're working in it.

Dave

________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Hugo Léveillé
Sent: Thursday, 8 November 2012 7:27 PM
To: PYTHON (nuke) discussion
Subject: Re: [Nuke-python] Experience: Batch editing of many Nuke-Scripts

Way 3 might be trickier to do if you have multiple nodes in the scripts. You 
have to search for "value 10" but other node class could also have that. I 
dunno how complex is your script so I can't tell.

With way 3, you can at least target a specific node class and then also search 
for the specific value. If you really only have one Blur, its not a problem. 
But if you have multiple, you have to be carefull. Is the node you are 
searching for always named the same ex("Blur1") ? If not, and if you have 
multiple Blur node in your script, I think you'll need to be really carefull pn 
that 1000+ script operation

But I am sure someone will come with a clever solution

On Thu, Nov 8, 2012, at 2:07, chrissowa wrote:
I just wanted to ask what is the best way to batch edit nodes in many 
nuke-scripts.

Just a simplified theoretical example.:
You got a project (1000 Shots) and every shot has a final nuke script. This 
nuke script consists of: read -> blur -> write
The Blur-size is set to 10.

Now i want to increase the blur for all shots on 20.

Possible ways i see to achieve this by scripting:

* open every nuke script in "terminal mode" with python parameters that change 
the value
* run a function in GUI nuke that opens the first script, changes the value, 
saves it and goes on with the next script. all in one nuke window
* edit the *.nk-files like with an texteditor programmatically and change the 
values in the nuke file itself

So my questions are:

* Are there any other (better) ways to do batch editing?
* What speaks against or for my different possibilities? What way would you 
prefer?
* I ve never used way 1 or 3 but the idea of way 3 seems to be the coolest 
(fastest) way to me?
* Would HIERO change the way to do this?

Actually im still new to NUKE and Python and it s difficult to get help on 
practical application of all these possibilities.
So i really would be glad on any hint.
Thanks in advance.
_______________________________________________
Nuke-python mailing list
[email protected]<mailto:[email protected]>,
 http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

--
Hugo Léveillé
TD Compositing, Vision Globale
[email protected]<mailto:[email protected]>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to