otcreatetypefrom command

Creates a new operator type definition from a subnet.

All Usages Options Examples

See also: otcomment, otversion, otwrite

Usages

  1. otcreatetypefrom [-s] [-f] [-n op_name] [-N op_label] [-m min_inputs] [-M max_inputs] [-z] [-c comment] [-v version] [-l otl_file] [-i source] [-r rename_to] subnet

This command serves the same purpose as the dialog that appears when you choose the “Create Digital Asset” item from the RMB menu of a subnet node tile. The various options correspond to the controls in the “Create Digital Asset” dialog.

This command only works if the node specified by the subnet argument is in fact a subnet node. You cannot use this command on custom subnet operator types.

This command attempts to convert absolute paths to relative paths within the subnet before creating the new type. If there are external references the command signals an error and does not save. To override this behavior, use -f to force a save. Note that references may have been successfully modified even if an error occurs.

Options

-s

Don’t try to detect or fix external references.

-f

Forces the save despite external references.

-n op_name

Internal name for the new operator type. The default value is the name of the subnet node, preceded by the current user name to help ensure the name is unique.

-N op_label

Descriptive name for the new operator type. The default value is derived from the name of the subnet.

-m min_inputs

Minimum number of inputs. By default this is the number of inputs connected to the subnet node.

-M max_inputs

Maximum number of inputs. By default this is the number of inputs connected to the subnet node.

-Z

Specifies that the subnet contents should be stored in a compressed format to reduce disk space requirements.

-c comment

Text comment for the operator type.

-v version

Operator type version.

-l otl_file

Name of the operator type library file where the new operator type should be saved. The default value is $HOME/houdiniversion/otls/OPcustom.otl.

-i source

Location where the operator type library file should be installed. The default installs the library to the current hip file only. Valid values here are any entry in the HOUDINI_PATH.

-r rename_to

Renames the subnet after creating the new operator type. The default is to not rename the subnet.

Examples

otcreatetypefrom -n mysubnet -N "My Subnet" -m 0 -M 1 -l $HOME/mylib.otl -i $HOME/houdini<<version>> -r mysubnet1 /obj/subnet1
Creates a new operator type called mysubnet in $HOME/mylib.otl and installs it to $HOME/houdiniversion. The new operator type will take from 0-1 inputs. The node will be renamed to mysubnet1.