If nothing is connected to the mask input but a channel from the stream
is used for masking the knob has also a different name.
Am 22.02.2014 01:00, schrieb Howard Jones:
As Michael clarified, a mask input is not the same as an input called
'mask'.
If you are able to query the name that still won't help you catch
everything. On a gizmo you are relying on everyone naming a mask input
as 'mask' which is certainly not the case.
You are also assuming that an input named 'mask' has the same
functionality as a mask input.
Again that's not the case.
So you have to ignore gizmos, and use your tool for a mask input in the
right hand side input case. Even here would you catch cases where the
mask is pulled from the incoming alpha?
It can do the same job but not use the mask input. Pythonically I don't
know if there's a difference but it can perform the same job.
Howard
On 21 Feb 2014, at 22:55, Erwan Leroy <[email protected]
<mailto:[email protected]>> wrote:
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" <[email protected]
<mailto:[email protected]>> 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 <tel:21.02.2014%2023>: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" <[email protected]
<mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>>
wrote:
Thanks a lot, that will probably work great.
On 12 Feb 2014 00:42, "Ean Carr" <[email protected]
<mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>> wrote:
Hey Erwan,
I wrote these functions a few years ago after I posted
that to
the list:
https://gist.github.com/__anonymous/a802f51391163a2bf0e3
<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
<[email protected] <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>>
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
<https://www.mail-archive.com/[email protected]/msg00508.html>
thanks
Erwan
_________________________________________________
Nuke-python mailing list
Nuke-python@support.__thefoundry.co.uk
<mailto:[email protected]>
<mailto:Nuke-python@support.__thefoundry.co.uk
<mailto:[email protected]>>,
http://forums.thefoundry.co.__uk/
<http://forums.thefoundry.co.uk/>
http://support.thefoundry.co.__uk/cgi-bin/mailman/listinfo/__nuke-python
<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python>
--
_________________________________________________
Nuke-python mailing list
Nuke-python@support.__thefoundry.co.uk
<mailto:[email protected]>
<mailto:Nuke-python@support.__thefoundry.co.uk
<mailto:[email protected]>>,
http://forums.thefoundry.co.__uk/
<http://forums.thefoundry.co.uk/>
http://support.thefoundry.co.__uk/cgi-bin/mailman/listinfo/__nuke-python
<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python>
_________________________________________________
Nuke-python mailing list
Nuke-python@support.__thefoundry.co.uk
<mailto:[email protected]>,
http://forums.thefoundry.co.__uk/
<http://forums.thefoundry.co.uk/>
http://support.thefoundry.co.__uk/cgi-bin/mailman/listinfo/__nuke-python
<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python>
_________________________________________________
Nuke-python mailing list
Nuke-python@support.__thefoundry.co.uk
<mailto:[email protected]>,
http://forums.thefoundry.co.__uk/ <http://forums.thefoundry.co.uk/>
http://support.thefoundry.co.__uk/cgi-bin/mailman/listinfo/__nuke-python
<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python>
_______________________________________________
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
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python