Go to: Return value. Related commands. Examples.

Synopsis

boolean objExists string

This command simply returns true or false depending on whether an object with the given name exists.

Return value

Returns a boolean value.

Related commands

addAttr, aliasAttr, deleteAttr, getClassification, nodeType, attributeInfo, objectType, renameAttr, attributeQuery

Examples

		// Select an object if and only if it exists.
		// Print a warning if it does not exist.
		if( `objExists surface1` ) {
			select surface1;
		} else {
			warning("No surface exists");
		}