91 tls.
normals.resize(positions.size());
151 switch (pbvh.
type()) {
153 Mesh &mesh = *
static_cast<Mesh *
>(
object.data);
174 SubdivCCG &subdiv_ccg = *
object.sculpt->subdiv_ccg;
217 MEM_cnew<ProjectOperation>(__func__));
250 ot->
name =
"Project Line Gesture";
251 ot->
idname =
"SCULPT_OT_project_line_gesture";
252 ot->
description =
"Project the geometry onto a plane defined by a line";
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Base * CTX_data_active_base(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
bool BKE_base_is_visible(const View3D *v3d, const Base *base)
void BKE_sculpt_update_object_for_edit(Depsgraph *depsgraph, Object *ob_orig, bool is_paint_tool)
const blender::Set< BMVert *, 0 > & BKE_pbvh_bmesh_node_unique_verts(blender::bke::pbvh::BMeshNode *node)
#define BLI_assert_unreachable()
void resize(const int64_t new_size)
void tag_positions_changed(const IndexMask &node_mask)
Span< NodeT > nodes() const
void foreach_index(Fn &&fn) const
const Depsgraph * depsgraph
pbvh::Tree * pbvh_get(Object &object)
void update_node_bounds_bmesh(BMeshNode &node)
void update_node_bounds_mesh(Span< float3 > positions, MeshNode &node)
Span< float3 > vert_normals_eval(const Depsgraph &depsgraph, const Object &object_orig)
void update_node_bounds_grids(int grid_area, Span< float3 > positions, GridsNode &node)
void flush_bounds_to_parents(Tree &pbvh)
static BLI_NOINLINE void fill_factor_from_hide_and_mask(const Mesh &mesh, const Span< int > face_indices, const MutableSpan< float > r_factors)
void operator_properties(wmOperatorType *ot, ShapeType shapeType)
std::unique_ptr< GestureData > init_from_line(bContext *C, wmOperator *op)
void filter_factors(const GestureData &gesture_data, const Span< float3 > positions, const Span< float3 > normals, const MutableSpan< float > factors)
void apply(bContext &C, GestureData &gesture_data, wmOperator &op)
static void gesture_apply_for_symmetry_pass(bContext &C, gesture::GestureData &gesture_data)
static int gesture_line_exec(bContext *C, wmOperator *op)
static int gesture_line_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void init_operation(gesture::GestureData &gesture_data, wmOperator &)
static void apply_projection_grids(const Sculpt &sd, const gesture::GestureData &gesture_data, const bke::pbvh::GridsNode &node, Object &object, LocalData &tls)
static void apply_projection_bmesh(const Sculpt &sd, const gesture::GestureData &gesture_data, bke::pbvh::BMeshNode &node, Object &object, LocalData &tls)
static void gesture_end(bContext &C, gesture::GestureData &gesture_data)
void SCULPT_OT_project_line_gesture(wmOperatorType *ot)
static void gesture_begin(bContext &C, wmOperator &op, gesture::GestureData &gesture_data)
static void apply_projection_mesh(const Sculpt &sd, const gesture::GestureData &gesture_data, const Span< float3 > vert_normals, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, LocalData &tls, const PositionDeformData &position_data)
void push_end(Object &ob)
void push_nodes(const Depsgraph &depsgraph, Object &object, const IndexMask &node_mask, const Type type)
void push_begin(const Scene &scene, Object &ob, const wmOperator *op)
MutableSpan< float3 > gather_grids_positions(const SubdivCCG &subdiv_ccg, const Span< int > grids, Vector< float3 > &positions)
void gather_bmesh_positions(const Set< BMVert *, 0 > &verts, MutableSpan< float3 > positions)
void gather_bmesh_normals(const Set< BMVert *, 0 > &verts, MutableSpan< float3 > normals)
void flush_update_done(const bContext *C, Object &ob, UpdateType update_type)
void scale_translations(MutableSpan< float3 > translations, Span< float > factors)
void flush_update_step(bContext *C, UpdateType update_type)
void calc_translations_to_plane(Span< float3 > vert_positions, Span< int > verts, const float4 &plane, MutableSpan< float3 > translations)
void clip_and_lock_translations(const Sculpt &sd, const SculptSession &ss, Span< float3 > positions, Span< int > verts, MutableSpan< float3 > translations)
void apply_translations(Span< float3 > translations, Span< int > verts, MutableSpan< float3 > positions)
void gather_data_mesh(Span< T > src, Span< int > indices, MutableSpan< T > dst)
void gather_grids_normals(const SubdivCCG &subdiv_ccg, Span< int > grids, MutableSpan< float3 > normals)
bool SCULPT_mode_poll_view3d(bContext *C)
blender::Array< blender::float3 > positions
VArraySpan< bool > hide_vert
void(* end)(bContext &, GestureData &)
void(* begin)(bContext &, wmOperator &, GestureData &)
void(* apply_for_symmetry_pass)(bContext &, GestureData &)
Vector< float3 > positions
Vector< float3 > translations
Vector< float > distances
gesture::Operation operation
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
int WM_gesture_straightline_oneshot_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_straightline_active_side_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)