OLD | NEW |
1 /* | 1 /* |
2 * $Id$ | 2 * $Id$ |
3 * | 3 * |
4 * ***** BEGIN GPL LICENSE BLOCK ***** | 4 * ***** BEGIN GPL LICENSE BLOCK ***** |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or | 6 * This program is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License | 7 * modify it under the terms of the GNU General Public License |
8 * as published by the Free Software Foundation; either version 2 | 8 * as published by the Free Software Foundation; either version 2 |
9 * of the License, or (at your option) any later version. | 9 * of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 id_us_min((ID *)p->brush); | 89 id_us_min((ID *)p->brush); |
90 id_us_plus((ID *)br); | 90 id_us_plus((ID *)br); |
91 p->brush= br; | 91 p->brush= br; |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 int paint_facesel_test(Object *ob) | 95 int paint_facesel_test(Object *ob) |
96 { | 96 { |
97 return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->edit
flag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_P
AINT|OB_MODE_TEXTURE_PAINT))); | 97 return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->edit
flag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_P
AINT|OB_MODE_TEXTURE_PAINT))); |
98 } | 98 } |
99 | 99 /* Jason */ |
| 100 int paint_vertsel_test(Object *ob) |
| 101 { |
| 102 » return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->edit
flag & ME_EDIT_VERT_SEL) && (ob->mode & OB_MODE_WEIGHT_PAINT)); |
| 103 } |
100 void paint_init(Paint *p, const char col[3]) | 104 void paint_init(Paint *p, const char col[3]) |
101 { | 105 { |
102 Brush *brush; | 106 Brush *brush; |
103 | 107 |
104 /* If there's no brush, create one */ | 108 /* If there's no brush, create one */ |
105 brush = paint_brush(p); | 109 brush = paint_brush(p); |
106 if(brush == NULL) | 110 if(brush == NULL) |
107 brush= add_brush("Brush"); | 111 brush= add_brush("Brush"); |
108 paint_brush_set(p, brush); | 112 paint_brush_set(p, brush); |
109 | 113 |
(...skipping 10 matching lines...) Expand all Loading... |
120 | 124 |
121 /* called when copying scene settings, so even if 'src' and 'tar' are the same | 125 /* called when copying scene settings, so even if 'src' and 'tar' are the same |
122 * still do a id_us_plus(), rather then if we were copying betweem 2 existing | 126 * still do a id_us_plus(), rather then if we were copying betweem 2 existing |
123 * scenes where a matching value should decrease the existing user count as | 127 * scenes where a matching value should decrease the existing user count as |
124 * with paint_brush_set() */ | 128 * with paint_brush_set() */ |
125 void copy_paint(Paint *src, Paint *tar) | 129 void copy_paint(Paint *src, Paint *tar) |
126 { | 130 { |
127 tar->brush= src->brush; | 131 tar->brush= src->brush; |
128 id_us_plus((ID *)tar->brush); | 132 id_us_plus((ID *)tar->brush); |
129 } | 133 } |
OLD | NEW |