Results 1 to 3 of 3

Thread: export in collada dom doesnt write the image name

  1. #1
    fistroman
    Guest

    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.

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: export in collada dom doesnt write the image name

    Code :
    image->add("init_from")->setCharData("image.jpg");
    ... looks suspicious. The return value of add() might be a temporary.

  3. #3
    Junior Member
    Join Date
    Dec 2010
    Posts
    3

    Re: export in collada dom doesnt write the image name

    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"

    2) If I add "../texture.bmp" by hand I can't even open the file in RT VIEWER

    Thanks for any help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •