Thanks a lot. calling nuke.layers() for each read as it was created indeed did 
the trick. It does add quite some overhead though (bumping running time from 
0.2 secondish to 1.6 secondish).
Running the command on ONE of the reads after all are created also worked, but 
i am not sure if this still works if the channels are different per read (which 
is not the case atm, but WILL be the case).
Calling nuke.layers() (which is supposed to list all layers) sadly did not 
force a refresh.

Cheers and thanks everyone!
Thorsten Kaufmann
Production Pipeline Architect
____________________________________

Mackevision Medien Design GmbH
Forststraße 7
D-70174 Stuttgart

T  T  +49 711 93 30 48 78
F  +49 711 93 30 48 90
M +49 151 19 55 55 02

[email protected]
http://www.mackevision.de

Geschäftsführer: Armin Pohl, Joachim Lincke, Karin Suttheimer
HRB 243735 Amtsgericht Stuttgart
________________________________________
Von: [email protected] 
[[email protected]] im Auftrag von Johannes Hezer 
[[email protected]]
Gesendet: Donnerstag, 27. Februar 2014 12:30
An: [email protected]
Betreff: Re: [Nuke-python] Programmatically creating nodes and channels woes

I have not tried that with multichannel exrs (which I guess you are using) but 
nuke.layers(readNode) does work as expected here.
We do have an assembly that searches for footage then grabs all aovs (we do 
have them seperate) and then depending in the available layers per read some 
stuff gets attached... with backdrops in there.
Although I must admit I am setting each position, from every node via 
setXYpos()....
and we create the channels via nuke.Layer(layerName, [red, green, blue]) prior 
to that.
I remember having problems with importing data into a camera and setting it to 
not read from file...
I think I used nuke.show(camera) to get around this.... I think it was 
complaining about a non existent knob...

Sometimes nuke.createNode did more what I was after instead of using 
nuke.nodes.Node...

Maybe with 100 layers it needs to evaluate sth in-between to get all the layers 
in ?

http://pastebin.com/zde3Fnta

here is a part from the scene assembly that creates a subtract plus loop of 
layers...
Would be nice to know if this works with multichannel reads...

Cheers
Johannes



On 02/27/2014 09:59 AM, Ben Dickson wrote:

With your second point, about channels appearing from newly created Read
nodes:

We have a script which brings in several EXR's with one or more layers,
and combines them into one pipe using a bunch of Copy nodes.. and it
seems to work quite reliably (although never tried it with anywhere near
100 layers)


I was creating the nodes by doing this:

formatted = "%s %d-%d" % ("/example/path.%04d.exr", 1001, 1024) #
hardcoded example framerange etc.. usually calculated

r = nuke.nodes.Read()
r['file'].fromUserText(formatted)


Then querying the layers using:

for layer in nuke.layers(r):
    ...



On 27/02/14 19:15, Thorsten Kaufmann wrote:


Heya,



I am seeing quite a lot of issues with programmatically assembling
scripts. Anyone got any tips? Here’s

some of the issues:



-          Creating nodes does not update their DAG position/size
values. So autobackdropping does not work because the screenWidth is not
available. You can force an update calling node.xpos() BUT this does not
work for NoOps.

-          Creating reads works fine, but channels are not immediately
created it seems. When creating around 100 reads and piping them into a
zMerge and then trying to ChannelMerge a bunch of channels the channels
to be created by the reads are not available. They are created though
and it works if I run the script a second time in the same nuke-script.

-          Creating channels via nuke.Layer does not really seem to
work. They are available in layer knobs, but not in channel knobs it
seems (?!?) Creating them via nuke.tcl works



This list probably should go on, but these are the most pressing issues
for me atm. Do I really have to precreate channels for reads (which can
be REALLY tricky)? And even then fall back to TCL to do so?



Cheers,

Thorsten

Thorsten Kaufmann
Production Pipeline Architect

------------------------------------------------------------------------

Mackevision Medien Design GmbH
Forststraße 7
70174 Stuttgart

T  T +49 711 93 30 48 78
F  +49 711 93 30 48 90
M +49 151 19 55 55 02

[email protected]<mailto:[email protected]>
http://www.mackevision.de

Geschäftsführer: Armin Pohl, Joachim Lincke, Karin Suttheimer
HRB 243735 Amtsgericht Stuttgart




_______________________________________________
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








--
STUDIO RAKETE GmbH
Johannes Hezer, Compositing TD & Stereoscopic SV
Schomburgstr. 120
D - 22767 Hamburg

[email protected]<mailto:[email protected]>
Tel:+49 (0)40 - 380 375 69 - 0
Fax:+49 (0)40 - 380 375 69 - 99

------------------------------------------------------
Pflichtangaben laut Handelsgesetzbuch und GmbH-Gesetz:

STUDIO RAKETE GmbH
Schomburgstr. 120 D - 22767 Hamburg

www.studiorakete.de<http://www.studiorakete.de> / 
[email protected]<mailto:[email protected]>

Geschaeftsfuehrer: Jana Bohl

Die Gesellschaft ist eingetragen im Handelregister des
Amtsgerichts Hamburg unter der Nummer HR B 95660
USt.-ID Nr.: DE 245787817



____ ESET 8964 (20131025) ____
The message was checked by ESET Mail Security.
_______________________________________________
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