imp: show alert color if mesh has weight groups but no active group is selected

This commit is contained in:
Gaia Clary 2015-11-03 20:19:03 +01:00
parent 8c25c1c484
commit 584f439112
1 changed files with 4 additions and 1 deletions

View File

@ -1468,7 +1468,10 @@ static void calc_weightpaint_vert_array(
}
else {
unsigned char col[4];
if (draw_flag & (CALC_WP_GROUP_USER_ACTIVE | CALC_WP_GROUP_USER_ALL)) {
if ((ob->actdef == 0) && !BLI_listbase_is_empty(&ob->defbase)) {
ARRAY_SET_ITEMS(col, 0xff, 0, 0xff, 0xff);
}
else if (draw_flag & (CALC_WP_GROUP_USER_ACTIVE | CALC_WP_GROUP_USER_ALL)) {
copy_v3_v3_char((char *)col, dm_wcinfo->alert_color);
col[3] = 255;
}