From a7b1f95ee41e2eec65085edf40674cc9fdcba32c Mon Sep 17 00:00:00 2001 From: Titus Tscharntke Date: Wed, 10 Apr 2013 00:15:53 +0000 Subject: [PATCH] g3d exporter sets fully transparent objects to opacity=1 --- source/glest_game/game/game.cpp | 1 - source/tools/glexemel/g3d_support_b263.py | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 6e65a988e..7bd07dad1 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -1765,7 +1765,6 @@ void Game::update() { // updateLoops = 0; // } - if(world.getFrameCount() == (gameSettings.getNetworkFramePeriod() * 2)){ printf("alles neu\n");} ///////////////////////////////// // TTTT new attempt to make things smoother: /////////////// diff --git a/source/tools/glexemel/g3d_support_b263.py b/source/tools/glexemel/g3d_support_b263.py index b54ea21a7..812113dee 100644 --- a/source/tools/glexemel/g3d_support_b263.py +++ b/source/tools/glexemel/g3d_support_b263.py @@ -514,7 +514,10 @@ def G3DSaver(filepath, context, operator): if material.active_texture.type=='IMAGE' and len(mesh.uv_textures)>0: diffuseColor = material.diffuse_color specularColor = material.specular_color - opacity = material.alpha + 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 textures = 1 texname = bpy.path.basename(material.active_texture.image.filepath) else: