Hi, I’ve installed the 1.4.1 collada sdk, based on the collada 0.2.2 dom from Sourceforge. I built the libs for Visual Studio 9 (I’m using Visual Studio 2008 Express), but i’ve noticed the files it generated were named *21 (ex, libcollada14dom21-sd.lib) - is this normal? The zip file and folders created during extraction are named *22, as are the filenames listed in the installation instructions, so I’m guessing something is wrong, but i’m not sure where.
I have built some sample applications however, and am rather flustered over the setting of attribute data in two particular cases, the first being for setting image width/height for images in library_images. My problem with this, is that some data is set automatically and i don’t want it to be. This is the code i’m using;
char* samplename = "whatever.bmp";
daeElement* image = libraryimages->add("image");
image->setAttribute("id", samplename);
image->setAttribute("name",samplename);
image->add("init_from")->setCharData(samplename);
…and this is the output…
<image id="whatever.bmp" name="whatever.bmp" height="0" width="0">
<init_from>whatever.bmp</init_from>
</image>
This is just test code to get used to the sdk, but at no point have I set the height or width, nor do i wish for it to be in my final output. Is there a way to remove it?
My other big issue, is that i can not seem to be able to set the “type” attribute of a node, to anything besides “JOINT”. Here’s what i’m doing…
anode->setAttribute("id","object_name-node");
anode->setAttribute("name","object_name");
anode->setAttribute("type","NODE");
…and the output…
<node id="object_name-node" name="object_name"/>
However, if i use this…
anode->setAttribute(“type”,“JOINT”);
…then i get this…
<node id="object_name-node" name="object_name" type="JOINT"/>
Am i missing something? I’ve also tried casting to a domNode and using setType…
domNode* anode = (domNode*)visualscene->add("node");
anode->setType(NODETYPE_NODE);
…but this results in precisely the same problem.
Any advice would be appreciated.