Go to: Synopsis. Return value. MEL examples.

Synopsis

int isParentOf(string $parent, string $child)

This procedure returns true if $parent is a DAG parent of the specified DAG object, and false otherwise. See also firstParentOf().

Return value

None

MEL examples

		//	Create a NURBS sphere.
		//
		string $createdNodes[] = `sphere -constructionHistory false`;
		string $sphere = $createdNodes[0];

		//	Create a group containing a group containing the sphere.
		//
		string $group1 = `group`;
		string $group2 = `group`;

		isParentOf($sphere, $sphere);
		//	Result: 0 //

		isParentOf($group1, $sphere);
		//	Result: 1 //

		isParentOf($group2, $sphere);
		//	Result: 1 //

		isParentOf("", $group2);
		//	Result: 0 //