If the button is executed as a callback, keep in mind that a knobchanged
callback will not trigger other callbacks recursively.

If it's a button, try putting the code it needs to execute inside the button
itself, and not in a knobchanged callback for that button, if that makes
sense.

For recursively-triggered callbacks, I've had some success by setting and
unsetting the KNOB_CHANGED_RECURSIVE flag on target knobs, but ideally there
should be a knob method to force it to call any callbacks as if the user had
clicked on it directly, so you could do something like the following:

knobObject.setValue(value)
knobObject.changed()  # send the signal that the knob has changed and we
want it to trigger any callbacks it may have

This has been requested before, but maybe we could bump it up a little? :)



On Wed, Oct 26, 2011 at 7:10 AM, Peter Pearson <pe...@thefoundry.co.uk>wrote:

> On 26/10/11 14:26, AcidDrippa wrote:
>
>> Hi
>>
>> I am having an issue with the knob_changed method in my derived operator
>> (from Op).
>>
>> I have a Bool_knob in my operator and I am changing the value to true
>> when the user clicks on a button in a Python dialog.
>>
>
> How are you changing the value?
>
> Peter
> --
> Peter Pearson, Software Engineer
> The Foundry, 6th Floor, The Communications Building,
> 48 Leicester Square, London, UK, WC2H 7LT
> Tel: +44 (0)20 7434 0449   Web: www.thefoundry.co.uk
>
> The Foundry Visionmongers Ltd.
> Registered in England and Wales No: 4642027
> ______________________________**_________________
> Nuke-dev mailing list
> Nuke-dev@support.thefoundry.**co.uk <Nuke-dev@support.thefoundry.co.uk>,
> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/>
> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-dev<http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev>
>
_______________________________________________
Nuke-dev mailing list
Nuke-dev@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to