We are very interested in getting the layer in the <technique profile=“MAYA”>, but not sure how to get it efficiently. We found domLayer in the domVisual_Scene but under domEvaluate_scene, which seems to be something else based on def of <evaluate_scene>. And we can not convert it to IDREF_array either because there is no count attribute.
Reading <extra> data is simple with the DOM. I’m assuming you’re using DOM 2.0 here.
Let’s say ‘vsLib’ is a daeElement pointer to the <library_visual_scenes> element. You could read the <extra> data like this:
if (daeElement* extra = vsLib->getChild("extra")) {
if (daeElement* technique = extra->getChild("technique")) {
daeElementRefArray children = technique->getChildren();
for (size_t i = 0; i < children.getCount(); i++) {
if (string("layer") == children[i]->getElementName()) {
// Print <layer> info
cout << "Layer name = " << children[i]->getAttribute("name") << endl;
cout << "Layer values = " << children[i]->getCharData() << endl;
}
}
}
}
It looks like the character data is a whitespace separated list of values. There’s a cdom::tokenize function that you can use for breaking up the values based on whitespace if you need it.