That's great advice, Nathan.

On Friday, 11 September 2015, Nathan Rusch <[email protected]> wrote:

> Update frequency aside, it's worth keeping in mind that the overhead on
> Python expressions is always non-trivial with Nuke's current design; they
> are evaluated via a TCL command, and thus they always require two separate
> layers of parsing, in addition to being forced into serial evaluation.
>
> The best advice I can give you is to avoid Python expressions as much as
> possible. Use basic knob expressions whenever you can, TCL if you can't,
> and Python only as a last resort. Then write them to be as tight as
> possible. If you want to do custom node labels, look into implementing your
> own autolabel function, and write it to be lean.
>
> -Nathan
>
>
> *From:* Elvis Au
> <javascript:_e(%7B%7D,'cvml','[email protected]');>
> *Sent:* Friday, September 11, 2015 1:30 PM
> *To:* Nuke user discussion
> <javascript:_e(%7B%7D,'cvml','[email protected]');> ;
> [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>
> *Subject:* Re: [Nuke-users] python expressions locking up the gui
>
> Hi Brian:
>
> Thanks for the clarification on the behavior in Nuke - but it still
> strikes me odd that  something seemingly innocuous like updating a text
> label field in a backdrop would cause all of the tcl python code in the
> script to evaluate (and per keypress). By the way, I've verified that our
> code updates only once per script update and not multiple times so it's not
> bug 16881.
>
> To answer your question about the kind of usage:  we are using these tcl
> python expressions to auto select filters in reformat nodes based on input
> criteria, or specifying the crop depending on the image size, or linking
> fields to custom global python values, etc.  - these help standardize use
> of filters,  image settings across the studio pipeline.  When all this code
> executes at the same time because of a script change (like  a keystroke in
> a text label), that's when it becomes an issue and could potentially pose
> an upper limit to the size of our nuke trees unless we restructure or
> remove our use of expressions.
>
> thanks for looking into this! =)
>
> Elvis
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to