[Sidefx-houdini-list] Maya API access to "sets"?

François Duchesneau sidefx at trinix.ca
Tue Jan 15 08:03:46 EST 2008

Hi Peter, I've never done plug-in using "sets" but if you're using 
"getMembers" from MFnSet, it gives you a MSelectionList. From that you 
could filter and keep what is only points for example to create a 
Houdini point group.

Have you done your proof of concept only with Mel first? I'm sure it's 
very easy with mel. In addition you'll notice that sometimes with Maya 
plug-in you have to use mel command call inside it, more when you want 
to create objects, but it happens. In that case though if there's 
nothing an API that allows you to filter points, faces etc, you could 
use C++ directly to check whether the returned object contains 
".vtx[*]". There's probably something more efficient but it's just an idea.

I found that main speed improvement of api over mel is parsing loops so 
you can also create the query in mel inside the plug-in that gives you 
an array that can be parsed quickly to write to file in C++. This is 
possible with MFnCommandResult and MFnCommand I think.


Peter Bowmar wrote:
> Hi,
> Does anyone have any experience parsing "sets" in Maya to convert to
> Houdini groups in a .geo exporter? 'cause I'm trying to write one and
> of course, I don't know Maya all that well which doesn't help but
> conceptually things are a bit different too.
> Specifically, as I build the string arrays for each object I'm saving
> from Maya, I need to build an array of group (i.e. set) membership.
> This is complicated by the fact that a set can contain points/faces
> from multiple Maya objects.
> All suggestions welcome!
> Cheers,
> Peter B
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list

More information about the Sidefx-houdini-list mailing list