Hi Rich,

The fundamental difference between a gizmo and a group is that a gizmo is
kept as a reference to the external file (.gizmo) with only the values for
the parameters (knobs) that were exposed when authoring being stored on the
nuke script (comp). So basically you can only hide/show/change what is
already exposed there. Any new addition to it will be set as a "User knob"
in order to allow it to be saved with and recalled by the script.

If you need to regenerate the internals or dynamically create knobs from
scratch in a gizmo -- to keep things simple -- you are better off with
groups which when added to a script are embedded in full in the script.

And case you want to keep the behavior of a group but wants to distribute
it as a gizmo, just export is as a gizmo and then edit the .gizmo file on a
text editor by replacing the "Gizmo {" bit for "Group {". This will
effectively make it a group, so any updates on the original gizmo file
won't reflect on any scripts where that pseudo-gizmo was added already.

As for the duplication of knobs one way tackle it would be to implement a
routine that checks for the presence of knob "x" on nuke.thisNode().knobs()
before creating any new ones.


Cheers,
Diogo

On Fri, Mar 3, 2017 at 9:46 PM, Rich Bobo <richb...@mac.com> wrote:

> Hi all,
>
> I have a Group node that removes and adds knobs when a PyScript_Knob
> button is clicked. It works well. If I export the Group as a Gizmo, when
> the button is clicked, a new “User” tab gets created, putting the new knobs
> on the new tab. Not good. This happens even if I already have a tab named
> “User”. So, then I get User/User and my knobs go on the new User tab! Very
> frustrating! Is this a bug or a “feature”? Is there any way around this -
> other than leaving my Group as it is and giving up on the idea of ever
> making it a Gizmo…?
>
> Thanks for any help,
> Rich
>
>
> Rich Bobo
> Senior VFX Compositor
> Armstrong White
> Email:  rich.b...@armstrong-white.com
> http://armstrong-white.com/
>
> Email:  richb...@mac.com
> Mobile:  (248) 840-2665
> Web:  http://richbobo.com/
>
> "What lies behind us and what lies before us are tiny matters compared to
> what lies within us."
> - William Morrow
>
>
>
>
>
>
>
>
> _______________________________________________
> 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