Re: [Maya2osg-users] Discussion of next changes
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-28 19:26:26
|
Hi J-S, On Fri, May 27, 2011 at 6:57 PM, Jean-Sébastien Guay <jea...@cm...> wrote: > I've added code to get the notes string from Maya nodes and put it as a > description on the corresponding OSG node. I've also started writing > code to export the custom attributes. It would be more general if I > could export all types of custom attributes (within reason), but I can't > find a way in the MPlug class to find out the type of the attribute > (other than trying asString(), if that fails try asFloat(), if that > fails ...). Do you know of a way? I don't know a way of querying the type of an attribute, sorry. However, I don't think that exporting all extra attributes is a good idea. There are utilities that generate lots of attributes. I would focus on the attributes defined by the exporter, maybe naming them with a prefix to identify them (tough we can remove the prefix when creating the OSG descriptions). > Also, I see that the notes appear in the API as a custom attribute (and > in the Maya UI when there's something in the Notes field it also shows > up under "Extra Attributes", and disappears if you remove the text in > the Notes field). I think I'll just export them all that way, as custom > attributes, each attribute in a separate description string, with its > name on the first line. That way, the notes will appear too and we'll > have an easy way of knowing that this description contains whatever was > in the Notes field. Any objections? I don't know if I am understanding you correctly. Is exporting all "Extra attributes" what you are proposing? How do you identify what attributes are "extra attributes", btw? About the "notes" field, yes I would export it like the other custom attributes. Regards, -- Javier Taibo |