Blender  V3.3
Classes | Typedefs | Functions
sculpt_mask_expand.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLT_translation.h"
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_brush.h"
#include "BKE_ccg.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_mesh.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "bmesh.h"
#include <math.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  MaskExpandFloodFillData
 

Typedefs

typedef struct MaskExpandFloodFillData MaskExpandFloodFillData
 

Functions

static void sculpt_mask_expand_cancel (bContext *C, wmOperator *op)
 
static void sculpt_expand_task_cb (void *__restrict userdata, const int i, const TaskParallelTLS *__restrict UNUSED(tls))
 
static int sculpt_mask_expand_modal (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool mask_expand_floodfill_cb (SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata)
 
static int sculpt_mask_expand_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void SCULPT_OT_mask_expand (wmOperatorType *ot)
 

Typedef Documentation

◆ MaskExpandFloodFillData

Function Documentation

◆ mask_expand_floodfill_cb()

static bool mask_expand_floodfill_cb ( SculptSession ss,
int  from_v,
int  to_v,
bool  is_duplicate,
void userdata 
)
static

◆ sculpt_expand_task_cb()

static void sculpt_expand_task_cb ( void *__restrict  userdata,
const int  i,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ sculpt_mask_expand_cancel()

static void sculpt_mask_expand_cancel ( bContext C,
wmOperator op 
)
static

◆ sculpt_mask_expand_invoke()

static int sculpt_mask_expand_invoke ( bContext C,
wmOperator op,
const wmEvent event 
)
static

Definition at line 326 of file sculpt_mask_expand.c.

References BKE_pbvh_node_mark_redraw(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_search_gather(), BKE_sculpt_update_object_for_edit(), BLI_task_parallel_range(), C, copy_v2_v2(), copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), wmOperator::customdata, data, depsgraph, ED_workspace_status_text(), FilterCache::edge_factor, SculptSession::face_sets, SculptSession::filter_cache, SculptVertexNeighborIter::index, mask_expand_floodfill_cb(), FilterCache::mask_expand_initial_co, FilterCache::mask_update_current_it, FilterCache::mask_update_it, FilterCache::mask_update_last_it, MEM_callocN, MEM_mallocN, MEM_SAFE_FREE, wmEvent::mval, FilterCache::new_face_set, FilterCache::nodes, FilterCache::normal_factor, NULL, OPERATOR_RUNNING_MODAL, MaskExpandFloodFillData::original_normal, SculptSession::pbvh, FilterCache::prev_face_set, FilterCache::prev_mask, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), Object::sculpt, ToolSettings::sculpt, SCULPT_active_vertex_co_get(), SCULPT_active_vertex_get(), SCULPT_active_vertex_normal_get(), SCULPT_cursor_geometry_info_update(), sculpt_expand_task_cb(), SCULPT_face_set_next_available_get(), SCULPT_floodfill_add_active(), SCULPT_floodfill_execute(), SCULPT_floodfill_free(), SCULPT_floodfill_init(), SCULPT_flush_update_step(), SCULPT_UNDO_FACE_SETS, SCULPT_UNDO_MASK, SCULPT_undo_push_begin(), SCULPT_undo_push_node(), SCULPT_UPDATE_MASK, SCULPT_vertex_count_get(), SCULPT_vertex_mask_get(), SCULPT_VERTEX_NEIGHBORS_ITER_BEGIN, SCULPT_VERTEX_NEIGHBORS_ITER_END, SCULPT_vertex_random_access_ensure(), SculptVertexNeighborIter::size, TIP_, SculptSession::totfaces, FilterCache::totnode, UNPACK2, MaskExpandFloodFillData::use_normals, and WM_event_add_modal_handler().

Referenced by SCULPT_OT_mask_expand().

◆ sculpt_mask_expand_modal()

static int sculpt_mask_expand_modal ( bContext C,
wmOperator op,
const wmEvent event 
)
static

Definition at line 147 of file sculpt_mask_expand.c.

References blender::math::abs(), add_v3_v3(), BKE_pbvh_node_mark_redraw(), BKE_pbvh_parallel_range_settings(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BKE_sculpt_update_object_for_edit(), BLI_task_parallel_range(), C, PBVHVertexIter::co, copy_v2_v2(), copy_v3_v3(), CTX_data_active_object(), CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), CTX_wm_region(), wmOperator::customdata, data, Object::data, depsgraph, ED_region_tag_redraw(), ED_workspace_status_text(), ELEM, EVT_ESCKEY, EVT_LEFTCTRLKEY, EVT_PADENTER, EVT_RETKEY, EVT_RIGHTCTRLKEY, SculptSession::face_sets, SculptSession::filter_cache, if(), KM_CTRL, KM_PRESS, KM_RELEASE, LEFTMOUSE, len, len_v2v2_int(), mask(), PBVHVertexIter::mask, FilterCache::mask_expand_initial_co, FilterCache::mask_update_current_it, FilterCache::mask_update_it, FilterCache::mask_update_last_it, MEM_freeN, wmEvent::modifier, MOUSEMOVE, mul_v3_fl(), wmEvent::mval, NC_GEOM, ND_SELECT, FilterCache::nodes, NULL, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, SculptSession::pbvh, PBVH_ITER_UNIQUE, SculptSession::pivot_pos, FilterCache::prev_face_set, wmOperator::ptr, RIGHTMOUSE, RNA_boolean_get(), RNA_int_get(), Object::sculpt, ToolSettings::sculpt, SCULPT_active_vertex_get(), SCULPT_check_vertex_pivot_symmetry(), SCULPT_cursor_geometry_info_update(), sculpt_expand_task_cb(), SCULPT_filter_cache_free(), SCULPT_flush_update_done(), SCULPT_flush_update_step(), sculpt_mask_expand_cancel(), SCULPT_mask_filter_smooth_apply(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_undo_push_end(), SCULPT_UPDATE_MASK, threshold, SculptSession::totfaces, FilterCache::totnode, wmEvent::type, UNPACK2, wmEvent::val, WM_event_add_notifier(), and zero_v3().

Referenced by SCULPT_OT_mask_expand().

◆ SCULPT_OT_mask_expand()

void SCULPT_OT_mask_expand ( wmOperatorType ot)