mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 23:21:19 +02:00
g3d exporter sets fully transparent objects to opacity=1
This commit is contained in:
@@ -1765,7 +1765,6 @@ void Game::update() {
|
|||||||
// updateLoops = 0;
|
// updateLoops = 0;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if(world.getFrameCount() == (gameSettings.getNetworkFramePeriod() * 2)){ printf("alles neu\n");}
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
// TTTT new attempt to make things smoother:
|
// TTTT new attempt to make things smoother:
|
||||||
///////////////
|
///////////////
|
||||||
|
@@ -514,6 +514,9 @@ def G3DSaver(filepath, context, operator):
|
|||||||
if material.active_texture.type=='IMAGE' and len(mesh.uv_textures)>0:
|
if material.active_texture.type=='IMAGE' and len(mesh.uv_textures)>0:
|
||||||
diffuseColor = material.diffuse_color
|
diffuseColor = material.diffuse_color
|
||||||
specularColor = material.specular_color
|
specularColor = material.specular_color
|
||||||
|
if material.alpha == 0 : #ignore the opacity if it is 0 . in this case its set to 1.0 to make it visible
|
||||||
|
opacity = 1.0
|
||||||
|
else:
|
||||||
opacity = material.alpha
|
opacity = material.alpha
|
||||||
textures = 1
|
textures = 1
|
||||||
texname = bpy.path.basename(material.active_texture.image.filepath)
|
texname = bpy.path.basename(material.active_texture.image.filepath)
|
||||||
|
Reference in New Issue
Block a user