CoDEmanX / blender-cod

Blender Add-On for Call of Duty® modding
83 stars 26 forks source link

Exported models use wrong material (mostly the first) #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create at least two mesh objects with different materials
2. Export to xmodel_export
3. Convert into xmodel and load into radiant

What is the expected output? What do you see instead?
Model should use the two materials like in Blender. But it uses the first 
material for both.

Please use labels and text to provide additional information.
It's a mistake I made, I assumed Face.material_index referenced a global 
material in bpy.data.materials, but it's actually an object's material slot 
number. Need to rethink the material handling code.

Original issue reported on code.google.com by codem...@gmx.de on 28 Nov 2011 at 10:35

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 3bc9890d324d.

Original comment by codem...@gmx.de on 29 Nov 2011 at 7:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 3adb17744c39.

Original comment by codem...@gmx.de on 30 Nov 2011 at 4:40

GoogleCodeExporter commented 9 years ago
Changed model v5 export: material index as 2nd value instead of 3rd (TRI 1 2 3 
4).

3rd value unknown, can be higher than object and material count

4th value mostly 1, but rarely 0 ?!

Original comment by codem...@gmx.de on 30 Nov 2011 at 4:42