Go to: Synopsis. Return value. MEL examples.

Synopsis

attributeExists (string $attr, string $node)

Check to see if the named attribute exists in the given node.

Return value

None

Arguments

Variable Name Variable Type Description
$attrstringName of attribute to look for.
$nodestringName of node that will be searched.

MEL examples

  string $shapeName[] = `cone`;
  if (`attributeExists "scaleX" $shapeName[0]`) {
      print "Attribute exists\n";
  } else {
      print "Attribute does not exist\n";
  }