Fixed a transparency export bug

This commit is contained in:
Josh Yelon 2008-04-24 01:56:35 +00:00
parent 079879fc90
commit 5547786f00
1 changed files with 4 additions and 10 deletions

View File

@ -299,19 +299,13 @@ calculate_pairings() {
_all_maps[i]->_opposite = 0;
}
bool using_color_alpha = (_trans_maps.size() > 0);
for (size_t i=0; i<_color_maps.size(); i++) {
if ((_color_maps[i]->_blend_type != MayaShaderColorDef::BT_modulate)&&
(_color_maps[i]->_blend_type != MayaShaderColorDef::BT_unspecified)) {
using_color_alpha = true;
}
}
bool using_transparency = (_trans_maps.size() > 0);
for (int retry=0; retry<2; retry++) {
bool perfect=(retry==0);
for (size_t i=0; i<_color_maps.size(); i++) {
if ((_color_maps[i]->_blend_type != MayaShaderColorDef::BT_modulate)&&
(_color_maps[i]->_blend_type != MayaShaderColorDef::BT_unspecified)) {
if ((_color_maps[i]->_blend_type == MayaShaderColorDef::BT_modulate)||
(_color_maps[i]->_blend_type == MayaShaderColorDef::BT_unspecified)) {
for (size_t j=0; j<_trans_maps.size(); j++) {
try_pair(_color_maps[i], _trans_maps[j], perfect);
}
@ -319,7 +313,7 @@ calculate_pairings() {
}
}
if (!using_color_alpha) {
if (!using_transparency) {
for (int retry=0; retry<2; retry++) {
bool perfect=(retry==0);
for (size_t i=0; i<_color_maps.size(); i++) {