[Sidefx-houdini-list] Maya API access to "sets"?
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:
> 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!
> Peter B
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list