LEFT | RIGHT |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 int vert_paint_poll(bContext *C) | 1134 int vert_paint_poll(bContext *C) |
1135 { | 1135 { |
1136 return paint_vertsel_test(CTX_data_active_object(C)); | 1136 return paint_vertsel_test(CTX_data_active_object(C)); |
1137 } | 1137 } |
1138 | 1138 |
1139 int mask_paint_poll(bContext *C) | 1139 int mask_paint_poll(bContext *C) |
1140 { | 1140 { |
1141 return paint_facesel_test(CTX_data_active_object(C)) || paint_vertsel_te
st(CTX_data_active_object(C)); | 1141 return paint_facesel_test(CTX_data_active_object(C)) || paint_vertsel_te
st(CTX_data_active_object(C)); |
1142 } | 1142 } |
1143 | 1143 |
1144 | |
1145 static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, flo
at *rgba, float alpha, float mask) { | |
1146 if (ps->is_texbrush) { | |
1147 rgba[0] *= ps->brush->rgb[0]; | |
1148 rgba[1] *= ps->brush->rgb[1]; | |
1149 rgba[2] *= ps->brush->rgb[2]; | |
1150 } | |
1151 else { | |
1152 VECCOPY(rgba, ps->brush->rgb); | |
1153 } | |
1154 ········ | |
1155 if (ps->is_airbrush==0 && mask < 1.0f) { | |
LEFT | RIGHT |