lesliejaneth / opencollada

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

Multiple textures with the same name get the same ID #107

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Create some mesh in 3ds Max
2. Create two materials, using different diffuse texture maps, but where the 
images have the same name (i.e. from different folders)
3. Apply both the materials to the mesh
3. Export using OpenCOLLADA

What is the expected output? What do you see instead?

The "id" attribute for each <image> in the resulting <library_images> should be 
unique within the document, but OpenCOLLADA does not generate unique IDs if 
they have the same filename. Both come out as, for instance, "GreyGrid_tga". 
OpenCOLLADA should append some incrementing number to any image IDs if the 
filenames are the same. This is already done for the ID field of materials 
where the Max materials have the same name, for instance. I suppose in fact 
this should be generalised across all "id" attributes, since a Max material 
might have the same name as an image filename that's also used in the scene.

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

OpenCOLLADA 1.2.5 revision 734:737M according to exported documents (though 
it's labelled as 1.3.0 on the Google Code downloads page), for 3ds Max 8 on 
Windows XP Pro SP3.

Original issue reported on code.google.com by myrmecop...@gmail.com on 20 Aug 2010 at 3:01

GoogleCodeExporter commented 8 years ago
Also just discovered this needs attention when the "copy images" user option is 
selected. Because they have the same filename, you only end up with one file in 
the "images" subfolder of the destination. It should append the same number to 
the destination filename when creating the copy as it does when creating the 
<image> node.

Original comment by myrmecop...@gmail.com on 20 Aug 2010 at 3:16

GoogleCodeExporter commented 8 years ago

Original comment by opencollada2@googlemail.com on 25 Jan 2011 at 12:34