Bug fix #2056:
Material texture channels 9 & 10 could not be deactivated. Code used a char instead of a short as flag for this.
This commit is contained in:
@@ -74,9 +74,10 @@ typedef struct Material {
|
||||
float hasize, flaresize, subsize, flareboost;
|
||||
|
||||
/* for buttons and render*/
|
||||
char rgbsel, texact, pr_type, septex;
|
||||
short pr_back, pr_lamp;
|
||||
|
||||
char rgbsel, texact, pr_type, pad;
|
||||
short pr_back, pr_lamp, septex, pad4;
|
||||
int pad5;
|
||||
|
||||
/* shaders */
|
||||
short diff_shader, spec_shader;
|
||||
float roughness, refrac;
|
||||
|
||||
@@ -2724,8 +2724,8 @@ static void material_panel_texture(Material *ma)
|
||||
mtex= ma->mtex[a];
|
||||
if(mtex && mtex->tex) {
|
||||
if(ma->septex & (1<<a))
|
||||
uiDefButC(block, TOG|BIT|a, B_MATPRV_DRAW, " ", -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
|
||||
else uiDefIconButC(block, TOG|BIT|a, B_MATPRV_DRAW, ICON_CHECKBOX_HLT, -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
|
||||
uiDefButS(block, TOG|BIT|a, B_MATPRV_DRAW, " ", -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
|
||||
else uiDefIconButS(block, TOG|BIT|a, B_MATPRV_DRAW, ICON_CHECKBOX_HLT, -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user