Skip to content

Dynamic knobs in loaded scripts don't show up until node is evaluated #30

@ldmoser

Description

@ldmoser

The contents and definition of the dynamic knobs are serialized in Nuke script alright, and they are retrieved during load, but they aren't applied to the node until the node is evaluated (i.e. plugged to the viewer)

I believe this is not ideal, because:

  • users selecting a node may think that there's no models selected or input parameters set.
  • if users save the script without evaluating the nodes first than they will lose the information about their dynamic knobs (note that the to_script function retrieves the current status of the UI, not the internal _parameters object)

In my mind, what should change is the moment where UI is updated. To me, it should only occur in three situations:

  1. when user clicks "connect"
  2. when user selects a different model
  3. when script is loaded

I don't think UI should change at all during evaluation. If for any reason the UI is out-of-date with the actual model in the server (i.e. the names/types of input parameters are different), that should be detected during evaluation, then an error should be displayed to user, letting him know he should click "connect" to refresh his UI.

That way one can load a Nuke script with MLClient nodes, and even if the server is down, all the knobs will remain with their values or expressions. It won't be a destructive operation to load the script, try to infer, see errors in the viewer and save back to file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions