移動先: 概要 戻り値 MEL 例.

概要

string firstParentOf(string $dagObject)

このプロシージャは、指定したオブジェクトの最初の DAG の親があれば、その名前を返します。指定したオブジェクトに親がなければ、戻り値は "" となります。

戻り値

なし

引数

変数名 変数型 説明
$dagObjectstring最初の DAG ペアレントを返すオブジェクトです。

MEL 例

		// 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!