nuke.evaluateString

nuke.evaluateString()

“expand” the string by replacing tcl portions of the string with the final text.

Expansion can be controlled with optional flags: - STRING_EXPAND_FILENAME a leading “~/” is replaced by the value of $env(HOME), and a leading “~foo” is replaced by a guess of the user foo’s home directory done by replacing the end of $env(HOME) (nuke does not bother with the passwd file). And the result is passed through filename_fix, if the command is defined. - STRING_EXPAND_FILENUMBER %nd and ### sequences are replaced by the frame number from the context parameter, and %V and %v are replaced with the name and initial of the view.

Parameters
  • expression – The expression string to be evaluated.

  • node – Optional node to use as the context for expansion. If not supplied the current thisNode will be used.

  • context – Optional OutputContext to use for expansion.

  • flags – Optional flags to control expansion.

Returns

The expanded string.