Hi all,

so i've found a number of posts on various boards, but haven't found a
final answer yet about creating a new UV or new colorSet on a mesh
inside a custom node via the handle connection data.

to create these, the API docs state you need to have the MFnMesh
pointing to the shape node (the kMesh), and from a handle input .asMesh
() returns kMeshData which after creating an MFnMesh from that works
fine UNLESS you want to manipulate the color or UV sets.

i'm inside my own node (either PxNode or Deformer--either or) and the
input is a mesh, the output is the same mesh and inside the node i
want to create new UV and/ or colorSets with my own names, data, etc.
the shape itself will not change, just creation (and editing) of the
sets.

i can fake the "initial" set creation but that only uses it's own
default colorSet1 or uvSet1...and nothing more.  i've also found that
this "hack" is "workable in Maya 2008, but once you try it in 2009: it
still works, but spits out an error every update.

so anyone have any pointers on basically creating my own colorSet or
UVset within a node?!  do i just bite the bullet and do that where i
take an input mesh, find all the data and recreate it in the node,
thus creating a brand new MFnMesh.create( verts, pointsInSpace,
blah...blah...blah) and then add my data to that and spit it out
(basically destroying my plans for simple edits in a simple node and
basically recreating a MeshShape node), or....?

i've tried taking the output handle...and walking the connections down
to the actual shape node that's a kMesh.  but that creates a cycle
when trying to manipulate that (as i'd be manipulating another node
outside of the one i'm in) and sometimes crashes maya--so shouldn't do
that.  ;p

anyway...it sounds simple and must be something i'm just missing as my
API knowledge isn't the best.

graph would be something like:

originalShape -> newCustomNode -> renderableShape (that displays the
color/ UVset)

thanx a TON in advance,


--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to