PDA

View Full Version : paintable attributes C++/MEL


maluuuu
11-06-2008, 05:10 AM
Hi,

When i create a mesh, modelling in Maya, i can add paintable attributes whith MEL instructions:

select pPlaneShape1;
addAttr -ln "paintAttr" -dataType "doubleArray";
makePaintable "mesh" "paintAttr";

But when i create a mesh in C++ Maya with the create function and i try to aply the same MEL instructions:

select pPlaneShape2;
addAttr -ln "paintAttr" -dataType "doubleArray";
makePaintable "mesh" "paintAttr";

Maya let me create the attribute but don't let me paint it... it says that:

// Warning: |polySurface2|polySurfaceShape2 is missing attribute paintAttr.


That's because Maya adds the attribute to polySurface2 but it doesn't to polySurfaceShape2.

The new attribute "paintAttr" has to be in polySurfaceShape to make it possible to paint.

I'm wonder if there's an instruction C++ or MEL that i can use in the Mesh created in C++ to make this possible?

Any suggestion?

Thanks,

Malu

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