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:
Simon Clitherow
2004-12-29 17:04:14 +00:00
parent 183ee861e8
commit 8c8f010df2
2 changed files with 6 additions and 5 deletions

View File

@@ -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;

View File

@@ -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");
}
}