bakeGizmos v1.4


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Frank Rueter
Website: www.ohufx.com
bake all gizmos starting at a given level
Requirements:
8.0, 7.1, 7.0, 6.3, 6.2, 6.1, 6.0 or later
Linux, Mac, Windows
09 May 2015
422

1.4 preserving node names


1.3 added optional argument to exclude gizmos in Nuke's install path. e.g.:

this will only bake inside of Group1 (and any nested Groups) but leave the top level as is:

1
bakeGizmos.bakeGizmos(excludeDefaults=True)

1.2  oops, I forgot to actually copy the knob values so the resulting group always had default values. This version fixes that.


1.1  fixed bug where node connections would be messed up if nodes were selected when the script is run.

 


bakeGizmos drill through a script recursively and convert all gizmos to groups, keeping the node connections in tact.
You can specify the top level at which to start.

 

example:

this will just bake everything starting at the root level:

1
bakeGizmos.bakeGizmos()

 this will only bake inside of Group1 (and any nested Groups) but leave the top level as is:

1
bakeGizmos.bakeGizmos( nuke.toGroup('Group1') )

I will work on a panel to give more control over baking only selected nodes etc. so update to come...

Please login in order to download these files.

Comments   

 
0 # Frank Rueter 2010-10-18 01:51
just subscribing to this feedback thread
 
 
0 # djati waskito 2010-12-16 16:35
thanks Frank it is fully working on mine.
 
 
0 # Zach Lewis 2011-08-06 12:42
I love this. So super useful if you're a freelancer at a facility with a render farm...
 
 
0 # Zach Lewis 2017-02-03 20:46
I totally forgot this existed.

If anyone's interested in a quickie terminal solution, I created an alias called "grizmo" that recursively converts in-place any gizmos found beneath the present working directory to groups, maintaining the name.

add the following line to your .bashrc (or equivalent):

alias grizmo='find . -type f -iname '\''*.gizmo'\'' -printf '\''%P\0%f\0'\' ' | xargs -0 -n2 sh -c '\''sed -i "/Gizmo {/a name ${2%.gizmo}" ${1}; sed -i "0,/Gizmo { /s/Gizmo {/Group {/" ${1}'\'' asdf'


in a shell, navigate to the directory that contains gizmos you'd like to convert, and type "grizmo".
 
 
0 # Jed Smith 2012-04-24 15:00
Thanks for this extremely useful script Frank.

I notice that when the script is run, gizmos get converted into groups just named "Group1", "Group2", etc. For what I'm using this script for, it would be beneficial to preserve the original node name of the gizmo, after it gets converted to a group. That is, if the "baked" group were named with the same name as the original gizmo. This way, the script with baked gizmos is still readable, in that I can see visually what the gizmos are. Just having a bunch of anonymous groups is a little confusing.

If my python skills were a little improved, it probably wouldn't be hard to implement. Just thought I would suggest it.

Thanks!
 
 
0 # Valentin Struklec 2012-07-02 16:38
looks very useful :-)

just one thing:

Is there a way to run this from the script editor without having to install it?

thanks!
 
 
0 # Frank Rueter 2012-07-02 16:47
sure, just execute the contents of the file in the script editor, then run one of the example bits given.
If you just save the file into your ~/.nuke dir simply do "import bakeGizmos" first, then bakeGizmos.bake Gizmos() to run it
 
 
0 # Henrique Reginato 2015-04-22 17:15
Hello,
I want to thank you for making this, is absolutely amazing and helpful !

I wish my Python skills were better so I could help develop this script because it would be veeery helpful if the script would also bake the name of the gizmo into the group...
I know this 'request' has been made already, but how hard would it be to make that happen ? I understand you might not have the time but if you lead me the way I might be actually able to make it and help.

Cheers
 
 
+1 # Frank Rueter 2015-04-22 17:29
shouldn't be hard at all. I will try and find some time this afternoon. I haven't looked at this script in ages
 
 
0 # Henrique Reginato 2015-04-22 21:46
That would be awesome Frank, thank you very much.
And if there is anything I can help to improve, let me know. Although my skills are not the best at the moment, I'm eager to learn through trial and error =]

Cheers
 
 
+1 # Frank Rueter 2015-05-10 03:47
sorry for the delay, I was a bit busy. the new version is preserving the node names now.
 

You have no rights to post comments

We have 4180 guests and 72 members online