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
$attr string Name of attribute to look for.
$node string Name 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";
  }