Sign in to follow this  


Recommended Posts

Hi! I'm doin' a plug-in for meshes in Maya in C++, and i´ve got a question: In Maya modelling i can add a new attribute to one object with MEL commands: select pPlaneShape1; addAttr - ln " paintAttr" - dataType " doubleArray" ; I can add a paintable attribute to "paintAttr" with this instruction: makePaintable " mesh" " paintAttr" ; In this way i can give different values to " painAttr", using the paintable brush of Maya, in the mesh. My problem is to access these values through the API C++. I tried some functions but I did not obtain the desired result. With the functions of MFnMesh i tried: MFnMesh fnMesh (dagPath); MObjectArray atrraf; MObject o; MString test = MString (" paintAttr"); o = fnMesh.attribute (test); fnMesh.getAffectedAttributes ( o, atrraf); But I did not get nothing in the variable atrraf… I can´t obtain the values that I applied in the model. I tried also with the classes MPlug: MFnDependencyNode nodeFn (); MPlug mass = nodeFn.findPlug (" paintAttr"); double m; mass.getValue (m); But I come across with a problem, the function getValue only returns double values, and it does not return doubleArrays. Do you have a suggestion? Can anybody help me? Thanks, Malu

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