Sign in to follow this  
abahena

[.net] void pointer help??

Recommended Posts

The void pointer is a Mdagpath and I want to connect the exclusive matrix to a matrix attribute geometrySurfaceConstraint::targetGeometry What Im doing wrong? MStatus geometrySurfaceConstraintCommand::connectTarget(void *opaqueTarget, int index) { MDagPath* voidDagPath =(MDagPath*)opaqueTarget; void *Void = &voidDagPath->exclusiveMatrix(); MStatus status = connectTargetAttribute( Void, index, geometrySurfaceConstraint::targetGeometry ); if (!status) { status.perror("connectTargetGeometry"); return status;} return MS::kSuccess; }

Share this post


Link to post
Share on other sites
I think you're in the wrong forum so you might have trouble getting answers, this is for discussion about the .NET api. Your question is better suited for a maya api or tools oriented forum.

But...

according to this site:
http://download.autodesk.com/us/maya/2009help/API/class_m_px_constraint_command.html#52b992a65fe16fcced656083aaa919ae

the function youre trying to use is obsolete, you should try using:

MStatus MPxConstraintCommand::connectTargetAttribute(MDagPath& targetPath, int index, MObject& targetAttribute, MObject& constraintAttr, bool instanced = false)

which isn't obsolete AND takes a MDagPath instead of a void* which should solve your original problem.

Hopefully that helps!!
.max

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this