My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 4: Material properties override previous ones with the same key without warning
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by sebastia...@gmail.com, Jan 19, 2012
What steps will reproduce the problem?
1. Obtain a COLLADA file with multiple maps (e.g. diffuse and opacity)
2. Import it.

What is the expected output? What do you see instead?
Multiple material properties per texture (e.g. $tex.uvwsrc and $tex.file for the texcoord source and map respectively), but only one set exists regardless of the number of maps.

What version of the product are you using? On what operating system?
Wrapper built from source, loading Assimp 2.0.863 Win32 32bit.


Please provide any additional information below.
I fixed this by adding a check and changing the way the dictionary was populated in Material to be sure:

                // Add it to the table using its name.
                //dProperties[oProperty.getKey()] = oProperty;

                string key = oProperty.getKey();
                if (dProperties.ContainsKey(key))
                {
//I believe this is what Assimp was going for...
                    key = string.Format("{0},{1},{2}", key, oProperty.getSemantic(), oProperty.getTextureIndex());
                }

                dProperties.Add(key, oProperty); //this throws an exception if key already exists, just to be sure...

In the unsafe constructor of 'Material'.

(PS. Thanks for (apart from this teeny bug!) the excellent wrapper, it has saved me so much time!)



Powered by Google Project Hosting