Hey everyone,

I have a Multiline_String_knob whose contents are a script. Since this knob 
type forces a re-render every time anything in it changes (as opposed to only 
on Enter or focus change, like the standard String_knob), I also have a 
Bool_knob that I want to use to control whether changes to the knob’s contents 
automatically force a re-render.

What I’m currently doing is the following:

int knob_changed(Knob* k) {
    if (k->is("auto_evaluate")) {
        if (_autoEval) knob("expression")->clear_flag(Knob::NO_RERENDER);
        else knob("expression")->set_flag(Knob::NO_RERENDER);
        return 1;
    }
    // ...
}


This is behaving somewhat strangely, and I feel like it’s due to an oversight 
on my part. After this is called, the first character change in the text field 
still triggers a re-render, but subsequent changes do not (as if the flag mask 
state is one evaluation step ahead of the normal render process). This same 
behavior occurs if I test the controlling knob’s value using k->get_value() 
instead of just testing its storage variable.

So am I right that I’m overlooking something? Or is this a known issue?

Thanks,

-Nathan
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to