'tis pasteMultiple ....
######################################################
### Paste the clipboard to all the selected nodes
### except those which have their classes and names
### listed on the ignore list.
### ------------------------------------------
### pasteMultiple.py
### v2.0 - Last modified: 07/08/2009
### Far from perfect but it works in most cases
### Written by Diogo Girondi
### [email protected]
import nuke
def pasteMultiple():
'''
Pastes the clipboard contents to the current selected nodes in the DAG.
It will ignore any Name or Class present in the ignoreName or ignoreClass
lists. Edit the script to add or remove name and classes to the ignore
lists.
'''
### Ignore list (Classes and Names)
###########################################################
ignoreList = ['Viewer', 'StickyNote', 'BackdropNode', 'Assert', 'Write',
'VIEWER_INPUT']
###############################################################################################
sn = nuke.selectedNodes()
pasted = []
if sn:
for n in sn:
if n.name() in ignoreList or n.Class() in ignoreList:
n['selected'].setValue( False )
continue
else:
n['selected'].setValue( True )
pn = nuke.nodePaste( '%clipboard%' )
pasted.append( pn )
for n in pasted:
n['selected'].setValue( True )
else:
nuke.nodePaste( '%clipboard%' )
Howard
>________________________________
> From: Diogo Girondi <[email protected]>
>To: Howard Jones <[email protected]>; Nuke user discussion
><[email protected]>
>Sent: Tuesday, 22 November 2011, 15:51
>Subject: Re: [Nuke-users] Same operation on multiple inputs
>
>
>Hi Howard,
>
>
>I don't know which code you're talking about but feel free to share as you
>please :)
>
>
>
>
>cheers,
>diogo
>
>
>On Tue, Nov 22, 2011 at 8:01 AM, Howard Jones <[email protected]> wrote:
>
>I saw that but couldn't see the difference between copy cloning some nodes and
>using a multipaste tool (mines from Diogo).
>>Seemed a long way around to do the same thing.
>>
>>
>>I'll let Diogo share this code if he wants.
>>
>>
>>Howard
>>
>>
>>
>>>________________________________
>>> From: Thomas Volkmann <[email protected]>
>>>To: Nuke user discussion <[email protected]>
>>>Sent: Tuesday, 22 November 2011, 8:40
>>>Subject: Re: [Nuke-users] Same operation on multiple inputs
>>>
>>>
>>>Thanks Holger,
>>>
>>>exactly what we've been looking for...
>>>
>>>
>>>-------- Original-Nachricht --------
>>>> Datum: Mon, 21 Nov 2011 20:22:31 +0100
>>>> Von: Holger Hummel|Celluloid VFX <[email protected]>
>>>> An: Nuke user discussion <[email protected]>
>>>> Betreff: Re: [Nuke-users] Same operation on multiple inputs
>>>
>>>>
>>>> i stumbled upon this a few days ago:
>>>>
>>>> http://www.creatogether.com/foreach-nk
>>>>
>>>> haven't tested it myself yet but looks like it's doing at least some of
>>>> the stuff you're looking for.
>>>>
>>>> cheers,
>>>> Holger
>>>>
>>>>
>>>> Thomas Volkmann wrote:
>>>> > Some interesting stuff so far, but not yet exactly what we are after
>>>> (though it definitely is an improvement).
>>>> > Is there any documentation on that python-tab in the write node? I
>>>> didn't find anything on this, but maybe I'm not searching properly,
>>>> because I
>>>> didn't find the former mentioned 'topnode'-expression either.
>>>> > If we could something like "if write2 -> use switch 2" to work that
>>>> would be perfect!
>>>> >
>>>> > Thanks for your input!
>>>> >
>>>> >
>>>> >
>>>> > -------- Original-Nachricht --------
>>>>
>
>>>> >> Datum: Mon, 21 Nov 2011 12:49:33 +0100
>>>> >> Von: michael vorberg <[email protected]>
>>>> >> An: Nuke user discussion <[email protected]>
>>>> >> Betreff: Re: [Nuke-users] Same operation on multiple inputs
>>>> >>
>>>> >
>>>> >
>>>> >> two things come into my mind:
>>>> >> a) you can build a temp script with the read node and all the things
>>>> >> you want to do. and the end put in a write node
>>>> >> in the read node file knob write: [argv 0]
>>>> >> and in the write node put an expression to build the name from the
>>>> write
>>>> >> node or put in
[argv 1]
>>>> >> then start nuke from a commandline with: nuke tempscript.nk
>>>> >> "path/to/read/images.ext" "path/to/write/images.exr" (you can get rid
>>>> of
>>>> >> the second argument if you build the write node filenames by
>>>> expression)
>>>> >>
>>>> >> this will start nuke and put the first argument
>>>> >> ("path/to/read/images.ext") into the read nodes file knob
>>>> >>
>>>> >> b) the switch method isnt that bad, i would make an expression on the
>>>> >> disable knob of the write node which makes it only active if the right
>>>> >> switchinput is selected.
>>>> >> something like: "switch1.which==3?0:1"
>>>> >>
>>>> >> Am 20.11.2011 21:22, schrieb Thomas Volkmann:
>>>> >>
>>>> >>> Hey,
>>>> >>> is it possible to setup some sort of batch-processing in Nuke? E.g.
>>>> >>> having multiple Read nodes that need all the same treatment, and then
>>>> >>> write them out to different places.
>>>> >>> First idea was to put the compositing tree into a group and clone that
>>>> >>> one...that was when I found out that you can't clone groups. Another
>>>> >>> approach a co-worker came up with, was to connect all the Reads to a
>>>> >>> Switch-node and have multiple Write nodes in the end, of which
>>>> >>> everyone has a 'before render -> change switch'-expression, but
>>>> >>> somehow that didn't work.
>>>> >>> Probably I am just missing the obvious... I there a common workflow
>>>> >>> for that?
>>>> >>>
>>>> >>> Thanks,
>>>> >>> Thomas
>>>> >>> _______________________________________________
>>>> >>> Nuke-users mailing list
>>>>
>>> [email protected], http://forums.thefoundry.co.uk/
>>>> >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>> >>>
>>>> >> _______________________________________________
>>>> >> Nuke-users mailing list
>>>> >> [email protected], http://forums.thefoundry.co.uk/
>>>> >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>> --
>>>> Holger Hummel - [email protected]
>>>>
>>>> Celluloid Visual Effects, Paul-Lincke-Ufer 39/40, 10999 Berlin
>>>> phone +49 (0)30 / 54 735 220 - [email protected]
>>>>
>>>> _______________________________________________
>>>> Nuke-users mailing list
>>>> [email protected], http://forums.thefoundry.co.uk/
>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>
>>>--
>>>NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
>>>Jetzt informieren: http://www.gmx.net/de/go/freephone
>>>_______________________________________________
>>>Nuke-users mailing list
>>>[email protected], http://forums.thefoundry.co.uk/
>>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>
>>>
>>>
>>_______________________________________________
>>Nuke-users mailing list
>>[email protected], http://forums.thefoundry.co.uk/
>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>
>
>
>_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users