Blender
V3.3
|
#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 struct MaskExpandFloodFillData MaskExpandFloodFillData |
|
static |
Definition at line 290 of file sculpt_mask_expand.c.
References CLAMP, data, dot_v3v3(), FilterCache::edge_factor, SculptSession::filter_cache, FilterCache::mask_update_it, FilterCache::mask_update_last_it, FilterCache::normal_factor, powf, and SCULPT_vertex_normal_get().
Referenced by sculpt_mask_expand_invoke().
|
static |
Definition at line 90 of file sculpt_mask_expand.c.
References BKE_pbvh_node_mark_redraw(), BKE_pbvh_node_mark_update_mask(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, data, SculptSession::filter_cache, PBVHVertexIter::index, PBVHVertexIter::mask, FilterCache::mask_update_it, MAX2, FilterCache::new_face_set, node, FilterCache::normal_factor, SculptSession::pbvh, PBVH_ITER_ALL, FilterCache::prev_mask, SCULPT_active_vertex_get(), and SCULPT_vertex_face_set_set().
Referenced by sculpt_mask_expand_invoke(), and sculpt_mask_expand_modal().
|
static |
Definition at line 55 of file sculpt_mask_expand.c.
References BKE_pbvh_node_mark_redraw(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, C, CTX_data_active_object(), wmOperator::customdata, ED_workspace_status_text(), SculptSession::face_sets, SculptSession::filter_cache, PBVHVertexIter::index, PBVHVertexIter::mask, MEM_freeN, node, FilterCache::nodes, NULL, SculptSession::pbvh, PBVH_ITER_UNIQUE, FilterCache::prev_face_set, FilterCache::prev_mask, wmOperator::ptr, RNA_boolean_get(), Object::sculpt, SCULPT_filter_cache_free(), SCULPT_flush_update_done(), SCULPT_flush_update_step(), SCULPT_undo_push_end(), SCULPT_UPDATE_MASK, SculptSession::totfaces, and FilterCache::totnode.
Referenced by sculpt_mask_expand_modal(), and SCULPT_OT_mask_expand().
|
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().
|
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().
void SCULPT_OT_mask_expand | ( | wmOperatorType * | ot | ) |
Definition at line 454 of file sculpt_mask_expand.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_int(), sculpt_mask_expand_cancel(), sculpt_mask_expand_invoke(), sculpt_mask_expand_modal(), SCULPT_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().