export in collada dom doesnt write the image name

Hi all,

I am using the sample export from Collada dom to export my meshes in .dae format. The only problem I have is in this function:

testResult addImage(daeElement* root) {
SafeAdd(root, “library_images”, imageLib);
SafeAdd(imageLib, “image”, image);
image->setAttribute(“id”, “img”);
image->add(“init_from”)->setCharData(“image.jpg”);

return testResult(true);

}

The only thing I get in the .dae file is this:

<library_images>
<image id=“img”>
<init_from/>
</image>
</library_images>

Any idea why the path to the image doesnt appear??

thanks!
Jaime.

image->add("init_from")->setCharData("image.jpg");

… looks suspicious. The return value of add() might be a temporary.

I’m evaluating the DOM but I’ve a problem at a “HelloWorld”-like sample which is bad… for an experienced programmer.
I’m currently working with domTEST samples and more precisely with one named “export” in DOM 1.5.0. This sample should export a cube with one texture “texture.bmp”.

I’ve (dec2010) exactly the same problem as described above (2009)

the code in export.cpp is
testResult addImage(daeElement* root) {
SafeAdd(root, “library_images”, imageLib);
SafeAdd(imageLib, “image”, image);
image->setAttribute(“id”, “img”);
image->add(“init_from”)->setCharData("…/texture.bmp");
return testResult(true);
}
the .dae is
<library_images>
<image id=“img”>
<init_from/>
</image>
</library_images>

no trace of “…/texture.bmp”

  1. If I add “…/texture.bmp” by hand I can’t even open the file in RT VIEWER

Thanks for any help.