I reported this problem nearly a year ago. Really, you just can't reliably use python's sample function. As far as I can tell it is totally arbitrary whether or not you get a "current" image or not.
John Vanderbeck Technical Artist Digital Domain Media Group NOTICE: This communication may contain privileged or other confidential information. If you have received it in error, please advise the sender by reply email and immediately delete the message and any attachments without copying or disclosing the contents. Thank you. From: [email protected] [mailto:[email protected]] On Behalf Of Christopher Horvath Sent: Wednesday, April 25, 2012 7:34 PM To: Nuke Python discussion Subject: [Nuke-python] "sample" function only sporadically updating Hey Folks, When I call 'sample' on a node from inside a knobChanged callback in python, it only returns new values occasionally. I'm printing out the x,y sample location that I'm getting out of the position knob, and it's changing smoothly - but the rgb values that I'm getting returned from my sample calls don't change smoothly. I'm assuming this an evaluation problem. Here's my sampling code: scolR = groupIdImage.sample( 'red', origXY[0], origXY[1] ) scolG = groupIdImage.sample( 'green', origXY[0], origXY[1] ) scolB = groupIdImage.sample( 'blue', origXY[0], origXY[1] ) Does anybody have success with this sort of thing in python callbacks? 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
