Jump to content
  • Advertisement
Sign in to follow this  

MEL / C++ API

This topic is 3563 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!