Go to: Synopsis. Return value. MEL examples.

Synopsis

string addPrefixToName(string $prefix, string $nodeName)

Adds $prefix to the beginning of $nodeName. This script will handle DAG paths by adding the $prefix to the beginning of every node name in the DAG path. NOTE: This script will not actually rename $nodeName, it just generates a string.

Return value

None

Arguments

Variable Name Variable Type Description
$prefixstringThe string to add.
$nodeNamestringThe node name to be prefixed.

MEL examples

	addPrefixToName( "shaders:", "blinn1SG" );
	// Result: shaders:blinn1SG
  addPrefixToName( "skel:", "joint1|joint2|joint3" );
	// Result: skel:joint1|skel:joint2|skel:joint3
  addPrefixToName( "invalid:", "" );
	// Result: