PDA

View Full Version : pointOnPolyConstraint in MEL


Stellios
01-24-2011, 10: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, 03: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, 04: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-27-2011, 12:30 AM
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-27-2011, 12:30 AM
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.