72 const float *paint_mask;
73 const int *vert_indices;
75 bool any_changed =
false, any_visible =
false;
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;
121 int *grid_indices, totgrid;
122 bool any_changed =
false, any_visible =
false;
131 for (
int i = 0; i < totgrid; i++) {
133 int g = grid_indices[i];
150 grid_hidden[
g] =
NULL;
183 grid_hidden[
g] =
NULL;
217 (*any_changed) =
true;
221 (*any_visible) =
true;
251 bool any_changed =
false, any_visible =
false;
283 float clip_planes[4][4],
331 float clip_planes[4][4];
360 for (
int i = 0; i < totnode; i++) {
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"},
421 "Hide or show vertices that are masked (minimum mask value of 0.5)"},
445 "Whether to hide or show vertices");
BLI_INLINE CCGElem * CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y)
BLI_INLINE float * CCG_elem_mask(const CCGKey *key, CCGElem *elem)
BLI_INLINE float * CCG_elem_co(const CCGKey *key, CCGElem *elem)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
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)
bool paint_is_bmesh_face_hidden(struct BMFace *f)
struct PBVH * BKE_sculpt_object_pbvh_ensure(struct Depsgraph *depsgraph, struct Object *ob)
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)
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert)
bool BKE_pbvh_node_frustum_contain_AABB(PBVHNode *node, void *frustum)
PBVHType BKE_pbvh_type(const PBVH *pbvh)
bool BKE_pbvh_node_frustum_exclude_AABB(PBVHNode *node, void *frustum)
struct BMesh * BKE_pbvh_get_bmesh(PBVH *pbvh)
void BKE_pbvh_node_mark_rebuild_draw(PBVHNode *node)
const struct CCGKey * BKE_pbvh_get_grid_key(const PBVH *pbvh)
struct GSet * BKE_pbvh_bmesh_node_other_verts(PBVHNode *node)
struct GSet * BKE_pbvh_bmesh_node_faces(PBVHNode *node)
void BKE_pbvh_node_get_grids(PBVH *pbvh, PBVHNode *node, int **grid_indices, int *totgrid, int *maxgrid, int *gridsize, struct CCGElem ***r_griddata)
void BKE_pbvh_node_fully_hidden_set(PBVHNode *node, int fully_hidden)
struct GSet * BKE_pbvh_bmesh_node_unique_verts(PBVHNode *node)
unsigned int ** BKE_pbvh_grid_hidden(const PBVH *pbvh)
void BKE_pbvh_search_gather(PBVH *pbvh, BKE_pbvh_SearchCallback scb, void *search_data, PBVHNode ***array, int *tot)
bool(* BKE_pbvh_SearchCallback)(PBVHNode *node, void *data)
@ MULTIRES_HIDDEN_MODIFIED
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_SET(_bitmap, _index, _set)
#define GSET_ITER(gs_iter_, gset_)
BLI_INLINE void * BLI_gsetIterator_getKey(GSetIterator *gsi)
bool isect_point_planes_v3(float(*planes)[4], int totplane, const float p[3])
void negate_m4(float R[4][4])
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
Object is a sort of wrapper for general info.
void ED_region_tag_redraw(struct ARegion *region)
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 BM_elem_flag_disable(ele, hflag)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_enable(ele, hflag)
ATTR_WARN_UNUSED_RESULT BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMVert * v
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
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)
static void partialvis_update_mesh(Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
static bool is_effected(PartialVisArea area, float planes[4][4], const float co[3], const float mask)
static void partialvis_update_bmesh(Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
static void partialvis_update_bmesh_verts(BMesh *bm, GSet *verts, PartialVisAction action, PartialVisArea area, float planes[4][4], bool *any_changed, bool *any_visible)
static void clip_planes_from_rect(bContext *C, Depsgraph *depsgraph, float clip_planes[4][4], const rcti *rect)
void PAINT_OT_hide_show(struct wmOperatorType *ot)
static void rect_from_props(rcti *rect, PointerRNA *ptr)
static void partialvis_update_bmesh_faces(GSet *faces)
static int hide_show_exec(bContext *C, wmOperator *op)
static void partialvis_update_grids(Depsgraph *depsgraph, Object *ob, PBVH *pbvh, PBVHNode *node, PartialVisAction action, PartialVisArea area, float planes[4][4])
static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int RNA_int_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
bool SCULPT_mode_poll_view3d(bContext *C)
void SCULPT_visibility_sync_all_vertex_to_face_sets(SculptSession *ss)
void SCULPT_undo_push_begin(struct Object *ob, const char *name)
void SCULPT_undo_push_end(struct Object *ob)
SculptUndoNode * SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType type)
struct SculptSession * sculpt
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct wmOperatorType * type
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)