Go to: Synopsis. Return value. MEL examples.

Synopsis

createNConstraint( string $constraintType, int $createSet )

This creates a constraint node that acts on the selected objects and/or components. For each node that is selected or that has components selected, nComponent nodes are built that feed into the constraint node. This is equivalent to invoking constraint creation off of the menu where the constraint type is the menu item. Depending on the constraint type and the selection nRigid nodes may be created for meshes that have not yet been made into passive nObjects.

Return value

None

Arguments

Variable Name Variable Type Description
$constraintTypestringMust be one of: "transform", "pointToSurface", "slideOnSurface", "weldBorders", "force", "match", "tearableSurface", "weldBorders", "collisionExclusion", "disableCollision"
$createSetintif true then create a set for selected components instead of setting them on the nComponent node

MEL examples

	polyPlane;
	createNCloth false;
	select -r pPlane1.vtx[0] ;
	createNConstraint transform false;