PDA

View Full Version : A constraint with MPxConstrain


abahena
11-03-2008, 10:01 PM
Any source code on how to use MPxConstraint and MPxConstraintCommand ?
Besides this one (http://download.autodesk.com/us/maya/2009help/API/geometry_surface_constraint_8cpp-example.html) ??

abahena
11-05-2008, 08:17 PM
Ok I got something working, after decoding maya api documentation . But I got stuck in this:

MStatus ARTaimCommand::connectTarget(void* opaqueTarget,int index)
{

MStatus status = connectTargetAttribute( opaqueTarget , index, ARTaim::targetGeometry );
if (!status) { status.perror("connectTargetGeometry"); return status;}
return MS::kSuccess;
}

At this point is where I have to connect the N numbers of drivers to the constraint.
In here I got stuck:

void* opaqueTarget

How do I know what maya is sending me. I dont know too much about pointers.
I promise if I get this done I will upload a source code with nice comments.
thank you

CGTalk Moderation
11-05-2008, 08:17 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.