Try this for starters (select node with multiple channels before running this):

n = nuke.selectedNode()

bbox = n.bbox()

layers = set([i.split('.')[0] for i in n.channels()])

removeNode = nuke.nodes.Remove()

removeNode.setInput(0, n)

inNode = removeNode

# create text per layer

for layer in layers:

textNode = nuke.nodes.Text2()

textNode['box'].setValue((bbox.x(), bbox.y(), bbox.x() + bbox.w(), bbox.y() + bbox.h()))

textNode['output'].setValue(layer)

textNode['message'].setValue(layer)

textNode.setInput(0, inNode)

inNode = textNode

# create contact sheet for AOVs

layerCC1 = nuke.nodes.LayerContactSheet()

layerCC1.setInput(0, n)

# create contact sheet for text

layerCC2 = nuke.nodes.LayerContactSheet()

layerCC2.setInput(0, inNode)

# use Saturation node to show text in all channels

satNode = nuke.nodes.Saturation(channels='all', saturation=0, mode='Maximum')

satNode.setInput(0, layerCC2)

# merge text on top of layer contact sheet

mergeNode = nuke.nodes.Merge()

mergeNode.setInput(0, layerCC1)

mergeNode.setInput(1, satNode)



On 17/12/15 10:41 am, Charles Taylor wrote:
Ya, python looping through the layers, then lots of shuffles and text nodes and tiling the lot of them. We did it as a run-once process at rendertime for the contact-sheet process; interactively, the normal node is fine. This approach also allows you to sort the layers before tiling, so you get alphabetized (or whatever) results.

./c.t

On 12/16/2015 03:56 PM, Johan Forsgren wrote:

Charles: exactly, text nodes as in multiple text nodes to create the the rows/columns? How were they generated? I could imagine creating text nodes and transforms in a nested forloop (for x in width: for y in height: dostuff(x,y) )with a python script, but is there a more interactive or responsive approach to this perhaps?

On Dec 16, 2015 9:31 PM, "Charles Taylor" <ctay...@spinvfx.com <mailto:ctay...@spinvfx.com>> wrote:

    That button enables an overlay in the viewer that is not actually
    in the image; it does not get rendered out.

    What we ended up doing for that was making our own
    LayerContactSheet node that used Text nodes to burn the layer
    names in.

    ./c.t

    On 12/16/2015 03:28 PM, Frank Rueter|OHUfx wrote:
    The LayerContactSheet node has a "show layer names" checkbox at
    the bottom.


    On 16/12/15 11:02 pm, Johan Forsgren wrote:
    Hi guys, im having a bit of a problem. I have a couple (of
    thousands) of multiexrs to comp, Each one has between 10 and
    100 layer channels. Just flipping between them can become quite
    cumbersome. So I thought it would be great to add a
    layerContactSheet to our comp. The problem is its taking ages
    to load. If you take into account the sheer volume of images we
    need to iterate through the time spent just waiting for the
    contactsheet to be generated would be enormous.

    So, my solution was to create another comp that just rendered
    out jpeg of the contactsheet and send it up to the renderfarm.
    The images could then be viewed in the main comp.
    But here another problem pops up. The layer names is'nt
    rendered with the contact sheet, so i get a nice sheet which is
    totaly useless if you want to find out which layer has what name.

    Sooooo, is there any magical way of 'baking' the layernames
    into the rendered images?
    That would be awesome.

    Secondly. I came up with a pretty hacky workaround, where
     basically was able to get the viewer to not remove the layer
    names from the display, I then imposed them  on the jpeg.
    The problem here is that each time the contact sheet is
    rendered out it seems randomize the layout order. So wrong name
    end up on top of wrong layer. Whats up with that?

    Anyway, sorry about the long (and probably terribly misspelled)
    text. And thanks for any input you might have.


    _______________________________________________
    Nuke-python mailing list
    Nuke-python@support.thefoundry.co.uk
    
<mailto:Nuke-python@support.thefoundry.co.uk>,http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

-- ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
    <http://ohufx.com/index.php/vfx-compositing> | *workflow
    customisation and consulting
    <http://ohufx.com/index.php/vfx-customising>* *



    _______________________________________________
    Nuke-python mailing list
    Nuke-python@support.thefoundry.co.uk
    
<mailto:Nuke-python@support.thefoundry.co.uk>,http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python


    _______________________________________________
    Nuke-python mailing list
    Nuke-python@support.thefoundry.co.uk
    <mailto:Nuke-python@support.thefoundry.co.uk>,
    http://forums.thefoundry.co.uk/
    http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python



_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk,http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python



_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing <http://ohufx.com/index.php/vfx-compositing> | *workflow customisation and consulting <http://ohufx.com/index.php/vfx-customising>* *

_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to