Re: [Maya2osg-users] Discussion of next changes
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-19 15:52:21
|
Hi, On Thu, May 19, 2011 at 4:22 PM, Jean-Sébastien Guay <jea...@cm...> wrote: >> So, yes, we can add a String Attribute to a Maya Node, maya2osg would >> search for it, and add its contrent to the apropriate osg description. >> It should be only one, as generic as possible. When you add such an >> Attribute, its a one liner in the Attribute Editor. If you wanna add >> multiple Values like, you need to do itsimilar to this way: >> strength(value);offset(value);falloff(value);rad(value); > > Where will I see these attributes in Maya? Are they already exported in > the OSG node descriptions? If not, how do I access them in the C++ > plugin code to export them? If you mean new attributes you create, they appear in the "Extra Attributes" section in the Attribute Editor. You can create them from the Attribute Editor in the menu option Attributes > Add Attributes or from MEL with addAttr (and then modify its properties with setAttr). Example: addAttr -ln "myattr" -at double |pSphere1|pSphereShape1; setAttr -e-keyable true |pSphere1|pSphereShape1.myattr; You can access them from C++ through the MDependencyNode interface. All attributes can be accessed in the C++ API as plugs (see MFnPlug). There are several places in the plug-in where it is done currently. > Also, I see on various (all?) Maya objects there is a Notes field at the > bottom of the property editor. Perhaps special things could be added > there, and that should be exported in the OSG node descriptions too? This is the generic description Peter was talking about, but I see cleaner to use a custom string attribute for writing OSG descriptions in it, because the Notes can be already used by the artists or the scenes you are working with, and that could introduce confusion or be a source of problems. What do you think? -- Javier Taibo |