this might be a very simple thing to do, but I have trouble finding out how, and the Collada DOM documentation doesn’t help either:
I’m exporting custom attributes from maya into a <node>, which looks like this:
<node id="playerStart1" name="playerStart1" type="NODE"> <extra> <technique profile="MAYA"> <dynamic_attributes> <soc_type short_name="soc_type" type="string">PLAYER_START</soc_type> <soc_startSpeed short_name="soc_startSpeed" type="float">0</soc_startSpeed> </dynamic_attributes> </technique> </extra> </node>
soc_type and soc_startSpeed are custom attributes that I added to Maya’s transform node, and that get exported in this way by Collada Maya.
My code can reach the daeElement* for the <soc_type> element, but now I’m stuck:
How do I read the string “PLAYER_START” from the element with the Collada DOM? In an ordinary XML DOM, you have a Text node that contains the text data, but there is no such node in Collada’s DOM. There is a daeElement::getValuePointer() method, but it only returns raw memory that doesn’t look like it is my string (the docs say it should be typecast to the ‘appropriate type’ - but how do I find out which one is appropriate?)
I also think that the answer to this question should go into the 101 document (which I find a great idea anyway!), maybe together with a thorough description of the DAE metatype system (which looks powerful, but appears too complex to be only documented with doxygen, as you don’t get an overall picture of how it works)
Thanks in advance,