Unselect the branch if the object has become fully translucent.
This commit is contained in:
@@ -109,10 +109,16 @@ change_alpha( ssgBase *_branch, float _blend )
|
|||||||
|
|
||||||
int num_colors = ((ssgLeaf *)_branch)->getNumColours();
|
int num_colors = ((ssgLeaf *)_branch)->getNumColours();
|
||||||
|
|
||||||
for (i = 0; i < num_colors; i++)
|
if ( _blend == 1.0 ) { // fully translucent.
|
||||||
{
|
for (i = 0; i < num_colors; i++)
|
||||||
float *color = ((ssgLeaf *)_branch)->getColour(i);
|
((ssgSelector *)_branch)->select(0x0000); // deselect item.
|
||||||
color[3] = _blend;
|
} else {
|
||||||
|
for (i = 0; i < num_colors; i++)
|
||||||
|
{
|
||||||
|
((ssgSelector *)_branch)->select(0xffff);
|
||||||
|
float *color = ((ssgLeaf *)_branch)->getColour(i);
|
||||||
|
color[3] = _blend;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user