Blender V5.3
blender::ed::greasepencil::GreasePencilPenToolOperation Class Reference

Inherits blender::ed::curves::pen_tool::PenToolOperation.

Public Member Functions

float3 project (const float2 &screen_co) const override
IndexMask all_selected_points (const int curves_index, IndexMaskMemory &memory) const override
IndexMask visible_bezier_handle_points (const int curves_index, IndexMaskMemory &memory) const override
IndexMask editable_curves (const int curves_index, IndexMaskMemory &memory) const override
void tag_curve_changed (const int curves_index) const override
bke::CurvesGeometry & get_curves (const int curves_index) const override
IndexRange curves_range () const override
void single_point_attributes (bke::CurvesGeometry &curves, const int curves_index) const override
bool can_create_new_curve (wmOperator *op) const override
void update_view (bContext *C) const override
std::optional< wmOperatorStatus > initialize (bContext *C, wmOperator *op, const wmEvent *) override
Public Member Functions inherited from blender::ed::curves::pen_tool::PenToolOperation
virtual ~PenToolOperation ()=default
float2 layer_to_screen (const float4x4 &layer_to_object, const float3 &point) const
float3 screen_to_layer (const float4x4 &layer_to_world, const float2 &screen_co, const float3 &depth_point_layer) const
wmOperatorStatus invoke (bContext *C, wmOperator *op, const wmEvent *event)
wmOperatorStatus modal (bContext *C, wmOperator *op, const wmEvent *event)

Public Attributes

GreasePencil * grease_pencil
Vector< MutableDrawingInfo > drawings
DrawingPlacement placement
Public Attributes inherited from blender::ed::curves::pen_tool::PenToolOperation
ViewContext vc
float threshold_distance
float threshold_distance_edge
bool extrude_point
bool delete_point
bool insert_point
bool move_seg
bool select_point
bool move_point
bool cycle_handle_type
int extrude_handle
float radius
bool move_entire
bool snap_angle
bool move_handle
bool point_added
bool point_removed
bool handle_moved
float4x4 projection
float2 mouse_co
float2 xy
float2 prev_xy
float2 center_of_mass_co
ClosestElement closest_element
std::optional< int > active_drawing_index
Vector< float4x4 > layer_to_world_per_curves
Vector< float4x4 > layer_to_object_per_curves

Detailed Description

Definition at line 45 of file grease_pencil_pen.cc.

Member Function Documentation

◆ all_selected_points()

◆ can_create_new_curve()

◆ curves_range()

IndexRange blender::ed::greasepencil::GreasePencilPenToolOperation::curves_range ( ) const
inlineoverridevirtual

◆ editable_curves()

◆ get_curves()

bke::CurvesGeometry & blender::ed::greasepencil::GreasePencilPenToolOperation::get_curves ( const int curves_index) const
inlineoverridevirtual

◆ initialize()

std::optional< wmOperatorStatus > blender::ed::greasepencil::GreasePencilPenToolOperation::initialize ( bContext * C,
wmOperator * op,
const wmEvent *  )
inlineoverridevirtual

Implements blender::ed::curves::pen_tool::PenToolOperation.

Definition at line 181 of file grease_pencil_pen.cc.

References blender::ed::curves::pen_tool::PenToolOperation::active_drawing_index, blender::BKE_report(), blender::BLI_assert(), C, blender::ed::greasepencil::DrawingPlacement::cache_viewport_depths(), blender::RenderData::cfra, blender::CTX_data_depsgraph_pointer(), blender::CTX_wm_view3d(), blender::Object::data, blender::ed::greasepencil::MutableDrawingInfo::drawing, blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), blender::ed::greasepencil::ensure_active_keyframe(), blender::GP_SELECTMODE_POINT, blender::ToolSettings::gpencil_selectmode_edit, blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), layer, blender::ed::greasepencil::MutableDrawingInfo::layer_index, blender::ed::curves::pen_tool::PenToolOperation::layer_to_object_per_curves, blender::ed::curves::pen_tool::PenToolOperation::layer_to_world_per_curves, NA_EDITED, NC_GPENCIL, blender::ViewContext::obact, blender::OPERATOR_CANCELLED, placement, blender::Scene::r, blender::ViewContext::region, blender::wmOperator::reports, blender::ed::greasepencil::retrieve_editable_drawings(), blender::RPT_ERROR, blender::ViewContext::scene, blender::Scene::toolsettings, blender::ed::greasepencil::DrawingPlacement::use_project_to_stroke(), blender::ed::greasepencil::DrawingPlacement::use_project_to_surface(), blender::ed::curves::pen_tool::PenToolOperation::vc, and blender::WM_event_add_notifier().

◆ project()

float3 blender::ed::greasepencil::GreasePencilPenToolOperation::project ( const float2 & screen_co) const
inlineoverridevirtual

◆ single_point_attributes()

void blender::ed::greasepencil::GreasePencilPenToolOperation::single_point_attributes ( bke::CurvesGeometry & curves,
const int curves_index ) const
inlineoverridevirtual

◆ tag_curve_changed()

void blender::ed::greasepencil::GreasePencilPenToolOperation::tag_curve_changed ( const int curves_index) const
inlineoverridevirtual

◆ update_view()

◆ visible_bezier_handle_points()

Member Data Documentation

◆ drawings

Vector<MutableDrawingInfo> blender::ed::greasepencil::GreasePencilPenToolOperation::drawings

Definition at line 48 of file grease_pencil_pen.cc.

◆ grease_pencil

GreasePencil* blender::ed::greasepencil::GreasePencilPenToolOperation::grease_pencil

Definition at line 47 of file grease_pencil_pen.cc.

◆ placement

DrawingPlacement blender::ed::greasepencil::GreasePencilPenToolOperation::placement

Definition at line 51 of file grease_pencil_pen.cc.

Referenced by initialize().


The documentation for this class was generated from the following file: