Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/DerivedMesh.c
| Show First 20 Lines • Show All 1,207 Lines • ▼ Show 20 Lines | for (i = numVerts; i != 0; i--, wc++, dv++) { | ||||
| calc_weightpaint_vert_color((unsigned char *)wc, dv, dm_wcinfo, defbase_tot, defbase_act, defbase_sel, defbase_sel_tot, draw_flag); | calc_weightpaint_vert_color((unsigned char *)wc, dv, dm_wcinfo, defbase_tot, defbase_act, defbase_sel, defbase_sel_tot, draw_flag); | ||||
| } | } | ||||
| if (defbase_sel) { | if (defbase_sel) { | ||||
| MEM_freeN(defbase_sel); | MEM_freeN(defbase_sel); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| int col_i; | unsigned char col_i[4]; | ||||
| if (draw_flag & (CALC_WP_GROUP_USER_ACTIVE | CALC_WP_GROUP_USER_ALL)) { | if (draw_flag & (CALC_WP_GROUP_USER_ACTIVE | CALC_WP_GROUP_USER_ALL)) { | ||||
| col_i = 0; | copy_v3_v3_char(col_i, dm_wcinfo->alert_color); | ||||
| col_i[3] = 255; | |||||
gaiaclary: Here is the reason why a face is drawn in black when no weights are defined for the face verts. | |||||
| } | } | ||||
| else { | else { | ||||
| weightpaint_color((unsigned char *)&col_i, dm_wcinfo, 0.0f); | weightpaint_color(col_i, dm_wcinfo, 0.0f); | ||||
| } | } | ||||
| fill_vn_i((int *)r_wtcol_v, numVerts, col_i); | fill_vn_i((int *)r_wtcol_v, numVerts, *(int *)col_i); | ||||
| } | } | ||||
| } | } | ||||
| /* return an array of vertex weight colors from given weights, caller must free. | /* return an array of vertex weight colors from given weights, caller must free. | ||||
| * | * | ||||
| * note that we could save some memory and allocate RGB only but then we'd need to | * note that we could save some memory and allocate RGB only but then we'd need to | ||||
| * re-arrange the colors when copying to the face since MCol has odd ordering, | * re-arrange the colors when copying to the face since MCol has odd ordering, | ||||
| * so leave this as is - campbell */ | * so leave this as is - campbell */ | ||||
| ▲ Show 20 Lines • Show All 2,205 Lines • Show Last 20 Lines | |||||
Here is the reason why a face is drawn in black when no weights are defined for the face verts.
This change uses the Theme's "unreferenced weights color" instead.