Hi,
I built collada dom 1.5 and try to load a file exported with 3ds max 2010.
Max export file as 1.4 version and collada dom break the load process @ daeIOPluginCommon line 170 :
if (parentElement == NULL) {
// This is the root element. Check the COLLADA version.
daeURI *xmlns = (daeURI*)(element->getMeta()->getMetaAttribute( "xmlns" )->getWritableMemory( element ));
if ( strcmp( xmlns->getURI(), COLLADA_NAMESPACE ) != 0 ) {
// Invalid COLLADA version
daeErrorHandler::get()->handleError("Trying to load an invalid COLLADA version for this DOM build!");
return NULL;
}
}
the dae file :
<?xml version=“1.0” encoding=“utf-8”?>
<COLLADA xmlns=“COLLADA 1.4 Schema” version=“1.4.0”>
<asset>
<contributor>
<author></author>
<authoring_tool>FBX COLLADA exporter</authoring_tool>
<comments></comments>
</contributor>
<created>2011-03-20T13:46:22Z</created>
<modified>2011-03-20T13:46:22Z</modified>
<revision></revision>
<title></title>
<subject></subject>
<keywords></keywords>
<unit meter=“1.000000”/>
<up_axis>Y_UP</up_axis>
</asset>
<library_geometries>
<geometry id=“Box01-lib” name=“Box01Mesh”>
<mesh>
<source id=“Box01-lib-Position”>
<float_array id=“Box01-lib-Position-array” count=“24”>
-71.734482 -46.252678 0.000000
71.734482 -46.252678 0.000000
-71.734482 46.252678 0.000000
71.734482 46.252678 0.000000
-71.734482 -46.252678 45.396145
71.734482 -46.252678 45.396145
-71.734482 46.252678 45.396145
71.734482 46.252678 45.396145
</float_array>
<technique_common>
<accessor source=“#Box01-lib-Position-array” count=“8” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<source id=“Box01-lib-Normal0”>
<float_array id=“Box01-lib-Normal0-array” count=“108”>
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 -1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 0.000000 1.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
0.000000 -1.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
0.000000 1.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
-1.000000 0.000000 0.000000
</float_array>
<technique_common>
<accessor source=“#Box01-lib-Normal0-array” count=“36” stride=“3”>
<param name=“X” type=“float”/>
<param name=“Y” type=“float”/>
<param name=“Z” type=“float”/>
</accessor>
</technique_common>
</source>
<source id=“Box01-lib-UV0”>
<float_array id=“Box01-lib-UV0-array” count=“24”>
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000
0.000000 0.000000
1.000000 0.000000
0.000000 1.000000
1.000000 1.000000
</float_array>
<technique_common>
<accessor source=“#Box01-lib-UV0-array” count=“12” stride=“2”>
<param name=“S” type=“float”/>
<param name=“T” type=“float”/>
</accessor>
</technique_common>
</source>
<vertices id=“Box01-lib-Vertex”>
<input semantic=“POSITION” source=“#Box01-lib-Position”/>
</vertices>
<polygons count=“12”>
<input semantic=“VERTEX” offset=“0” source=“#Box01-lib-Vertex”/>
<input semantic=“NORMAL” offset=“1” source=“#Box01-lib-Normal0”/>
<input semantic=“TEXCOORD” offset=“2” set=“0” source=“#Box01-lib-UV0”/>
0 0 9 2 1 11 3 2 10</p>
3 3 10 1 4 8 0 5 9</p>
4 6 8 5 7 9 7 8 11</p>
7 9 11 6 10 10 4 11 8</p>
0 12 4 1 13 5 5 14 7</p>
5 15 7 4 16 6 0 17 4</p>
1 18 0 3 19 1 7 20 3</p>
7 21 3 5 22 2 1 23 0</p>
3 24 4 2 25 5 6 26 7</p>
6 27 7 7 28 6 3 29 4</p>
2 30 0 0 31 1 4 32 3</p>
4 33 3 6 34 2 2 35 0</p>
</polygons>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id=“RootNode” name=“RootNode”>
<node id=“Box01” name=“Box01”>
<matrix sid=“matrix”>1.000000 0.000000 0.000000 5.139187 0.000000 0.000000 1.000000 0.000000 0.000000 -1.000000 0.000000 -2.997858 0.000000 0.000000 0.000000 1.000000</matrix>
<instance_geometry url=“#Box01-lib”/>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url=“#RootNode”/>
</scene>
</COLLADA>