Blender V5.0
curves_pen.cc File Reference
#include "BKE_attribute.hh"
#include "BKE_context.hh"
#include "BKE_curves.hh"
#include "BKE_curves_utils.hh"
#include "BKE_deform.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_material.hh"
#include "BKE_report.hh"
#include "BLI_array_utils.hh"
#include "BLT_translation.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "DEG_depsgraph.hh"
#include "DNA_material_types.h"
#include "ED_curves.hh"
#include "ED_grease_pencil.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "UI_resources.hh"

Go to the source code of this file.

Classes

class  blender::ed::curves::pen_tool::CurvesPenToolOperation

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::curves
namespace  blender::ed::curves::pen_tool

Enumerations

enum class  blender::ed::curves::pen_tool::PenModal : int8_t { blender::ed::curves::pen_tool::MoveHandle = 0 , blender::ed::curves::pen_tool::MoveEntire = 1 , blender::ed::curves::pen_tool::SnapAngle = 2 }

Functions

static void blender::ed::curves::pen_tool::pen_find_closest_point (const PenToolOperation &ptd, const bke::CurvesGeometry &curves, const IndexMask &editable_curves, const float4x4 &layer_to_object, const int drawing_index, const float2 &mouse_co, ClosestElement &r_closest_element)
static void blender::ed::curves::pen_tool::pen_find_closest_handle (const PenToolOperation &ptd, const bke::CurvesGeometry &curves, const IndexMask &bezier_points, const float4x4 &layer_to_object, const int drawing_index, const float2 &mouse_co, ClosestElement &r_closest_element)
static float2 blender::ed::curves::pen_tool::line_segment_closest_point (const float2 &pos_1, const float2 &pos_2, const float2 &pos, float &r_local_t)
static void blender::ed::curves::pen_tool::pen_find_closest_edge_point (const PenToolOperation &ptd, const bke::CurvesGeometry &curves, const IndexMask &editable_curves, const float4x4 &layer_to_object, const int drawing_index, const float2 &mouse_co, ClosestElement &r_closest_element)
static ClosestElement blender::ed::curves::pen_tool::find_closest_element (const PenToolOperation &ptd, const float2 &mouse_co)
static void blender::ed::curves::pen_tool::pen_status_indicators (bContext *C, wmOperator *op)
static float2 blender::ed::curves::pen_tool::snap_8_angles (const float2 &p)
static void blender::ed::curves::pen_tool::move_segment (const PenToolOperation &ptd, bke::CurvesGeometry &curves, const float4x4 &layer_to_world)
static bool blender::ed::curves::pen_tool::move_handles_in_curve (const PenToolOperation &ptd, bke::CurvesGeometry &curves, const IndexMask &selection, const float4x4 &layer_to_world, const float4x4 &layer_to_object)
static std::optional< bke::CurvesGeometryblender::ed::curves::pen_tool::extrude_curves (const PenToolOperation &ptd, const bke::CurvesGeometry &src, const float4x4 &layer_to_object, const IndexMask editable_curves)
static void blender::ed::curves::pen_tool::insert_point_to_curve (const PenToolOperation &ptd, bke::CurvesGeometry &src)
static void blender::ed::curves::pen_tool::add_single_point_and_curve (const PenToolOperation &ptd, bke::CurvesGeometry &curves, const float4x4 &layer_to_world)
static bool blender::ed::curves::pen_tool::close_curve_and_select (const PenToolOperation &ptd, bke::CurvesGeometry &curves, const IndexRange points, const bool clear_selection)
static float2 blender::ed::curves::pen_tool::calculate_center_of_mass (const PenToolOperation &ptd, const bool ends_only)
static void blender::ed::curves::pen_tool::invoke_curves (PenToolOperation &ptd, bContext *C, wmOperator *op, const wmEvent *event)
static IndexMask blender::ed::curves::pen_tool::retrieve_visible_bezier_handle_points (const bke::CurvesGeometry &curves, const int handle_display, IndexMaskMemory &memory)
static void blender::ed::curves::pen_tool::curves_pen_exit (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed::curves::pen_tool::curves_pen_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::curves::pen_tool::curves_pen_modal (bContext *C, wmOperator *op, const wmEvent *event)
void blender::ed::curves::pen_tool::pen_tool_common_props (wmOperatorType *ot)
wmKeyMapblender::ed::curves::pen_tool::ensure_keymap (wmKeyConfig *keyconf)
static void blender::ed::curves::CURVES_OT_pen (wmOperatorType *ot)
void blender::ed::curves::ED_operatortypes_curves_pen ()
void blender::ed::curves::ED_curves_pentool_modal_keymap (wmKeyConfig *keyconf)

Variables

static const EnumPropertyItem blender::ed::curves::pen_tool::prop_handle_types []
constexpr float blender::ed::curves::pen_tool::selection_distance_factor = 0.9f
constexpr float blender::ed::curves::pen_tool::selection_distance_factor_edge = 0.5f
constexpr float blender::ed::curves::pen_tool::default_handle_px_distance = 16.0f
constexpr int blender::ed::curves::pen_tool::CURVE_HANDLE_TYPES_NUM = 4
constexpr float blender::ed::curves::pen_tool::selection_edge_priority_factor = 0.1f
constexpr float blender::ed::curves::pen_tool::selection_point_overwrite_edge_distance_factor = 0.7f
constexpr float blender::ed::curves::pen_tool::selection_point_overwrite_edge_distance_factor_sq

Detailed Description

Operator for creating bézier splines.

Definition in file curves_pen.cc.