Go to: Synopsis. Return value. MEL examples.

Synopsis

string stripPrefixFromName(string $prefix, string $nodeName)

Strips $prefix from the beginning of $nodeName. This script will handle DAG paths by stripping the $prefix from 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 strip.
$nodeNamestringThe node name to be stripped.

MEL examples

	stripPrefixFromName( "shaders:", "shaders:blinn1SG" );
	// Result: blinn1SG
  stripPrefixFromName( "skel:", "skel:joint1|skel:joint2|skel:joint3" );
	// Result: joint1|joint2|joint3
	stripPrefixFromName( "two:", "one:two:myNode" );
	// Result: one:two:myNode