PDA

View Full Version : Implementing single- and double-indexed components


Inos
10-24-2011, 10:34 AM
Hi everyone,

I'm trying to implement component selection on my custom shape, but I'm having a tough time comprehending the apiMeshShape example from the devkit.
This example uses single-indexed components in the form of mesh vertices, and it somehow interconnects those vertices with one of its attributes - mControlPoints, so that when, for example, the selection command looks like this:
select -r transform1.vtx[0] transform1.vtx[4:7] ;it knows how to deal with this. Now, I sort of understand the componentToPlugs() and matchComponent() methods, but there seems to be more than that in the way the mControlPoints attribute is used in other parts of the code.

This attribute is inherited from MPxSurfaceShape, and it's a compound attribute with x, y and z coordinates.
Basically, there are two things I can't derive from the above example:
- what if there were edges instead of vertices? What type of attribute would that require?
- what do I do if my control points are double-indexed (each lies on the given single-indexed edge)?

Thanks for any suggestions.
Inos

CGTalk Moderation
10-24-2011, 10:34 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.