Created
February 10, 2015 00:11
-
-
Save mclavan/58d8ab9e7b939e48c658 to your computer and use it in GitHub Desktop.
Point On Poly Constraint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
selected_vtx = pm.ls(selection=True)[0] | |
locator_1 = pm.spaceLocator(name='name_locator') | |
locator_2 = pm.spaceLocator(name='name_locatorChild') | |
# Select the driver (vtx) and the driven locator 1. | |
pm.select(selected_vtx, locator_1, r=True) | |
# pm.mel.eval('doCreatePointOnPolyConstraintArgList 2 { "0" ,"0" ,"0" ,"1" ,"" ,"1" ,"0" ,"0" ,"0" ,"0" };') | |
pm.runtime.PointOnPolyConstraint() | |
pm.parent(locator_2, locator_1) | |
# pm.mel.doCreatePointOnPolyConstraintArgList(2, ["0" ,"0" ,"0" ,"1" ,"" ,"1" ,"0" ,"0" ,"0" ,"0"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment