Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_kelvinlet.h"
#include "BKE_mesh.h"
#include "BKE_mesh_mapping.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 "ED_object.h"
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_view3d.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "bmesh.h"
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Typedefs | |
typedef enum eSculptPivotPositionModes | eSculptPivotPositionModes |
Enumerations | |
enum | eSculptPivotPositionModes { SCULPT_PIVOT_POSITION_ORIGIN = 0 , SCULPT_PIVOT_POSITION_UNMASKED = 1 , SCULPT_PIVOT_POSITION_MASK_BORDER = 2 , SCULPT_PIVOT_POSITION_ACTIVE_VERTEX = 3 , SCULPT_PIVOT_POSITION_CURSOR_SURFACE = 4 } |
Variables | |
static EnumPropertyItem | prop_sculpt_pivot_position_types [] |
typedef enum eSculptPivotPositionModes eSculptPivotPositionModes |
Enumerator | |
---|---|
SCULPT_PIVOT_POSITION_ORIGIN | |
SCULPT_PIVOT_POSITION_UNMASKED | |
SCULPT_PIVOT_POSITION_MASK_BORDER | |
SCULPT_PIVOT_POSITION_ACTIVE_VERTEX | |
SCULPT_PIVOT_POSITION_CURSOR_SURFACE |
Definition at line 362 of file sculpt_transform.c.
Definition at line 348 of file sculpt_transform.c.
References C, SculptSession::filter_cache, Object::sculpt, SCULPT_filter_cache_free(), SCULPT_flush_update_done(), SCULPT_undo_push_end_ex(), and SCULPT_UPDATE_COORDS.
Referenced by special_aftertrans_update__sculpt().
Definition at line 49 of file sculpt_transform.c.
References BKE_sculpt_update_object_for_edit(), C, copy_v3_v3(), copy_v4_v4(), CTX_data_depsgraph_pointer(), CTX_data_tool_settings(), depsgraph, SculptSession::filter_cache, SculptSession::init_pivot_pos, SculptSession::init_pivot_rot, SculptSession::init_pivot_scale, SculptSession::pivot_pos, SculptSession::pivot_rot, SculptSession::pivot_scale, SculptSession::prev_pivot_pos, SculptSession::prev_pivot_rot, SculptSession::prev_pivot_scale, Object::sculpt, ToolSettings::sculpt, SCULPT_filter_cache_init(), SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL, SCULPT_TRANSFORM_DISPLACEMENT_ORIGINAL, SCULPT_TRANSFORM_MODE_RADIUS_ELASTIC, SCULPT_UNDO_COORDS, SCULPT_undo_push_begin(), SCULPT_vertex_random_access_ensure(), FilterCache::transform_displacement_mode, and Sculpt::transform_mode.
Referenced by createTransSculpt().
Definition at line 301 of file sculpt_transform.c.
References BKE_brush_size_get(), BKE_brush_unprojected_radius_get(), BKE_brush_use_locked_size(), BKE_paint_brush(), BKE_sculpt_update_object_for_edit(), C, copy_v3_v3(), copy_v4_v4(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_tool_settings(), SculptSession::deform_modifiers_active, depsgraph, ED_view3d_viewcontext_init(), SculptSession::init_pivot_pos, Sculpt::paint, paint_calc_object_space_radius(), SculptSession::pivot_pos, SculptSession::pivot_rot, SculptSession::pivot_scale, SculptSession::prev_pivot_pos, SculptSession::prev_pivot_rot, SculptSession::prev_pivot_scale, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_flush_stroke_deform(), SCULPT_flush_update_step(), sculpt_transform_all_vertices(), SCULPT_TRANSFORM_MODE_ALL_VERTICES, SCULPT_TRANSFORM_MODE_RADIUS_ELASTIC, sculpt_transform_radius_elastic(), SCULPT_UPDATE_COORDS, SCULPT_vertex_random_access_ensure(), SculptSession::shapekey_active, and Sculpt::transform_mode.
Referenced by recalcData_sculpt().
|
static |
Definition at line 212 of file sculpt_transform.c.
References BKE_kelvinlet_grab_triscale(), BKE_kelvinlet_init_params(), BKE_pbvh_node_add_proxy(), BKE_pbvh_node_mark_update(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHProxyNode::co, PBVHVertexIter::co, SculptOrigVertData::co, copy_v3_v3(), data, fade(), float(), PBVHVertexIter::i, PBVHVertexIter::index, PBVHVertexIter::mask, mul_m4_v3(), mul_v3_fl(), PBVHVertexIter::mvert, node, params, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_UNDO_COORDS, SCULPT_undo_push_node(), and sub_v3_v3v3().
Referenced by sculpt_transform_radius_elastic().
void SCULPT_OT_set_pivot_position | ( | wmOperatorType * | ot | ) |
Definition at line 501 of file sculpt_transform.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, prop_sculpt_pivot_position_types, RNA_def_enum(), RNA_def_float(), SCULPT_mode_poll(), SCULPT_PIVOT_POSITION_UNMASKED, sculpt_set_pivot_position_exec(), sculpt_set_pivot_position_invoke(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
|
static |
Definition at line 399 of file sculpt_transform.c.
References add_v3_v3(), UnifiedPaintSettings::average_stroke_accum, UnifiedPaintSettings::average_stroke_counter, BKE_pbvh_search_gather(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, BKE_sculpt_update_object_for_edit(), C, PBVHVertexIter::co, copy_v3_v3(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_tool_settings(), CTX_wm_region(), Object::data, depsgraph, ED_region_tag_redraw(), if(), UnifiedPaintSettings::last_stroke_valid, mask(), PBVHVertexIter::mask, MEM_SAFE_FREE, mul_v3_fl(), NC_GEOM, ND_SELECT, NULL, OPERATOR_FINISHED, SculptSession::pbvh, PBVH_ITER_UNIQUE, SculptSession::pivot_pos, wmOperator::ptr, RNA_enum_get(), RNA_float_get(), Object::sculpt, SCULPT_active_vertex_co_get(), SCULPT_check_vertex_pivot_symmetry(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_PIVOT_POSITION_ACTIVE_VERTEX, SCULPT_PIVOT_POSITION_CURSOR_SURFACE, SCULPT_PIVOT_POSITION_MASK_BORDER, SCULPT_PIVOT_POSITION_ORIGIN, SCULPT_PIVOT_POSITION_UNMASKED, SCULPT_stroke_get_location(), threshold, ToolSettings::unified_paint_settings, WM_event_add_notifier(), and zero_v3().
Referenced by SCULPT_OT_set_pivot_position(), and sculpt_set_pivot_position_invoke().
|
static |
Definition at line 494 of file sculpt_transform.c.
References C, wmEvent::mval, wmOperator::ptr, RNA_float_set(), and sculpt_set_pivot_position_exec().
Referenced by SCULPT_OT_set_pivot_position().
Definition at line 190 of file sculpt_transform.c.
References BKE_pbvh_parallel_range_settings(), BLI_task_parallel_range(), data, SculptSession::filter_cache, FilterCache::nodes, Object::sculpt, SCULPT_mesh_symmetry_xyz_get(), sculpt_transform_matrices_init(), sculpt_transform_task_cb(), FilterCache::totnode, and FilterCache::transform_displacement_mode.
Referenced by ED_sculpt_update_modal_transform().
|
static |
Definition at line 79 of file sculpt_transform.c.
References add_v3_fl(), copy_v3_v3(), copy_v4_v4(), SculptSession::init_pivot_pos, SculptSession::init_pivot_rot, SculptSession::init_pivot_scale, invert_m4_m4(), mul_m4_m4m4(), normalize_qt(), PAINT_SYMM_AREAS, SculptSession::pivot_pos, SculptSession::pivot_rot, SculptSession::pivot_scale, SculptSession::prev_pivot_pos, SculptSession::prev_pivot_rot, SculptSession::prev_pivot_scale, quat_to_mat4(), SCULPT_flip_quat_by_symm_area(), SCULPT_flip_v3_by_symm_area(), SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL, SCULPT_TRANSFORM_DISPLACEMENT_ORIGINAL, size_to_mat4(), sub_qt_qtqt(), sub_v3_v3v3(), translate_m4(), and unit_m4().
Referenced by sculpt_transform_all_vertices(), and sculpt_transform_radius_elastic().
|
static |
Definition at line 264 of file sculpt_transform.c.
References BKE_pbvh_parallel_range_settings(), BLI_assert, BLI_task_parallel_range(), copy_m4_m4(), data, SculptSession::filter_cache, flip_v3_v3(), SculptSession::init_pivot_pos, FilterCache::nodes, SculptSession::pivot_pos, Object::sculpt, SCULPT_combine_transform_proxies(), sculpt_elastic_transform_task_cb(), SCULPT_get_vertex_symm_area(), SCULPT_is_symmetry_iteration_valid(), SCULPT_mesh_symmetry_xyz_get(), SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL, sculpt_transform_matrices_init(), FilterCache::totnode, and FilterCache::transform_displacement_mode.
Referenced by ED_sculpt_update_modal_transform().
|
static |
Definition at line 143 of file sculpt_transform.c.
References add_v3_v3v3(), BKE_pbvh_node_mark_update(), BKE_pbvh_vert_tag_update_normal(), BKE_pbvh_vertex_iter_begin, BKE_pbvh_vertex_iter_end, PBVHVertexIter::co, SculptOrigVertData::co, copy_v3_v3(), data, fade(), SculptSession::filter_cache, PBVHVertexIter::index, PBVHVertexIter::mask, mul_m4_v3(), mul_v3_fl(), PBVHVertexIter::mvert, node, SculptSession::pbvh, PBVH_ITER_UNIQUE, SCULPT_get_vertex_symm_area(), SCULPT_orig_vert_data_init(), SCULPT_orig_vert_data_update(), SCULPT_TRANSFORM_DISPLACEMENT_INCREMENTAL, SCULPT_TRANSFORM_DISPLACEMENT_ORIGINAL, SCULPT_UNDO_COORDS, SCULPT_undo_push_node(), sub_v3_v3v3(), and FilterCache::transform_displacement_mode.
Referenced by sculpt_transform_all_vertices().
|
static |
Definition at line 370 of file sculpt_transform.c.
Referenced by SCULPT_OT_set_pivot_position().