ccoba282 / blender2ogre

Automatically exported from code.google.com/p/blender2ogre
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Materials are renamed without warning #62

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an object, and assign material Solid/Red
2. Export the object to Ogre
3. Inspect the generated object.mesh.xml file

What is the expected output? What do you see instead?
It references the material Solid_Red, instead of Solid/Red as I intended. 
Slashes in material names are commonly used in Ogre (see the material files 
shipped with the Ogre SDK), so I don't see a reason to actively prevent their 
use.

What version of the product are you using? On what operating system?
blender2ogre 0.5.9, Blender 2.65 64-bit on Win7 64-bit.

Please provide any additional information below.
It seems that the issue is that clean_object_name is called on the material 
name, from line 6960 onward:

 def material_name( mat ):
     if type(mat) is str: 
         return clean_object_name(mat)
     elif not mat.library: 
         return clean_object_name(mat.name)
     else: 
         return clean_object_name(mat.name + mat.library.filepath.replace('/','_'))

This is fine for a filename, but it breaks material names.

Original issue reported on code.google.com by syb...@stuvel.eu on 6 Feb 2013 at 11:00

Attachments:

GoogleCodeExporter commented 8 years ago
I inspected a model that I exported with a version < 0.5.9, and it exported 
properly with slashes in the material name, so this seems to be a regression.

Original comment by syb...@stuvel.eu on 7 Feb 2013 at 12:29

GoogleCodeExporter commented 8 years ago
This issue has been re-submitted at 
https://bitbucket.org/MindCalamity/blender2ogre-exporter/issue/2/materials-are-r
enamed-without-warning

Original comment by syb...@stuvel.eu on 23 Mar 2013 at 4:41