Blender  V2.93
paint_hide.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2010 by Nicholas Bishop
17  * All rights reserved.
18  * Implements the PBVH node hiding operator
19  */
20 
25 #include "MEM_guardedalloc.h"
26 
27 #include "BLI_bitmap.h"
28 #include "BLI_math_vector.h"
29 #include "BLI_utildefines.h"
30 
31 #include "DNA_mesh_types.h"
32 #include "DNA_meshdata_types.h"
33 #include "DNA_object_types.h"
34 #include "DNA_scene_types.h"
35 
36 #include "BKE_ccg.h"
37 #include "BKE_context.h"
38 #include "BKE_mesh.h"
39 #include "BKE_multires.h"
40 #include "BKE_paint.h"
41 #include "BKE_pbvh.h"
42 #include "BKE_subsurf.h"
43 
44 #include "DEG_depsgraph.h"
45 
46 #include "WM_api.h"
47 #include "WM_types.h"
48 
49 #include "ED_screen.h"
50 #include "ED_view3d.h"
51 
52 #include "RNA_access.h"
53 #include "RNA_define.h"
54 
55 #include "bmesh.h"
56 
57 #include "paint_intern.h"
58 
59 /* For undo push. */
60 #include "sculpt_intern.h"
61 
62 /* Return true if the element should be hidden/shown. */
64  float planes[4][4],
65  const float co[3],
66  const float mask)
67 {
68  if (area == PARTIALVIS_ALL) {
69  return true;
70  }
71  if (area == PARTIALVIS_MASKED) {
72  return mask > 0.5f;
73  }
74 
75  bool inside = isect_point_planes_v3(planes, 4, co);
76  return ((inside && area == PARTIALVIS_INSIDE) || (!inside && area == PARTIALVIS_OUTSIDE));
77 }
78 
80  PBVH *pbvh,
81  PBVHNode *node,
82  PartialVisAction action,
84  float planes[4][4])
85 {
86  Mesh *me = ob->data;
87  MVert *mvert;
88  const float *paint_mask;
89  const int *vert_indices;
90  int totvert, i;
91  bool any_changed = false, any_visible = false;
92 
93  BKE_pbvh_node_num_verts(pbvh, node, NULL, &totvert);
94  BKE_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
95  paint_mask = CustomData_get_layer(&me->vdata, CD_PAINT_MASK);
96 
98 
99  for (i = 0; i < totvert; i++) {
100  MVert *v = &mvert[vert_indices[i]];
101  float vmask = paint_mask ? paint_mask[vert_indices[i]] : 0;
102 
103  /* Hide vertex if in the hide volume. */
104  if (is_effected(area, planes, v->co, vmask)) {
105  if (action == PARTIALVIS_HIDE) {
106  v->flag |= ME_HIDE;
107  }
108  else {
109  v->flag &= ~ME_HIDE;
110  }
111  any_changed = true;
112  }
113 
114  if (!(v->flag & ME_HIDE)) {
115  any_visible = true;
116  }
117  }
118 
119  if (any_changed) {
121  BKE_pbvh_node_fully_hidden_set(node, !any_visible);
122  }
123 }
124 
125 /* Hide or show elements in multires grids with a special GridFlags
126  * customdata layer. */
128  Object *ob,
129  PBVH *pbvh,
130  PBVHNode *node,
131  PartialVisAction action,
133  float planes[4][4])
134 {
135  CCGElem **grids;
136  BLI_bitmap **grid_hidden;
137  int *grid_indices, totgrid;
138  bool any_changed = false, any_visible = false;
139 
140  /* Get PBVH data. */
141  BKE_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid, NULL, NULL, &grids);
142  grid_hidden = BKE_pbvh_grid_hidden(pbvh);
143  CCGKey key = *BKE_pbvh_get_grid_key(pbvh);
144 
146 
147  for (int i = 0; i < totgrid; i++) {
148  int any_hidden = 0;
149  int g = grid_indices[i];
150  BLI_bitmap *gh = grid_hidden[g];
151 
152  if (!gh) {
153  switch (action) {
154  case PARTIALVIS_HIDE:
155  /* Create grid flags data. */
156  gh = grid_hidden[g] = BLI_BITMAP_NEW(key.grid_area, "partialvis_update_grids");
157  break;
158  case PARTIALVIS_SHOW:
159  /* Entire grid is visible, nothing to show. */
160  continue;
161  }
162  }
163  else if (action == PARTIALVIS_SHOW && area == PARTIALVIS_ALL) {
164  /* Special case if we're showing all, just free the grid. */
165  MEM_freeN(gh);
166  grid_hidden[g] = NULL;
167  any_changed = true;
168  any_visible = true;
169  continue;
170  }
171 
172  for (int y = 0; y < key.grid_size; y++) {
173  for (int x = 0; x < key.grid_size; x++) {
174  CCGElem *elem = CCG_grid_elem(&key, grids[g], x, y);
175  const float *co = CCG_elem_co(&key, elem);
176  float mask = key.has_mask ? *CCG_elem_mask(&key, elem) : 0.0f;
177 
178  /* Skip grid element if not in the effected area. */
179  if (is_effected(area, planes, co, mask)) {
180  /* Set or clear the hide flag. */
181  BLI_BITMAP_SET(gh, y * key.grid_size + x, action == PARTIALVIS_HIDE);
182 
183  any_changed = true;
184  }
185 
186  /* Keep track of whether any elements are still hidden. */
187  if (BLI_BITMAP_TEST(gh, y * key.grid_size + x)) {
188  any_hidden = true;
189  }
190  else {
191  any_visible = true;
192  }
193  }
194  }
195 
196  /* If everything in the grid is now visible, free the grid flags. */
197  if (!any_hidden) {
198  MEM_freeN(gh);
199  grid_hidden[g] = NULL;
200  }
201  }
202 
203  /* Mark updates if anything was hidden/shown. */
204  if (any_changed) {
206  BKE_pbvh_node_fully_hidden_set(node, !any_visible);
208  }
209 }
210 
212  GSet *verts,
213  PartialVisAction action,
215  float planes[4][4],
216  bool *any_changed,
217  bool *any_visible)
218 {
219  GSetIterator gs_iter;
220 
221  GSET_ITER (gs_iter, verts) {
222  BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
223  float *vmask = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_PAINT_MASK);
224 
225  /* Hide vertex if in the hide volume. */
226  if (is_effected(area, planes, v->co, *vmask)) {
227  if (action == PARTIALVIS_HIDE) {
229  }
230  else {
232  }
233  (*any_changed) = true;
234  }
235 
237  (*any_visible) = true;
238  }
239  }
240 }
241 
243 {
244  GSetIterator gs_iter;
245 
246  GSET_ITER (gs_iter, faces) {
247  BMFace *f = BLI_gsetIterator_getKey(&gs_iter);
248 
251  }
252  else {
254  }
255  }
256 }
257 
259  PBVH *pbvh,
260  PBVHNode *node,
261  PartialVisAction action,
263  float planes[4][4])
264 {
265  BMesh *bm;
266  GSet *unique, *other, *faces;
267  bool any_changed = false, any_visible = false;
268 
269  bm = BKE_pbvh_get_bmesh(pbvh);
273 
275 
276  partialvis_update_bmesh_verts(bm, unique, action, area, planes, &any_changed, &any_visible);
277 
278  partialvis_update_bmesh_verts(bm, other, action, area, planes, &any_changed, &any_visible);
279 
280  /* Finally loop over node faces and tag the ones that are fully hidden. */
282 
283  if (any_changed) {
285  BKE_pbvh_node_fully_hidden_set(node, !any_visible);
286  }
287 }
288 
289 static void rect_from_props(rcti *rect, PointerRNA *ptr)
290 {
291  rect->xmin = RNA_int_get(ptr, "xmin");
292  rect->ymin = RNA_int_get(ptr, "ymin");
293  rect->xmax = RNA_int_get(ptr, "xmax");
294  rect->ymax = RNA_int_get(ptr, "ymax");
295 }
296 
299  float clip_planes[4][4],
300  const rcti *rect)
301 {
302  ViewContext vc;
303  BoundBox bb;
304 
307  ED_view3d_clipping_calc(&bb, clip_planes, vc.region, vc.obact, rect);
308 }
309 
310 /* If mode is inside, get all PBVH nodes that lie at least partially
311  * inside the clip_planes volume. If mode is outside, get all nodes
312  * that lie at least partially outside the volume. If showing all, get
313  * all nodes. */
314 static void get_pbvh_nodes(
315  PBVH *pbvh, PBVHNode ***nodes, int *totnode, float clip_planes[4][4], PartialVisArea mode)
316 {
318 
319  /* Select search callback. */
320  switch (mode) {
321  case PARTIALVIS_INSIDE:
323  break;
324  case PARTIALVIS_OUTSIDE:
326  break;
327  case PARTIALVIS_ALL:
328  case PARTIALVIS_MASKED:
329  break;
330  }
331 
332  PBVHFrustumPlanes frustum = {.planes = clip_planes, .num_planes = 4};
333  BKE_pbvh_search_gather(pbvh, cb, &frustum, nodes, totnode);
334 }
335 
337 {
338  ARegion *region = CTX_wm_region(C);
341  Mesh *me = ob->data;
342  PartialVisAction action;
344  PBVH *pbvh;
345  PBVHNode **nodes;
346  PBVHType pbvh_type;
347  float clip_planes[4][4];
348  rcti rect;
349  int totnode;
350 
351  /* Read operator properties. */
352  action = RNA_enum_get(op->ptr, "action");
353  area = RNA_enum_get(op->ptr, "area");
354  rect_from_props(&rect, op->ptr);
355 
356  clip_planes_from_rect(C, depsgraph, clip_planes, &rect);
357 
359  BLI_assert(ob->sculpt->pbvh == pbvh);
360 
361  get_pbvh_nodes(pbvh, &nodes, &totnode, clip_planes, area);
362  pbvh_type = BKE_pbvh_type(pbvh);
363 
364  negate_m4(clip_planes);
365 
366  /* Start undo. */
367  switch (action) {
368  case PARTIALVIS_HIDE:
369  SCULPT_undo_push_begin(ob, "Hide area");
370  break;
371  case PARTIALVIS_SHOW:
372  SCULPT_undo_push_begin(ob, "Show area");
373  break;
374  }
375 
376  for (int i = 0; i < totnode; i++) {
377  switch (pbvh_type) {
378  case PBVH_FACES:
379  partialvis_update_mesh(ob, pbvh, nodes[i], action, area, clip_planes);
380  break;
381  case PBVH_GRIDS:
382  partialvis_update_grids(depsgraph, ob, pbvh, nodes[i], action, area, clip_planes);
383  break;
384  case PBVH_BMESH:
385  partialvis_update_bmesh(ob, pbvh, nodes[i], action, area, clip_planes);
386  break;
387  }
388  }
389 
390  if (nodes) {
391  MEM_freeN(nodes);
392  }
393 
394  /* End undo. */
396 
397  /* Ensure that edges and faces get hidden as well (not used by
398  * sculpt but it looks wrong when entering editmode otherwise). */
399  if (pbvh_type == PBVH_FACES) {
401  }
402 
404 
406  ED_region_tag_redraw(region);
407 
408  return OPERATOR_FINISHED;
409 }
410 
411 static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
412 {
413  PartialVisArea area = RNA_enum_get(op->ptr, "area");
414 
416  return WM_gesture_box_invoke(C, op, event);
417  }
418  return op->type->exec(C, op);
419 }
420 
422 {
423  static const EnumPropertyItem action_items[] = {
424  {PARTIALVIS_HIDE, "HIDE", 0, "Hide", "Hide vertices"},
425  {PARTIALVIS_SHOW, "SHOW", 0, "Show", "Show vertices"},
426  {0, NULL, 0, NULL, NULL},
427  };
428 
429  static const EnumPropertyItem area_items[] = {
430  {PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside", "Hide or show vertices outside the selection"},
431  {PARTIALVIS_INSIDE, "INSIDE", 0, "Inside", "Hide or show vertices inside the selection"},
432  {PARTIALVIS_ALL, "ALL", 0, "All", "Hide or show all vertices"},
434  "MASKED",
435  0,
436  "Masked",
437  "Hide or show vertices that are masked (minimum mask value of 0.5)"},
438  {0, NULL, 0, NULL, NULL},
439  };
440 
441  /* Identifiers. */
442  ot->name = "Hide/Show";
443  ot->idname = "PAINT_OT_hide_show";
444  ot->description = "Hide/show some vertices";
445 
446  /* API callbacks. */
450  /* Sculpt-only for now. */
452 
454 
455  /* RNA. */
457  "action",
458  action_items,
460  "Action",
461  "Whether to hide or show vertices");
462  RNA_def_enum(
463  ot->srna, "area", area_items, PARTIALVIS_INSIDE, "Area", "Which vertices to hide or show");
464 
466 }
BLI_INLINE CCGElem * CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y)
Definition: BKE_ccg.h:124
BLI_INLINE float * CCG_elem_mask(const CCGKey *key, CCGElem *elem)
Definition: BKE_ccg.h:113
struct CCGElem CCGElem
Definition: BKE_ccg.h:46
BLI_INLINE float * CCG_elem_co(const CCGKey *key, CCGElem *elem)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Definition: context.c:1424
struct Object * CTX_data_active_object(const bContext *C)
Definition: context.c:1279
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:725
void * CustomData_get_layer(const struct CustomData *data, int type)
void * CustomData_bmesh_get(const struct CustomData *data, void *block, int type)
void BKE_mesh_flush_hidden_from_verts(struct Mesh *me)
void multires_mark_as_modified(struct Depsgraph *depsgraph, struct Object *object, enum MultiresModifiedFlags flags)
Definition: multires.c:406
bool paint_is_bmesh_face_hidden(struct BMFace *f)
Definition: paint.c:1257
struct PBVH * BKE_sculpt_object_pbvh_ensure(struct Depsgraph *depsgraph, struct Object *ob)
Definition: paint.c:2171
A BVH for high poly meshes.
void BKE_pbvh_node_get_verts(PBVH *pbvh, PBVHNode *node, const int **r_vert_indices, struct MVert **r_verts)
Definition: pbvh.c:1820
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert)
Definition: pbvh.c:1834
bool BKE_pbvh_node_frustum_contain_AABB(PBVHNode *node, void *frustum)
Definition: pbvh.c:2630
PBVHType BKE_pbvh_type(const PBVH *pbvh)
Definition: pbvh.c:1661
bool BKE_pbvh_node_frustum_exclude_AABB(PBVHNode *node, void *frustum)
Definition: pbvh.c:2640
struct BMesh * BKE_pbvh_get_bmesh(PBVH *pbvh)
Definition: pbvh.c:1724
void BKE_pbvh_node_mark_rebuild_draw(PBVHNode *node)
Definition: pbvh.c:1754
const struct CCGKey * BKE_pbvh_get_grid_key(const PBVH *pbvh)
Definition: pbvh.c:1694
struct GSet * BKE_pbvh_bmesh_node_other_verts(PBVHNode *node)
Definition: pbvh_bmesh.c:2126
PBVHType
Definition: BKE_pbvh.h:209
@ PBVH_GRIDS
Definition: BKE_pbvh.h:211
@ PBVH_BMESH
Definition: BKE_pbvh.h:212
@ PBVH_FACES
Definition: BKE_pbvh.h:210
struct GSet * BKE_pbvh_bmesh_node_faces(PBVHNode *node)
Definition: pbvh_bmesh.c:2131
void BKE_pbvh_node_get_grids(PBVH *pbvh, PBVHNode *node, int **grid_indices, int *totgrid, int *maxgrid, int *gridsize, struct CCGElem ***r_griddata)
Definition: pbvh.c:1868
void BKE_pbvh_node_fully_hidden_set(PBVHNode *node, int fully_hidden)
Definition: pbvh.c:1769
struct GSet * BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node)
Definition: pbvh_bmesh.c:2121
unsigned int ** BKE_pbvh_grid_hidden(const PBVH *pbvh)
Definition: pbvh.c:1688
void BKE_pbvh_search_gather(PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***array, int *tot)
Definition: pbvh.c:843
bool(* BKE_pbvh_SearchCallback)(PBVHNode *node, void *data)
Definition: BKE_pbvh.h:94
@ MULTIRES_HIDDEN_MODIFIED
Definition: BKE_subsurf.h:94
#define BLI_assert(a)
Definition: BLI_assert.h:58
#define BLI_BITMAP_TEST(_bitmap, _index)
Definition: BLI_bitmap.h:63
#define BLI_BITMAP_NEW(_tot, _alloc_string)
Definition: BLI_bitmap.h:50
#define BLI_BITMAP_SET(_bitmap, _index, _set)
Definition: BLI_bitmap.h:93
unsigned int BLI_bitmap
Definition: BLI_bitmap.h:32
struct GSet GSet
Definition: BLI_ghash.h:189
#define GSET_ITER(gs_iter_, gset_)
Definition: BLI_ghash.h:268
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
Definition: BLI_ghash.h:255
bool isect_point_planes_v3(float(*planes)[4], int totplane, const float p[3])
Definition: math_geom.c:2152
void negate_m4(float R[4][4])
Definition: math_matrix.c:1015
#define ELEM(...)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_SHADING
Definition: DNA_ID.h:631
@ CD_PAINT_MASK
@ ME_HIDE
Object is a sort of wrapper for general info.
@ OPERATOR_FINISHED
void ED_region_tag_redraw(struct ARegion *region)
Definition: area.c:667
void ED_view3d_viewcontext_init(struct bContext *C, struct ViewContext *vc, struct Depsgraph *depsgraph)
void ED_view3d_clipping_calc(struct BoundBox *bb, float planes[4][4], const struct ARegion *region, const struct Object *ob, const struct rcti *rect)
void view3d_operator_needs_opengl(const struct bContext *C)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
#define C
Definition: RandGen.cpp:39
@ OPTYPE_REGISTER
Definition: WM_types.h:153
@ BM_ELEM_HIDDEN
Definition: bmesh_class.h:472
#define BM_elem_flag_disable(ele, hflag)
Definition: bmesh_inline.h:29
#define BM_elem_flag_test(ele, hflag)
Definition: bmesh_inline.h:26
#define BM_elem_flag_enable(ele, hflag)
Definition: bmesh_inline.h:28
ATTR_WARN_UNUSED_RESULT BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMVert * v
OperationNode * node
const Depsgraph * depsgraph
static float verts[][3]
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
static char faces[256]
static void area(int d1, int d2, int e1, int e2, float weights[2])
static void get_pbvh_nodes(PBVH *pbvh, PBVHNode ***nodes, int *totnode, float clip_planes[4][4], PartialVisArea mode)
Definition: paint_hide.c:314
static void partialvis_update_mesh(Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
Definition: paint_hide.c:79
static bool is_effected(PartialVisArea area, float planes[4][4], const float co[3], const float mask)
Definition: paint_hide.c:63
static void partialvis_update_bmesh(Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
Definition: paint_hide.c:258
static void partialvis_update_bmesh_verts(BMesh *bm, GSet *verts, PartialVisAction action, PartialVisArea area, float planes[4][4], bool *any_changed, bool *any_visible)
Definition: paint_hide.c:211
static void clip_planes_from_rect(bContext *C, Depsgraph *depsgraph, float clip_planes[4][4], const rcti *rect)
Definition: paint_hide.c:297
void PAINT_OT_hide_show(struct wmOperatorType *ot)
Definition: paint_hide.c:421
static void rect_from_props(rcti *rect, PointerRNA *ptr)
Definition: paint_hide.c:289
static void partialvis_update_bmesh_faces(GSet *faces)
Definition: paint_hide.c:242
static int hide_show_exec(bContext *C, wmOperator *op)
Definition: paint_hide.c:336
static void partialvis_update_grids(Depsgraph *depsgraph, Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
Definition: paint_hide.c:127
static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Definition: paint_hide.c:411
PartialVisAction
Definition: paint_intern.h:318
@ PARTIALVIS_HIDE
Definition: paint_intern.h:319
@ PARTIALVIS_SHOW
Definition: paint_intern.h:320
PartialVisArea
Definition: paint_intern.h:323
@ PARTIALVIS_INSIDE
Definition: paint_intern.h:324
@ PARTIALVIS_OUTSIDE
Definition: paint_intern.h:325
@ PARTIALVIS_ALL
Definition: paint_intern.h:326
@ PARTIALVIS_MASKED
Definition: paint_intern.h:327
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6308
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3771
bool SCULPT_mode_poll_view3d(bContext *C)
Definition: sculpt.c:6615
void SCULPT_visibility_sync_all_vertex_to_face_sets(SculptSession *ss)
Definition: sculpt.c:598
void SCULPT_undo_push_begin(struct Object *ob, const char *name)
Definition: sculpt_undo.c:1383
void SCULPT_undo_push_end(void)
Definition: sculpt_undo.c:1400
SculptUndoNode * SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type)
Definition: sculpt_undo.c:1292
@ SCULPT_UNDO_HIDDEN
void * data
Definition: bmesh_class.h:63
float co[3]
Definition: bmesh_class.h:99
BMHeader head
Definition: bmesh_class.h:97
CustomData vdata
Definition: bmesh_class.h:337
Definition: BKE_ccg.h:48
int has_mask
Definition: BKE_ccg.h:71
int grid_size
Definition: BKE_ccg.h:56
int grid_area
Definition: BKE_ccg.h:58
struct SculptSession * sculpt
void * data
float(* planes)[4]
Definition: BKE_pbvh.h:84
struct PBVH * pbvh
Definition: BKE_paint.h:504
struct ARegion * region
Definition: ED_view3d.h:80
struct Object * obact
Definition: ED_view3d.h:78
int ymin
Definition: DNA_vec_types.h:80
int ymax
Definition: DNA_vec_types.h:80
int xmin
Definition: DNA_vec_types.h:79
int xmax
Definition: DNA_vec_types.h:79
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:752
const char * name
Definition: WM_types.h:721
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:768
const char * idname
Definition: WM_types.h:723
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:776
struct StructRNA * srna
Definition: WM_types.h:802
const char * description
Definition: WM_types.h:726
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:736
struct wmOperatorType * type
struct PointerRNA * ptr
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_border(wmOperatorType *ot)