Thanks guys, that's what I figured. And thank you for the code snippet as well.
jake ----- Original Message ----- | From: "Nathan Rusch" <nathan_ru...@hotmail.com> | To: "Nuke Python discussion" <nuke-python@support.thefoundry.co.uk> | Sent: Wednesday, July 27, 2016 7:37:29 PM | Subject: Re: [Nuke-python] Arbitrary number of inputs in gizmo/group | Let's try that again... | def groupKnobChanged ( ) : | if nuke . thisKnob ( ) . name ( ) == 'inputChange' : | n = nuke . thisNode ( ) | maxIndex = n . maximumInputs ( ) - 1 | if n . input ( maxIndex ) is not None : | # Last input is connected to something. Add a new one. | with n : | nuke . nodes . Input ( ) | else : | # Find disconnected inputs at the end to remove | lastIndex = n . inputs ( ) | if lastIndex < maxIndex : | for inputNode in nuke . allNodes ( 'Input' , group = n ) : | if inputNode [ 'number' ] . value ( ) > lastIndex : | nuke . delete ( inputNode ) | _______________________________________________ | Nuke-python mailing list | Nuke-python@support.thefoundry.co.uk, | https://urldefense.proofpoint.com/v2/url?u=http-3A__forums.thefoundry.co.uk_&d=CwICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=2yLaEWUXg9SIczUs3XAZOklnfkwvc28FumJg7uQgJh4&s=BxhgfqpEoJ0jckHfgGmvYkcG0kvRDefEWO8JQi9SrKY&e= | https://urldefense.proofpoint.com/v2/url?u=http-3A__support.thefoundry.co.uk_cgi-2Dbin_mailman_listinfo_nuke-2Dpython&d=CwICAg&c=hHkK43hKb5uKUGaYMJ-p252cFdfVBHtyegDvswk59fU&r=hdh6ldFziktt1N0wAi7bK3Mjov-6LjULd6ZgRd44U6s&m=2yLaEWUXg9SIczUs3XAZOklnfkwvc28FumJg7uQgJh4&s=Zx8V6UtEdQZaXbZ3Rrhr_SkPb0aB6IEopfDaWSTHI1I&e=
_______________________________________________ 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