Blender  V3.3
paint_hide.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2010 by Nicholas Bishop. All rights reserved. */
3 
9 #include "MEM_guardedalloc.h"
10 
11 #include "BLI_bitmap.h"
12 #include "BLI_math_vector.h"
13 #include "BLI_utildefines.h"
14 
15 #include "DNA_mesh_types.h"
16 #include "DNA_meshdata_types.h"
17 #include "DNA_object_types.h"
18 #include "DNA_scene_types.h"
19 
20 #include "BKE_ccg.h"
21 #include "BKE_context.h"
22 #include "BKE_mesh.h"
23 #include "BKE_multires.h"
24 #include "BKE_paint.h"
25 #include "BKE_pbvh.h"
26 #include "BKE_subsurf.h"
27 
28 #include "DEG_depsgraph.h"
29 
30 #include "WM_api.h"
31 #include "WM_types.h"
32 
33 #include "ED_screen.h"
34 #include "ED_view3d.h"
35 
36 #include "RNA_access.h"
37 #include "RNA_define.h"
38 
39 #include "bmesh.h"
40 
41 #include "paint_intern.h"
42 
43 /* For undo push. */
44 #include "sculpt_intern.h"
45 
46 /* Return true if the element should be hidden/shown. */
48  float planes[4][4],
49  const float co[3],
50  const float mask)
51 {
52  if (area == PARTIALVIS_ALL) {
53  return true;
54  }
55  if (area == PARTIALVIS_MASKED) {
56  return mask > 0.5f;
57  }
58 
59  bool inside = isect_point_planes_v3(planes, 4, co);
60  return ((inside && area == PARTIALVIS_INSIDE) || (!inside && area == PARTIALVIS_OUTSIDE));
61 }
62 
64  PBVH *pbvh,
65  PBVHNode *node,
66  PartialVisAction action,
68  float planes[4][4])
69 {
70  Mesh *me = ob->data;
71  MVert *mvert;
72  const float *paint_mask;
73  const int *vert_indices;
74  int totvert, i;
75  bool any_changed = false, any_visible = false;
76 
77  BKE_pbvh_node_num_verts(pbvh, node, NULL, &totvert);
78  BKE_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
79  paint_mask = CustomData_get_layer(&me->vdata, CD_PAINT_MASK);
80 
82 
83  for (i = 0; i < totvert; i++) {
84  MVert *v = &mvert[vert_indices[i]];
85  float vmask = paint_mask ? paint_mask[vert_indices[i]] : 0;
86 
87  /* Hide vertex if in the hide volume. */
88  if (is_effected(area, planes, v->co, vmask)) {
89  if (action == PARTIALVIS_HIDE) {
90  v->flag |= ME_HIDE;
91  }
92  else {
93  v->flag &= ~ME_HIDE;
94  }
95  any_changed = true;
96  }
97 
98  if (!(v->flag & ME_HIDE)) {
99  any_visible = true;
100  }
101  }
102 
103  if (any_changed) {
105  BKE_pbvh_node_fully_hidden_set(node, !any_visible);
106  }
107 }
108 
109 /* Hide or show elements in multires grids with a special GridFlags
110  * customdata layer. */
112  Object *ob,
113  PBVH *pbvh,
114  PBVHNode *node,
115  PartialVisAction action,
117  float planes[4][4])
118 {
119  CCGElem **grids;
120  BLI_bitmap **grid_hidden;
121  int *grid_indices, totgrid;
122  bool any_changed = false, any_visible = false;
123 
124  /* Get PBVH data. */
125  BKE_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid, NULL, NULL, &grids);
126  grid_hidden = BKE_pbvh_grid_hidden(pbvh);
127  CCGKey key = *BKE_pbvh_get_grid_key(pbvh);
128 
130 
131  for (int i = 0; i < totgrid; i++) {
132  int any_hidden = 0;
133  int g = grid_indices[i];
134  BLI_bitmap *gh = grid_hidden[g];
135 
136  if (!gh) {
137  switch (action) {
138  case PARTIALVIS_HIDE:
139  /* Create grid flags data. */
140  gh = grid_hidden[g] = BLI_BITMAP_NEW(key.grid_area, "partialvis_update_grids");
141  break;
142  case PARTIALVIS_SHOW:
143  /* Entire grid is visible, nothing to show. */
144  continue;
145  }
146  }
147  else if (action == PARTIALVIS_SHOW && area == PARTIALVIS_ALL) {
148  /* Special case if we're showing all, just free the grid. */
149  MEM_freeN(gh);
150  grid_hidden[g] = NULL;
151  any_changed = true;
152  any_visible = true;
153  continue;
154  }
155 
156  for (int y = 0; y < key.grid_size; y++) {
157  for (int x = 0; x < key.grid_size; x++) {
158  CCGElem *elem = CCG_grid_elem(&key, grids[g], x, y);
159  const float *co = CCG_elem_co(&key, elem);
160  float mask = key.has_mask ? *CCG_elem_mask(&key, elem) : 0.0f;
161 
162  /* Skip grid element if not in the effected area. */
163  if (is_effected(area, planes, co, mask)) {
164  /* Set or clear the hide flag. */
165  BLI_BITMAP_SET(gh, y * key.grid_size + x, action == PARTIALVIS_HIDE);
166 
167  any_changed = true;
168  }
169 
170  /* Keep track of whether any elements are still hidden. */
171  if (BLI_BITMAP_TEST(gh, y * key.grid_size + x)) {
172  any_hidden = true;
173  }
174  else {
175  any_visible = true;
176  }
177  }
178  }
179 
180  /* If everything in the grid is now visible, free the grid flags. */
181  if (!any_hidden) {
182  MEM_freeN(gh);
183  grid_hidden[g] = NULL;
184  }
185  }
186 
187  /* Mark updates if anything was hidden/shown. */
188  if (any_changed) {
190  BKE_pbvh_node_fully_hidden_set(node, !any_visible);
192  }
193 }
194 
196  GSet *verts,
197  PartialVisAction action,
199  float planes[4][4],
200  bool *any_changed,
201  bool *any_visible)
202 {
203  GSetIterator gs_iter;
204 
205  GSET_ITER (gs_iter, verts) {
206  BMVert *v = BLI_gsetIterator_getKey(&gs_iter);
207  float *vmask = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_PAINT_MASK);
208 
209  /* Hide vertex if in the hide volume. */
210  if (is_effected(area, planes, v->co, *vmask)) {
211  if (action == PARTIALVIS_HIDE) {
213  }
214  else {
216  }
217  (*any_changed) = true;
218  }
219 
221  (*any_visible) = true;
222  }
223  }
224 }
225 
227 {
228  GSetIterator gs_iter;
229 
230  GSET_ITER (gs_iter, faces) {
231  BMFace *f = BLI_gsetIterator_getKey(&gs_iter);
232 
235  }
236  else {
238  }
239  }
240 }
241 
243  PBVH *pbvh,
244  PBVHNode *node,
245  PartialVisAction action,
247  float planes[4][4])
248 {
249  BMesh *bm;
250  GSet *unique, *other, *faces;
251  bool any_changed = false, any_visible = false;
252 
253  bm = BKE_pbvh_get_bmesh(pbvh);
257 
259 
260  partialvis_update_bmesh_verts(bm, unique, action, area, planes, &any_changed, &any_visible);
261 
262  partialvis_update_bmesh_verts(bm, other, action, area, planes, &any_changed, &any_visible);
263 
264  /* Finally loop over node faces and tag the ones that are fully hidden. */
266 
267  if (any_changed) {
269  BKE_pbvh_node_fully_hidden_set(node, !any_visible);
270  }
271 }
272 
273 static void rect_from_props(rcti *rect, PointerRNA *ptr)
274 {
275  rect->xmin = RNA_int_get(ptr, "xmin");
276  rect->ymin = RNA_int_get(ptr, "ymin");
277  rect->xmax = RNA_int_get(ptr, "xmax");
278  rect->ymax = RNA_int_get(ptr, "ymax");
279 }
280 
283  float clip_planes[4][4],
284  const rcti *rect)
285 {
286  ViewContext vc;
287  BoundBox bb;
288 
291  ED_view3d_clipping_calc(&bb, clip_planes, vc.region, vc.obact, rect);
292 }
293 
294 /* If mode is inside, get all PBVH nodes that lie at least partially
295  * inside the clip_planes volume. If mode is outside, get all nodes
296  * that lie at least partially outside the volume. If showing all, get
297  * all nodes. */
298 static void get_pbvh_nodes(
299  PBVH *pbvh, PBVHNode ***nodes, int *totnode, float clip_planes[4][4], PartialVisArea mode)
300 {
302 
303  /* Select search callback. */
304  switch (mode) {
305  case PARTIALVIS_INSIDE:
307  break;
308  case PARTIALVIS_OUTSIDE:
310  break;
311  case PARTIALVIS_ALL:
312  case PARTIALVIS_MASKED:
313  break;
314  }
315 
316  PBVHFrustumPlanes frustum = {.planes = clip_planes, .num_planes = 4};
317  BKE_pbvh_search_gather(pbvh, cb, &frustum, nodes, totnode);
318 }
319 
321 {
322  ARegion *region = CTX_wm_region(C);
325  Mesh *me = ob->data;
326  PartialVisAction action;
328  PBVH *pbvh;
329  PBVHNode **nodes;
330  PBVHType pbvh_type;
331  float clip_planes[4][4];
332  rcti rect;
333  int totnode;
334 
335  /* Read operator properties. */
336  action = RNA_enum_get(op->ptr, "action");
337  area = RNA_enum_get(op->ptr, "area");
338  rect_from_props(&rect, op->ptr);
339 
340  clip_planes_from_rect(C, depsgraph, clip_planes, &rect);
341 
343  BLI_assert(ob->sculpt->pbvh == pbvh);
344 
345  get_pbvh_nodes(pbvh, &nodes, &totnode, clip_planes, area);
346  pbvh_type = BKE_pbvh_type(pbvh);
347 
348  negate_m4(clip_planes);
349 
350  /* Start undo. */
351  switch (action) {
352  case PARTIALVIS_HIDE:
353  SCULPT_undo_push_begin(ob, "Hide area");
354  break;
355  case PARTIALVIS_SHOW:
356  SCULPT_undo_push_begin(ob, "Show area");
357  break;
358  }
359 
360  for (int i = 0; i < totnode; i++) {
361  switch (pbvh_type) {
362  case PBVH_FACES:
363  partialvis_update_mesh(ob, pbvh, nodes[i], action, area, clip_planes);
364  break;
365  case PBVH_GRIDS:
366  partialvis_update_grids(depsgraph, ob, pbvh, nodes[i], action, area, clip_planes);
367  break;
368  case PBVH_BMESH:
369  partialvis_update_bmesh(ob, pbvh, nodes[i], action, area, clip_planes);
370  break;
371  }
372  }
373 
374  if (nodes) {
375  MEM_freeN(nodes);
376  }
377 
378  /* End undo. */
380 
381  /* Ensure that edges and faces get hidden as well (not used by
382  * sculpt but it looks wrong when entering editmode otherwise). */
383  if (pbvh_type == PBVH_FACES) {
385  }
386 
388 
390  ED_region_tag_redraw(region);
391 
392  return OPERATOR_FINISHED;
393 }
394 
395 static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
396 {
397  PartialVisArea area = RNA_enum_get(op->ptr, "area");
398 
400  return WM_gesture_box_invoke(C, op, event);
401  }
402  return op->type->exec(C, op);
403 }
404 
406 {
407  static const EnumPropertyItem action_items[] = {
408  {PARTIALVIS_HIDE, "HIDE", 0, "Hide", "Hide vertices"},
409  {PARTIALVIS_SHOW, "SHOW", 0, "Show", "Show vertices"},
410  {0, NULL, 0, NULL, NULL},
411  };
412 
413  static const EnumPropertyItem area_items[] = {
414  {PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside", "Hide or show vertices outside the selection"},
415  {PARTIALVIS_INSIDE, "INSIDE", 0, "Inside", "Hide or show vertices inside the selection"},
416  {PARTIALVIS_ALL, "ALL", 0, "All", "Hide or show all vertices"},
418  "MASKED",
419  0,
420  "Masked",
421  "Hide or show vertices that are masked (minimum mask value of 0.5)"},
422  {0, NULL, 0, NULL, NULL},
423  };
424 
425  /* Identifiers. */
426  ot->name = "Hide/Show";
427  ot->idname = "PAINT_OT_hide_show";
428  ot->description = "Hide/show some vertices";
429 
430  /* API callbacks. */
434  /* Sculpt-only for now. */
436 
438 
439  /* RNA. */
441  "action",
442  action_items,
444  "Action",
445  "Whether to hide or show vertices");
446  RNA_def_enum(
447  ot->srna, "area", area_items, PARTIALVIS_INSIDE, "Area", "Which vertices to hide or show");
448 
450 }
BLI_INLINE CCGElem * CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y)
Definition: BKE_ccg.h:108
BLI_INLINE float * CCG_elem_mask(const CCGKey *key, CCGElem *elem)
Definition: BKE_ccg.h:97
struct CCGElem CCGElem
Definition: BKE_ccg.h:30
BLI_INLINE float * CCG_elem_co(const CCGKey *key, CCGElem *elem)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Definition: context.c:1528
struct Object * CTX_data_active_object(const bContext *C)
Definition: context.c:1353
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:749
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:387
bool paint_is_bmesh_face_hidden(struct BMFace *f)
Definition: paint.c:1262
struct PBVH * BKE_sculpt_object_pbvh_ensure(struct Depsgraph *depsgraph, struct Object *ob)
Definition: paint.c:2258
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:1989
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert)
Definition: pbvh.c:2003
bool BKE_pbvh_node_frustum_contain_AABB(PBVHNode *node, void *frustum)
Definition: pbvh.c:2793
PBVHType BKE_pbvh_type(const PBVH *pbvh)
Definition: pbvh.c:1798
bool BKE_pbvh_node_frustum_exclude_AABB(PBVHNode *node, void *frustum)
Definition: pbvh.c:2803
struct BMesh * BKE_pbvh_get_bmesh(PBVH *pbvh)
Definition: pbvh.c:1861
void BKE_pbvh_node_mark_rebuild_draw(PBVHNode *node)
Definition: pbvh.c:1901
const struct CCGKey * BKE_pbvh_get_grid_key(const PBVH *pbvh)
Definition: pbvh.c:1831
struct GSet * BKE_pbvh_bmesh_node_other_verts(PBVHNode *node)
Definition: pbvh_bmesh.c:2108
PBVHType
Definition: BKE_pbvh.h:233
@ PBVH_GRIDS
Definition: BKE_pbvh.h:235
@ PBVH_BMESH
Definition: BKE_pbvh.h:236
@ PBVH_FACES
Definition: BKE_pbvh.h:234
struct GSet * BKE_pbvh_bmesh_node_faces(PBVHNode *node)
Definition: pbvh_bmesh.c:2113
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:2037
void BKE_pbvh_node_fully_hidden_set(PBVHNode *node, int fully_hidden)
Definition: pbvh.c:1916
struct GSet * BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node)
Definition: pbvh_bmesh.c:2103
unsigned int ** BKE_pbvh_grid_hidden(const PBVH *pbvh)
Definition: pbvh.c:1825
void BKE_pbvh_search_gather(PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***array, int *tot)
Definition: pbvh.c:838
bool(* BKE_pbvh_SearchCallback)(PBVHNode *node, void *data)
Definition: BKE_pbvh.h:98
@ MULTIRES_HIDDEN_MODIFIED
Definition: BKE_subsurf.h:69
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define BLI_BITMAP_NEW(_num, _alloc_string)
Definition: BLI_bitmap.h:40
#define BLI_BITMAP_TEST(_bitmap, _index)
Definition: BLI_bitmap.h:64
#define BLI_BITMAP_SET(_bitmap, _index, _set)
Definition: BLI_bitmap.h:102
unsigned int BLI_bitmap
Definition: BLI_bitmap.h:16
struct GSet GSet
Definition: BLI_ghash.h:340
#define GSET_ITER(gs_iter_, gset_)
Definition: BLI_ghash.h:471
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
Definition: BLI_ghash.h:458
bool isect_point_planes_v3(float(*planes)[4], int totplane, const float p[3])
Definition: math_geom.c:2054
void negate_m4(float R[4][4])
Definition: math_matrix.c:1011
#define ELEM(...)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_SHADING
Definition: DNA_ID.h:811
@ 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:655
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:25
@ OPTYPE_REGISTER
Definition: WM_types.h:146
@ BM_ELEM_HIDDEN
Definition: bmesh_class.h:472
#define BM_elem_flag_disable(ele, hflag)
Definition: bmesh_inline.h:15
#define BM_elem_flag_test(ele, hflag)
Definition: bmesh_inline.h:12
#define BM_elem_flag_enable(ele, hflag)
Definition: bmesh_inline.h:14
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:27
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
static char faces[256]
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken g("g", pxr::TfToken::Immortal)
static void get_pbvh_nodes(PBVH *pbvh, PBVHNode ***nodes, int *totnode, float clip_planes[4][4], PartialVisArea mode)
Definition: paint_hide.c:298
static void partialvis_update_mesh(Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
Definition: paint_hide.c:63
static bool is_effected(PartialVisArea area, float planes[4][4], const float co[3], const float mask)
Definition: paint_hide.c:47
static void partialvis_update_bmesh(Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
Definition: paint_hide.c:242
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:195
static void clip_planes_from_rect(bContext *C, Depsgraph *depsgraph, float clip_planes[4][4], const rcti *rect)
Definition: paint_hide.c:281
void PAINT_OT_hide_show(struct wmOperatorType *ot)
Definition: paint_hide.c:405
static void rect_from_props(rcti *rect, PointerRNA *ptr)
Definition: paint_hide.c:273
static void partialvis_update_bmesh_faces(GSet *faces)
Definition: paint_hide.c:226
static int hide_show_exec(bContext *C, wmOperator *op)
Definition: paint_hide.c:320
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:111
static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Definition: paint_hide.c:395
PartialVisAction
Definition: paint_intern.h:456
@ PARTIALVIS_HIDE
Definition: paint_intern.h:457
@ PARTIALVIS_SHOW
Definition: paint_intern.h:458
PartialVisArea
Definition: paint_intern.h:461
@ PARTIALVIS_INSIDE
Definition: paint_intern.h:462
@ PARTIALVIS_OUTSIDE
Definition: paint_intern.h:463
@ PARTIALVIS_ALL
Definition: paint_intern.h:464
@ PARTIALVIS_MASKED
Definition: paint_intern.h:465
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:4910
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:5004
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:3783
bool SCULPT_mode_poll_view3d(bContext *C)
Definition: sculpt.c:3963
void SCULPT_visibility_sync_all_vertex_to_face_sets(SculptSession *ss)
Definition: sculpt.c:591
void SCULPT_undo_push_begin(struct Object *ob, const char *name)
Definition: sculpt_undo.c:1545
void SCULPT_undo_push_end(struct Object *ob)
Definition: sculpt_undo.c:1575
SculptUndoNode * SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type)
Definition: sculpt_undo.c:1419
@ SCULPT_UNDO_HIDDEN
void * data
Definition: bmesh_class.h:51
float co[3]
Definition: bmesh_class.h:87
BMHeader head
Definition: bmesh_class.h:85
CustomData vdata
Definition: bmesh_class.h:337
Definition: BKE_ccg.h:32
int has_mask
Definition: BKE_ccg.h:55
int grid_size
Definition: BKE_ccg.h:40
int grid_area
Definition: BKE_ccg.h:42
CustomData vdata
struct SculptSession * sculpt
void * data
float(* planes)[4]
Definition: BKE_pbvh.h:86
struct PBVH * pbvh
Definition: BKE_paint.h:550
struct ARegion * region
Definition: ED_view3d.h:69
struct Object * obact
Definition: ED_view3d.h:67
int ymin
Definition: DNA_vec_types.h:64
int ymax
Definition: DNA_vec_types.h:64
int xmin
Definition: DNA_vec_types.h:63
int xmax
Definition: DNA_vec_types.h:63
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:919
const char * name
Definition: WM_types.h:888
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:935
const char * idname
Definition: WM_types.h:890
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:943
struct StructRNA * srna
Definition: WM_types.h:969
const char * description
Definition: WM_types.h:893
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
Definition: WM_types.h:903
struct wmOperatorType * type
struct PointerRNA * ptr
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479
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)