Thanks Mike for the explanation.
I can see your point, and I'll have to find a workaround for gizmos if I
want my tool to work 100% of the time.
It just lets me wish there was a quick way to query the name of an input
instead of just it's number. I say someone asking for that in another
thread and that would sure be helpful in some cases.
Thx.
Erwan
On 21 Feb 2014 14:47, "Michael Habenicht" <m...@tinitron.de> wrote:

> Technically speaking the keymix has no mask input. It has 3 normal inputs
> where the third is called mask. That's why the knob is called differently.
> You also don't know how the function works on gizmos that also have no
> regular mask input but might have an input called mask which is used for
> internal masking.
>
> Best regards,
> Michael
>
> Am 21.02.2014 23:24, schrieb Erwan Leroy:
>
>> Hi Everyone,
>> Ean, just a quick update on your function. After using a part of it for
>> about a week, I ran into a small issue today while trying to show the
>> mask input of a keymix.
>> For some reason that node uses a knob called maskChannel instead of
>> maskChannelMask, making your function believe this node had no mask input.
>> It was easily fixed by adding a "or" to my if statement.
>>
>> I'll let you know if I run into another issue.
>>
>> Erwan
>>
>> On 12 Feb 2014 00:56, "Erwan Leroy" <er...@erwanleroy.com
>> <mailto:er...@erwanleroy.com>> wrote:
>>
>>     Thanks a lot, that will probably work great.
>>
>>     On 12 Feb 2014 00:42, "Ean Carr" <m...@eancarr.com
>>     <mailto:m...@eancarr.com>> wrote:
>>
>>         Hey Erwan,
>>
>>         I wrote these functions a few years ago after I posted that to
>>         the list:
>>
>>         https://gist.github.com/anonymous/a802f51391163a2bf0e3
>>
>>         Just call get_mask_input_index(node). I haven't run into any
>>         node which returns a bad index for the mask, but if you do, let
>>         me know. Yeah, I wish Nuke would give us something like
>>         node.maskInput()
>>
>>         Cheers
>>
>>
>>         On Wed, Feb 12, 2014 at 3:08 AM, Erwan Leroy
>>         <er...@erwanleroy.com <mailto:er...@erwanleroy.com>> wrote:
>>
>>             Hello everybody,
>>             I've been playing around with python and nuke for a little
>>             while now and starting to get more comfortable, but I hit a
>>             roadblock today.
>>
>>             I'm trying to find a way to identify the mask input from
>>             other inputs.
>>
>>             So far I have that very dirty piece of code that works most
>>             of the time, but not always:
>>
>>             node=  nuke.selectedNode()
>>             if  node.Class()  ==  'Merge2':
>>                  maskInput=  2
>>             else:
>>                  maxInputs=  node.maxInputs()
>>                  if  maxInputs>  1:
>>                      maskInput=  maxInputs-1
>>                  else:
>>                      maskInput=  None
>>
>>
>>             Is there any function like node.mask() or something similar?
>>
>>             The closest I found online was this post from 2011:
>> https://www.mail-archive.com/nuke-python@support.
>> thefoundry.co.uk/msg00508.html
>>
>>
>>             thanks
>>
>>             Erwan
>>
>>
>>             _______________________________________________
>>             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
>
_______________________________________________
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