Go to: Synopsis. Return value. MEL examples.
string firstParentOf(string $dagObject)
None
Variable Name | Variable Type | Description |
---|---|---|
$dagObject | string | The object whose first DAG parent should be returned. |
// Create a NURBS sphere. // string $createdNodes[] = `sphere -constructionHistory false`; string $sphere = $createdNodes[0]; // Create a group containing the sphere. // string $group = `group`; // Use firstParentOf() to get the parent of the sphere. This should be // the name of the group. // string $firstParentOfSphere = firstParentOf($sphere); if (isSameObject($group, $firstParentOfSphere)) print("// Success!\n"); // Success!