sweenal / opencollada

Automatically exported from code.google.com/p/opencollada
0 stars 0 forks source link

Bad management of loader object flags with external references #41

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Set loader object flags as below :
        int objectFlags = 
            COLLADASaxFWL::Loader::SCENE_FLAG | 
            COLLADASaxFWL::Loader::VISUAL_SCENES_FLAG |
            COLLADASaxFWL::Loader::LIBRARY_NODES_FLAG |
            COLLADASaxFWL::Loader::GEOMETRY_FLAG |
            COLLADASaxFWL::Loader::EFFECT_FLAG |
            COLLADASaxFWL::Loader::ANIMATION_FLAG |
            COLLADASaxFWL::Loader::IMAGE_FLAG |
            COLLADASaxFWL::Loader::MATERIAL_FLAG;
        saxLoader.setObjectFlags ( objectFlags );

2. Load a document A.dae which references a node in a document B.dae
(external reference). B.dae has one <library_nodes> element which contains
the referenced node. A.dae does not have any <library_nodes> element. 

What is the expected output? What do you see instead?
writeLibraryNodes() should be called once when B.dae is parsed
But it is not. If saxLoader.setObjectFlags is not called, then
writeLibraryNodes is called

What version of the product are you using? On what operating system?
The latest trunk 

Please provide any additional information below.
The problem seems to come from the class variable Loader::mParsedObjectFlags.
If i reset this variable to 0 just before the parsing of the second file,
then it works

Original issue reported on code.google.com by christop...@gmail.com on 17 Dec 2009 at 5:33

GoogleCodeExporter commented 8 years ago
This mechanism to select which parts of a COLLADA should be loaded is not 
mature. It
still requires some work. However, you code should also work, if do not set 
these
flags. Their only purpose is to improve performance by not parsing Part that 
would be
ignored by your software.

Original comment by opencollada2@googlemail.com on 18 Dec 2009 at 10:06

GoogleCodeExporter commented 8 years ago

Original comment by opencollada2@googlemail.com on 19 Jan 2011 at 2:28