Hello Nuke,
I'm writing/authoring a gizmo in which I need to have the user click in the
viewer that is editing my node, and have the coordinates (in image space)
of the click returned to my control. It is exactly analogous to a
color-picking action - the user clicks the color swatch button, a color
selection editor is raised, the user may cancel - causing nothing to
happen- or if the user clicks in the image with an eyedropper, the color
beneath the eyedropper is returned (and set) on the calling node. The
pseudocode of what I want is something like this:
User hits "select interesting point" button in editor.
Cursor turns to some sort of crosshair, awaiting user to click in viewer
If user hits escape or otherwise cancels (like double-clicking on a
different node in the graph),
do nothing, change cursor back
Otherwise, if user clicks in image,
call my "click response" callback code with the x-y location of the
clicked point, in image space.
change cursor back
Does anybody have an example of something like this? I'm happy to work in
C++ if that's necessary, but it seemed like Python should be able to do
this.
Thanks in advance,
Chris
--
I think this situation absolutely requires that a really futile and stupid
gesture be done on somebody's part. And we're just the guys to do it.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python