The badly named channels can be made with the Copy node (in the "to" dropdown, click "new" and it lets you enter anything, e.g rgb.blah).

All the problems stem from allowing the modification of builtin rgb/rgba/alpha/etc layers, and I think are mostly summarised in Bug 34525 ("suppress bad channels not working properly")


The nuke.channels() call will find such layers, but I'm not aware of any easy way to remove them.. We have a script internally which removes them, by saving, processing the .nk file as text to remove the bad add_layer calls, and reopening the modified script

..but the script can cause further problems - just removing the add_layer calls sometimes causes errors if it's referenced in some node, usually along the lines of this:

 channels {rgba.red rgba.green -rgba.blue rgb.blah}

I've not looked into this further, as the problem died down once we cleaned up a few of our sitewide gizmos, and started new projects


Oh, quite related is Feature 20186 "Need a command to remove channels and layers"

Contact support about this, mentioning those bug numbers - Nuke 8 will be a good time to finally fix these silly problems

On 24/10/13 09:56, Jesse Kretschmer wrote:
Is it possible to get the invalid channel names rather than a NoneType
returned?

It seems that somehow it is possible to modify the default layers to
include non-default/non-existent channels. 'redguard.glow' for example.
If an artist brings in an outside gizmo to use, they sometimes contain
invalid channels.

I'm trying to query the available channels, but nuke returning NoneType
when an invalid channel is found. For example, my alpha layer on this
script has a bunch of invalid channels.

Script source:
add_layer {alpha alpha.red alpha.green alpha.blue alpha.alpha
alpha.Gmatte alpha.G_matte rga.alpha}

 From nuke script editor:
print nuke.Layer('alpha').channels()

# Result:

['rgba.alpha', 'alpha.red', 'alpha.green', 'alpha.blue', None, None,
None, None]



I was hoping to see 'alpha.Gmatte' et ceterra. Perhaps this is the
reason these extra channels cause so much trouble.


I may be barking up the wrong tree. Is there a better way of dealing
with these invalid channels?


Thanks for reading,

Jesse



_______________________________________________
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

--
ben dickson
2D TD | ben.dick...@rsp.com.au
rising sun pictures | www.rsp.com.au
_______________________________________________
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