|
Blender V4.3
|
#include <climits>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_brush_types.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "DNA_space_types.h"#include "DNA_view3d_types.h"#include "BLI_math_vector.h"#include "BLT_translation.hh"#include "BKE_brush.hh"#include "BKE_context.hh"#include "BKE_lib_id.hh"#include "BKE_paint.hh"#include "ED_paint.hh"#include "ED_view3d.hh"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "UI_view2d.hh"#include "paint_intern.hh"Go to the source code of this file.
Classes | |
| struct | PointSlideData |
Macros | |
| #define | PAINT_CURVE_SELECT_THRESHOLD 40.0f |
| #define | PAINT_CURVE_POINT_SELECT(pcp, i) (*(&pcp->bez.f1 + i) = SELECT) |
| #define | SEL_F1 (1 << 0) |
| #define | SEL_F2 (1 << 1) |
| #define | SEL_F3 (1 << 2) |
| #define | DELETE_TAG 2 |
| #define DELETE_TAG 2 |
Referenced by paintcurve_delete_point_exec().
Definition at line 43 of file paint_curve.cc.
Referenced by paintcurve_point_select(), and paintcurve_slide_invoke().
| #define PAINT_CURVE_SELECT_THRESHOLD 40.0f |
Definition at line 42 of file paint_curve.cc.
Referenced by paintcurve_point_select(), and paintcurve_slide_invoke().
| #define SEL_F1 (1 << 0) |
Definition at line 71 of file paint_curve.cc.
Referenced by paintcurve_point_get_closest(), paintcurve_point_select(), and paintcurve_point_side_index().
| #define SEL_F2 (1 << 1) |
Definition at line 72 of file paint_curve.cc.
Referenced by paintcurve_point_get_closest(), and paintcurve_point_select().
| #define SEL_F3 (1 << 2) |
Definition at line 73 of file paint_curve.cc.
Referenced by paintcurve_point_get_closest(), paintcurve_point_select(), paintcurve_point_side_index(), and paintcurve_slide_invoke().
| bool paint_curve_poll | ( | bContext * | C | ) |
Definition at line 45 of file paint_curve.cc.
References BKE_paint_brush(), BKE_paint_get_active_from_context(), BRUSH_CURVE, CTX_data_active_object(), CTX_wm_region_view3d(), CTX_wm_space_image(), Brush::flag, Object::mode, SpaceImage::mode, OB_MODE_ALL_PAINT, OB_MODE_SCULPT_CURVES, and SI_MODE_PAINT.
Referenced by ED_keymap_paint(), PAINTCURVE_OT_add_point(), PAINTCURVE_OT_cursor(), PAINTCURVE_OT_delete_point(), PAINTCURVE_OT_draw(), PAINTCURVE_OT_new(), PAINTCURVE_OT_select(), PAINTCURVE_OT_slide(), paintcurve_undosys_poll(), and paintcurve_undosys_step_encode().
|
static |
Definition at line 258 of file paint_curve.cc.
References OPERATOR_CANCELLED, OPERATOR_FINISHED, paintcurve_point_add(), wmOperator::ptr, RNA_int_get_array(), and RNA_struct_property_is_set().
Referenced by PAINTCURVE_OT_add_point().
|
static |
Definition at line 250 of file paint_curve.cc.
References OPERATOR_FINISHED, paintcurve_point_add(), wmOperator::ptr, and RNA_int_set_array().
Referenced by PAINTCURVE_OT_add_point().
|
static |
Definition at line 730 of file paint_curve.cc.
References BKE_paintmode_get_active_from_context(), copy_v2_v2(), CTX_wm_region(), CTX_wm_space_image(), SpaceImage::cursor, ED_view3d_cursor3d_update(), wmEvent::mval, NC_SPACE, ND_SPACE_IMAGE, OPERATOR_CANCELLED, OPERATOR_FINISHED, Texture2D, UI_view2d_region_to_view(), V3D_CURSOR_ORIENT_VIEW, and WM_event_add_notifier().
Referenced by PAINTCURVE_OT_cursor().
|
static |
Definition at line 299 of file paint_curve.cc.
References PaintCurve::add_index, PaintCurvePoint::bez, BEZT_ISSEL_ANY, BKE_brush_tag_unsaved_changes(), BKE_paint_brush(), BKE_paint_curve_clamp_endpoint_add_index(), BKE_paint_get_active_from_context(), CTX_wm_region(), CTX_wm_window(), DELETE_TAG, ED_paintcurve_undo_push_begin(), ED_paintcurve_undo_push_end(), BezTriple::f2, MEM_freeN(), MEM_mallocN, wmOperatorType::name, OPERATOR_CANCELLED, OPERATOR_FINISHED, Brush::paint_curve, PaintCurve::points, PaintCurve::tot_points, wmOperator::type, and WM_paint_cursor_tag_redraw().
Referenced by PAINTCURVE_OT_delete_point().
|
static |
Definition at line 680 of file paint_curve.cc.
References BKE_paintmode_get_active_from_context(), GPencil, OPERATOR_PASS_THROUGH, Sculpt, SculptCurves, SculptGreasePencil, Texture2D, Texture3D, Vertex, Weight, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().
Referenced by PAINTCURVE_OT_draw().
|
static |
Definition at line 149 of file paint_curve.cc.
References BKE_id_move_to_same_lib(), BKE_paint_curve_add(), curve, and Brush::id.
Referenced by paintcurve_new_exec(), and paintcurve_point_add().
|
static |
Definition at line 156 of file paint_curve.cc.
References BKE_brush_tag_unsaved_changes(), BKE_paint_brush(), BKE_paint_get_active_from_context(), CTX_data_main(), DATA_, NA_ADDED, NC_PAINTCURVE, OPERATOR_FINISHED, Brush::paint_curve, paintcurve_for_brush_add(), and WM_event_add_notifier().
Referenced by PAINTCURVE_OT_new().
| void PAINTCURVE_OT_add_point | ( | wmOperatorType * | ot | ) |
Definition at line 271 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_add_point_exec(), paintcurve_add_point_invoke(), wmOperatorType::poll, RNA_def_int_vector(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
| void PAINTCURVE_OT_cursor | ( | wmOperatorType * | ot | ) |
Definition at line 758 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, ot, paint_curve_poll(), paintcurve_cursor_invoke(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
| void PAINTCURVE_OT_delete_point | ( | wmOperatorType * | ot | ) |
Definition at line 365 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_delete_point_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
| void PAINTCURVE_OT_draw | ( | wmOperatorType * | ot | ) |
Definition at line 715 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_draw_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
| void PAINTCURVE_OT_new | ( | wmOperatorType * | ot | ) |
Definition at line 172 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_new_exec(), and wmOperatorType::poll.
Referenced by ED_operatortypes_paint().
| void PAINTCURVE_OT_select | ( | wmOperatorType * | ot | ) |
Definition at line 509 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_select_point_exec(), paintcurve_select_point_invoke(), wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int_vector(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
| void PAINTCURVE_OT_slide | ( | wmOperatorType * | ot | ) |
Definition at line 658 of file paint_curve.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_UNDO, ot, paint_curve_poll(), paintcurve_slide_invoke(), paintcurve_slide_modal(), wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 187 of file paint_curve.cc.
References PaintCurve::add_index, PaintCurvePoint::bez, BKE_brush_tag_unsaved_changes(), BKE_paint_brush(), BKE_paint_curve_clamp_endpoint_add_index(), BKE_paint_get_active_from_context(), copy_v3_v3(), CTX_data_main(), CTX_wm_region(), CTX_wm_window(), DATA_, ED_paintcurve_undo_push_begin(), ED_paintcurve_undo_push_end(), BezTriple::f1, BezTriple::f2, BezTriple::f3, float, BezTriple::h1, BezTriple::h2, HD_ALIGN, MEM_freeN(), MEM_mallocN, wmOperatorType::name, Brush::paint_curve, paintcurve_for_brush_add(), PaintCurve::points, SELECT, PaintCurve::tot_points, wmOperator::type, and WM_paint_cursor_tag_redraw().
Referenced by paintcurve_add_point_exec(), and paintcurve_add_point_invoke().
|
static |
Definition at line 117 of file paint_curve.cc.
Referenced by paintcurve_point_select(), and paintcurve_slide_invoke().
|
static |
Definition at line 76 of file paint_curve.cc.
References PaintCurvePoint::bez, closest(), len_manhattan_v2v2(), PaintCurve::points, pos, SEL_F1, SEL_F2, SEL_F3, PaintCurve::tot_points, and BezTriple::vec.
Referenced by paintcurve_point_select(), and paintcurve_slide_invoke().
|
static |
Definition at line 380 of file paint_curve.cc.
References PaintCurvePoint::bez, BKE_paint_brush(), BKE_paint_curve_clamp_endpoint_add_index(), BKE_paint_get_active_from_context(), CTX_wm_region(), CTX_wm_window(), ED_paintcurve_undo_push_begin(), ED_paintcurve_undo_push_end(), BezTriple::f1, BezTriple::f2, BezTriple::f3, float, wmOperatorType::name, Brush::paint_curve, PAINT_CURVE_POINT_SELECT, PAINT_CURVE_SELECT_THRESHOLD, paintcurve_point_co_index(), paintcurve_point_get_closest(), PaintCurve::points, SEL_F1, SEL_F2, SEL_F3, SELECT, select(), PaintCurve::tot_points, wmOperator::type, and WM_paint_cursor_tag_redraw().
Referenced by paintcurve_select_point_exec(), and paintcurve_select_point_invoke().
|
static |
Definition at line 127 of file paint_curve.cc.
References BEZT_ISSEL_ANY, BezTriple::f1, BezTriple::f3, SEL_F1, SEL_F3, and SELECT.
Referenced by paintcurve_slide_invoke().
|
static |
Definition at line 493 of file paint_curve.cc.
References OPERATOR_CANCELLED, OPERATOR_FINISHED, paintcurve_point_select(), wmOperator::ptr, RNA_boolean_get(), RNA_int_get_array(), and RNA_struct_property_is_set().
Referenced by PAINTCURVE_OT_select().
|
static |
Definition at line 481 of file paint_curve.cc.
References OPERATOR_CANCELLED, OPERATOR_FINISHED, paintcurve_point_select(), wmOperator::ptr, RNA_boolean_get(), and RNA_int_set_array().
Referenced by PAINTCURVE_OT_select().
|
static |
Definition at line 552 of file paint_curve.cc.
References PointSlideData::align, PaintCurvePoint::bez, BKE_brush_tag_unsaved_changes(), BKE_paint_brush(), BKE_paint_curve_clamp_endpoint_add_index(), BKE_paint_get_active_from_context(), copy_v2_v2(), copy_v2_v2_int(), CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, PointSlideData::event, BezTriple::f1, BezTriple::f2, BezTriple::f3, float, PointSlideData::initial_loc, MEM_mallocN, wmEvent::mval, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, Brush::paint_curve, PAINT_CURVE_POINT_SELECT, PAINT_CURVE_SELECT_THRESHOLD, paintcurve_point_co_index(), paintcurve_point_get_closest(), paintcurve_point_side_index(), PointSlideData::pcp, PointSlideData::point_initial_loc, PaintCurve::points, wmOperator::ptr, RNA_boolean_get(), SEL_F3, PointSlideData::select, select(), PaintCurve::tot_points, BezTriple::vec, WM_event_add_modal_handler(), and WM_paint_cursor_tag_redraw().
Referenced by PAINTCURVE_OT_slide().
|
static |
Definition at line 615 of file paint_curve.cc.
References add_v2_v2(), add_v2_v2v2(), PointSlideData::align, PaintCurvePoint::bez, copy_v2_v2(), CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, diff(), ED_paintcurve_undo_push_begin(), ED_paintcurve_undo_push_end(), PointSlideData::event, float, PointSlideData::initial_loc, KM_RELEASE, MEM_freeN(), MOUSEMOVE, wmEvent::mval, wmOperatorType::name, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, PointSlideData::pcp, PointSlideData::point_initial_loc, PointSlideData::select, sub_v2_v2v2(), wmEvent::type, wmOperator::type, wmEvent::val, BezTriple::vec, and WM_paint_cursor_tag_redraw().
Referenced by PAINTCURVE_OT_slide().