Home Reference Houdini Object Model hou hou.Node 

hou.Node.asCode method

Prints the Python code necessary to recreate a node.

asCode(self, brief=False, recurse=False, save_channels_only=False, save_creation_commands=False, save_keys_in_frames=False, save_outgoing_wires=False, save_parm_values_only=False, save_spare_parms=False, function_name=None) -> string

  • brief - Do not set values if they are the parameter’s default.

  • recurse - Recursively apply to the entire operator hierarchy.

  • save_channels_only - Only output channels.

  • save_creation_commands - Generate a creation script for the node. If set to False (the default), the generated script assumes that the node already exists. When set to True, the script will first create the node and then set its contents.

  • save_keys_in_frames - Output channel and key times in samples (frames) instead of seconds.

  • save_outgoing_wires - Save outgoing connections as well as inputs (which are always saved).

  • save_parm_values_only - Evaluate parameters, saving their values instead of the expressions.

  • save_spare_parms - Save spare parameters as well. When save_creation_commands is True, commands for creating spare parameters will also be output.

  • function_name - If a function_name is specified, the output will be wrapped in a Python function.

Replaces: opscript