View Full Version : pointOnPolyConstraint in MEL
Stellios 01-24-2011, 09:59 PM is there anyway to do this in MEL simply? Looking at the editor i see that when done through the UI it specifies its UV value. However looking through the command reference i could only come up with this...
pointOnPolyConstraint $vertex $object;
Which does basically nothing?
|
|
ginodauri
01-26-2011, 02:47 AM
For example if you attach locator on plane , in contrain you should see attributes like this:
pPlane1UO
pPlane1VO
This is controling U and V position of constrain.
Stellios
01-26-2011, 03:22 AM
For example if you attach locator on plane , in contrain you should see attributes like this:
pPlane1UO
pPlane1VO
This is controling U and V position of constrain.
in that case am I to extract a UV position for the point on the surface that I id like to constrain to? Can i do this via mel using a vertex position?
BoostAbuse
01-26-2011, 11:30 PM
string $sel[] = `ls -sl`;
string $pycmd = python( "import maya.app.general.pointOnPolyConstraint;maya.app.general.pointOnPolyConstraint.assembleCmd()" );
$cmd = "{string $constraint[]= `pointOnPolyConstraint $sel[0] $sel[1]`" + $pycmd + ";}";
evalEcho($cmd);
Should do what you need. Not the prettiest of ways of doing it but it works.
CGTalk Moderation
01-26-2011, 11:30 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.