|
Blender V4.3
|
#include "BLI_listbase.h"#include "BLI_math_matrix.hh"#include "BLI_math_matrix_types.hh"#include "BLI_math_rotation.h"#include "BLI_math_vector_types.hh"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_gpencil_legacy.h"#include "BKE_report.hh"#include "BKE_layer.hh"#include "BKE_scene.hh"#include "BKE_unit.hh"#include "DNA_gpencil_legacy_types.h"#include "DNA_object_types.h"#include "DNA_view3d_types.h"#include "ED_gizmo_library.hh"#include "ED_gizmo_utils.hh"#include "ED_screen.hh"#include "ED_transform.hh"#include "ED_transform_snap_object_context.hh"#include "ED_view3d.hh"#include "UI_interface.hh"#include "UI_resources.hh"#include "MEM_guardedalloc.h"#include "RNA_access.hh"#include "WM_api.hh"#include "WM_toolsystem.hh"#include "WM_types.hh"#include "DEG_depsgraph_query.hh"#include "view3d_intern.hh"#include "GPU_immediate.hh"#include "GPU_immediate_util.hh"#include "GPU_matrix.hh"#include "GPU_state.hh"#include "BLF_api.hh"Go to the source code of this file.
Classes | |
| struct | RulerInfo |
| struct | RulerItem |
| struct | RulerInteraction |
Macros | |
| #define | USE_AXIS_CONSTRAINTS |
| #define | MVAL_MAX_PX_DIST 12.0f |
| #define | RULER_PICK_DIST 12.0f |
| #define | RULER_PICK_DIST_SQ (RULER_PICK_DIST * RULER_PICK_DIST) |
| #define | PART_LINE 0xff |
Enumerations | |
| enum | { RULERITEM_USE_ANGLE = (1 << 0) , RULERITEM_USE_ANGLE_ACTIVE = (1 << 1) } |
| enum | { RULER_STATE_NORMAL = 0 , RULER_STATE_DRAG } |
| enum | { CONSTRAIN_AXIS_NONE = -1 , CONSTRAIN_AXIS_X = 0 , CONSTRAIN_AXIS_Y = 1 , CONSTRAIN_AXIS_Z = 2 } |
| enum | { CONSTRAIN_MODE_OFF = 0 , CONSTRAIN_MODE_1 = 1 , CONSTRAIN_MODE_2 = 2 } |
Functions | |
Internal Ruler Utilities | |
| static RulerItem * | ruler_item_add (wmGizmoGroup *gzgroup) |
| static void | ruler_item_remove (bContext *C, wmGizmoGroup *gzgroup, RulerItem *ruler_item) |
| static void | ruler_item_as_string (RulerItem *ruler_item, UnitSettings *unit, char *numstr, size_t numstr_size, int prec) |
| static bool | view3d_ruler_pick (wmGizmoGroup *gzgroup, RulerItem *ruler_item, const float2 mval, int *r_co_index) |
| static void | ruler_state_set (RulerInfo *ruler_info, int state) |
| static void | view3d_ruler_item_project (RulerInfo *ruler_info, float3 &r_co, const int xy[2]) |
| static bool | view3d_ruler_item_mousemove (const bContext *C, Depsgraph *depsgraph, RulerInfo *ruler_info, RulerItem *ruler_item, const int mval[2], const bool do_thickness, const bool do_snap) |
| static bool | gizmo_ruler_check_for_operator (const wmGizmoGroup *gzgroup) |
Ruler Item Gizmo Type | |
| static void | gizmo_ruler_draw (const bContext *C, wmGizmo *gz) |
| static int | gizmo_ruler_test_select (bContext *, wmGizmo *gz, const int mval[2]) |
| static int | gizmo_ruler_modal (bContext *C, wmGizmo *gz, const wmEvent *event, eWM_GizmoFlagTweak tweak_flag) |
| static int | gizmo_ruler_invoke (bContext *C, wmGizmo *gz, const wmEvent *event) |
| static void | gizmo_ruler_exit (bContext *C, wmGizmo *gz, const bool cancel) |
| static int | gizmo_ruler_cursor_get (wmGizmo *gz) |
| void | VIEW3D_GT_ruler_item (wmGizmoType *gzt) |
Ruler Gizmo Group | |
| static void | WIDGETGROUP_ruler_setup (const bContext *C, wmGizmoGroup *gzgroup) |
| void | VIEW3D_GGT_ruler (wmGizmoGroupType *gzgt) |
Add Ruler Operator | |
| static bool | view3d_ruler_poll (bContext *C) |
| static int | view3d_ruler_add_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | VIEW3D_OT_ruler_add (wmOperatorType *ot) |
Remove Ruler Operator | |
| static int | view3d_ruler_remove_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| void | VIEW3D_OT_ruler_remove (wmOperatorType *ot) |
Variables | |
| static const char * | view3d_gzgt_ruler_id = "VIEW3D_GGT_ruler" |
Ruler/Grease Pencil Conversion | |
| #define | RULER_ID "RulerData3D" |
| static bGPDlayer * | view3d_ruler_layer_get (bGPdata *gpd) |
| static RulerItem * | gzgroup_ruler_item_first_get (wmGizmoGroup *gzgroup) |
| static void | view3d_ruler_gpencil_ensure (bContext *C) |
| static bool | view3d_ruler_to_gpencil (bContext *C, wmGizmoGroup *gzgroup) |
| static bool | view3d_ruler_from_gpencil (const bContext *C, wmGizmoGroup *gzgroup) |
| #define MVAL_MAX_PX_DIST 12.0f |
Definition at line 73 of file view3d_gizmo_ruler.cc.
Referenced by view3d_ruler_item_mousemove().
| #define PART_LINE 0xff |
Definition at line 90 of file view3d_gizmo_ruler.cc.
Referenced by gizmo_ruler_cursor_get(), gizmo_ruler_invoke(), and gizmo_ruler_test_select().
| #define RULER_ID "RulerData3D" |
Definition at line 511 of file view3d_gizmo_ruler.cc.
Referenced by view3d_ruler_to_gpencil().
| #define RULER_PICK_DIST 12.0f |
Definition at line 86 of file view3d_gizmo_ruler.cc.
| #define RULER_PICK_DIST_SQ (RULER_PICK_DIST * RULER_PICK_DIST) |
Definition at line 87 of file view3d_gizmo_ruler.cc.
Referenced by view3d_ruler_pick().
| #define USE_AXIS_CONSTRAINTS |
Supporting transform features could be removed if the actual transform system is used. Keep the option open since each transform feature is duplicating logic.
Definition at line 69 of file view3d_gizmo_ruler.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| RULERITEM_USE_ANGLE | Use protractor. |
| RULERITEM_USE_ANGLE_ACTIVE | Protractor vertex is selected (deleting removes it). |
Definition at line 78 of file view3d_gizmo_ruler.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| RULER_STATE_NORMAL | |
| RULER_STATE_DRAG | |
Definition at line 95 of file view3d_gizmo_ruler.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| CONSTRAIN_AXIS_NONE | |
| CONSTRAIN_AXIS_X | |
| CONSTRAIN_AXIS_Y | |
| CONSTRAIN_AXIS_Z | |
Definition at line 102 of file view3d_gizmo_ruler.cc.
| anonymous enum |
|
static |
When the gizmo-group has been created immediately before running an operator to manipulate rulers, it's possible the new gizmo-group has not yet been initialized. in 3.0 this happened because left-click drag would both select and add a new ruler, significantly increasing the likelihood of this happening. Workaround this crash by checking the gizmo's custom-data has not been cleared. The key-map has also been modified not to trigger this bug, see #95591.
Definition at line 480 of file view3d_gizmo_ruler.cc.
References wmGizmoGroup::customdata.
Referenced by view3d_ruler_add_invoke(), and view3d_ruler_remove_invoke().
Definition at line 1225 of file view3d_gizmo_ruler.cc.
References wmGizmo::highlight_part, PART_LINE, WM_CURSOR_CROSS, and WM_CURSOR_NSEW_SCROLL.
Referenced by VIEW3D_GT_ruler_item().
Definition at line 645 of file view3d_gizmo_ruler.cc.
References angle(), angle_normalized_v3v3(), axis_angle_to_quat(), BLF_color3ubv(), BLF_disable(), BLF_draw(), BLF_enable(), blf_mono_font, BLF_position(), BLF_ROTATION, BLF_rotation(), BLF_size(), BLF_width_and_height(), RulerItem::co, col, copy_v3_fl(), blender::math::cross(), CTX_data_scene(), wmGizmoGroup::customdata, blender::math::distance(), ED_view3d_pixel_size_no_ui_scale(), ED_view3d_project_float_global(), fabs(), RulerItem::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_matrix_identity_set(), GPU_matrix_pop(), GPU_matrix_pop_projection(), GPU_matrix_projection_set, GPU_matrix_push(), GPU_matrix_push_projection(), GPU_matrix_set, GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), GPU_viewport_size_get_f(), immBegin(), immBindBuiltinProgram(), immEnd(), immRectf(), immUnbindProgram(), immUniform1f(), immUniform1i(), immUniform2f(), immUniform4f(), immUniform4fv(), immUniformColor3fv(), immUniformColor3ubv(), immUniformColor4fv(), immVertex2f(), immVertex2fv(), immVertex3fv(), immVertexFormat(), RulerInfo::item_active, len, len_v2v2(), min_fff(), mul_qt_v3(), blender::math::normalize(), normalize_v2(), wmGizmo::parent_gzgroup, RulerInfo::region, ruler_item_as_string(), RULERITEM_USE_ANGLE, RULERITEM_USE_ANGLE_ACTIVE, sub_v2_v2v2(), TH_TEXT, TH_WIRE, UI_GetThemeColor3ubv(), UI_SCALE_FAC, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_NEAR, RegionView3D::viewmat, RegionView3D::winmat, and wmOrtho2_region_pixelspace().
Referenced by VIEW3D_GT_ruler_item().
Definition at line 1206 of file view3d_gizmo_ruler.cc.
References wmGizmoGroup::customdata, RulerInfo::gizmo, wmGizmo::interaction_data, MEM_SAFE_FREE, wmGizmo::parent_gzgroup, RulerInfo::prop_prevpoint, wmGizmo::ptr, RNA_property_unset(), RULER_STATE_DRAG, RULER_STATE_NORMAL, ruler_state_set(), RulerInfo::snap_data, RulerInfo::state, and view3d_ruler_to_gpencil().
Referenced by VIEW3D_GT_ruler_item().
Definition at line 1105 of file view3d_gizmo_ruler.cc.
References CLAMP, RulerItem::co, RulerInteraction::co_index, RulerInfo::constrain_axis, CONSTRAIN_AXIS_NONE, RulerInfo::constrain_mode, CONSTRAIN_MODE_OFF, CTX_data_ensure_evaluated_depsgraph(), wmGizmoGroup::customdata, depsgraph, RulerInteraction::drag_start_co, ED_view3d_project_float_global(), RulerItem::flag, RulerInfo::gizmo, wmGizmo::highlight_part, wmGizmo::interaction_data, blender::math::interpolate(), RulerInfo::item_active, line_point_factor_v2(), MEM_callocN, wmEvent::mval, OPERATOR_RUNNING_MODAL, wmGizmo::parent_gzgroup, PART_LINE, RulerInfo::prop_prevpoint, RulerInfo::prop_snap_source_type, wmGizmo::ptr, RulerInfo::region, RNA_property_enum_set(), RNA_property_float_set_array(), RNA_property_unset(), RULER_STATE_DRAG, ruler_state_set(), RULERITEM_USE_ANGLE, RULERITEM_USE_ANGLE_ACTIVE, SCE_SNAP_TO_VERTEX, RulerInfo::snap_data, RulerItem::snap_type, V3D_PROJ_TEST_NOP, view3d_ruler_gpencil_ensure(), view3d_ruler_item_mousemove(), and WM_event_drag_start_mval_fl().
Referenced by VIEW3D_GT_ruler_item().
|
static |
Definition at line 1029 of file view3d_gizmo_ruler.cc.
References RulerInfo::constrain_axis, CONSTRAIN_AXIS_NONE, CONSTRAIN_AXIS_X, CONSTRAIN_AXIS_Y, CONSTRAIN_AXIS_Z, RulerInfo::constrain_mode, CONSTRAIN_MODE_1, CONSTRAIN_MODE_2, CONSTRAIN_MODE_OFF, CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), wmGizmoGroup::customdata, depsgraph, RulerInfo::do_thickness, RulerInfo::drag_state_prev, ED_gizmotypes_snap_3d_data_get(), ED_gizmotypes_snap_3d_is_enabled(), ED_region_tag_redraw_editor_overlays(), ELEM, EVT_XKEY, EVT_YKEY, EVT_ZKEY, RulerInfo::gizmo, KM_PRESS, KM_RELEASE, MOUSEMOVE, wmEvent::mval, OPERATOR_RUNNING_MODAL, wmGizmo::parent_gzgroup, RulerInfo::region, RULER_STATE_DRAG, RulerInfo::snap_data, RulerInfo::state, wmEvent::type, wmEvent::val, view3d_ruler_item_mousemove(), WM_GIZMO_TWEAK_PRECISE, and WM_GIZMO_TWEAK_SNAP.
Referenced by VIEW3D_GT_ruler_item().
Definition at line 1009 of file view3d_gizmo_ruler.cc.
References RulerItem::flag, float, wmGizmo::parent_gzgroup, PART_LINE, RULERITEM_USE_ANGLE, and view3d_ruler_pick().
Referenced by VIEW3D_GT_ruler_item().
|
static |
Definition at line 502 of file view3d_gizmo_ruler.cc.
References BLI_assert, wmGizmoGroup::customdata, ListBase::first, RulerInfo::gizmo, wmGizmoGroup::gizmos, and RulerInfo::snap_data.
Referenced by view3d_ruler_to_gpencil().
|
static |
Definition at line 177 of file view3d_gizmo_ruler.cc.
References RulerItem::gz, WM_GIZMO_DRAW_MODAL, WM_gizmo_new_ptr(), WM_gizmo_set_flag(), and WM_gizmotype_find().
Referenced by view3d_ruler_add_invoke(), and view3d_ruler_from_gpencil().
|
static |
Definition at line 195 of file view3d_gizmo_ruler.cc.
References angle_v3v3v3(), B_UNIT_LENGTH, B_UNIT_ROTATION, BKE_unit_value_as_string(), BLI_snprintf(), BLI_STR_UTF8_DEGREE_SIGN, RulerItem::co, RulerItem::flag, len_v3v3(), RAD2DEGF, RULERITEM_USE_ANGLE, and USER_UNIT_NONE.
Referenced by gizmo_ruler_draw().
|
static |
Definition at line 186 of file view3d_gizmo_ruler.cc.
References wmGizmoGroup::customdata, wmGizmoGroup::gizmos, RulerItem::gz, RulerInfo::item_active, wmGizmoGroup::parent_gzmap, and WM_gizmo_unlink().
Referenced by view3d_ruler_remove_invoke().
Ensure the 'snap_context' is only cached while dragging, needed since the user may toggle modes between tool use.
Definition at line 304 of file view3d_gizmo_ruler.cc.
References BLI_assert, RulerInfo::drag_state_prev, RulerInfo::gizmo, RulerInfo::prop_prevpoint, wmGizmo::ptr, RNA_property_float_set_array(), RULER_STATE_DRAG, RULER_STATE_NORMAL, RulerInfo::snap_data, RulerInfo::state, state, WM_GIZMO_DRAW_VALUE, and WM_gizmo_set_flag().
Referenced by gizmo_ruler_exit(), and gizmo_ruler_invoke().
| void VIEW3D_GGT_ruler | ( | wmGizmoGroupType * | gzgt | ) |
Definition at line 1294 of file view3d_gizmo_ruler.cc.
References ED_gizmo_poll_or_unlink_delayed_from_tool(), wmGizmoGroupType::flag, wmGizmoGroupType::gzmap_params, wmGizmoGroupType::idname, wmGizmoGroupType::name, wmGizmoGroupType::poll, wmGizmoMapType_Params::regionid, RGN_TYPE_WINDOW, wmGizmoGroupType::setup, SPACE_VIEW3D, wmGizmoMapType_Params::spaceid, view3d_gzgt_ruler_id, WIDGETGROUP_ruler_setup(), WM_GIZMOGROUPTYPE_3D, WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL, and WM_GIZMOGROUPTYPE_SCALE.
Referenced by view3d_widgets().
| void VIEW3D_GT_ruler_item | ( | wmGizmoType * | gzt | ) |
Definition at line 1233 of file view3d_gizmo_ruler.cc.
References wmGizmoType::cursor_get, wmGizmoType::draw, wmGizmoType::exit, gizmo_ruler_cursor_get(), gizmo_ruler_draw(), gizmo_ruler_exit(), gizmo_ruler_invoke(), gizmo_ruler_modal(), gizmo_ruler_test_select(), wmGizmoType::idname, wmGizmoType::invoke, wmGizmoType::modal, wmGizmoType::struct_size, and wmGizmoType::test_select.
Referenced by view3d_widgets().
| void VIEW3D_OT_ruler_add | ( | wmOperatorType * | ot | ) |
Definition at line 1382 of file view3d_gizmo_ruler.cc.
References wmOperatorType::description, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, wmOperatorType::poll, view3d_ruler_add_invoke(), and view3d_ruler_poll().
Referenced by view3d_operatortypes().
| void VIEW3D_OT_ruler_remove | ( | wmOperatorType * | ot | ) |
Definition at line 1441 of file view3d_gizmo_ruler.cc.
References wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_INTERNAL, OPTYPE_UNDO, ot, wmOperatorType::poll, view3d_ruler_poll(), and view3d_ruler_remove_invoke().
Referenced by view3d_operatortypes().
|
static |
Definition at line 1325 of file view3d_gizmo_ruler.cc.
References BKE_report(), RulerItem::co, RulerInteraction::co_index, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CTX_wm_region(), CTX_wm_view3d(), wmGizmoGroup::customdata, depsgraph, RulerInteraction::drag_start_co, ED_gizmotypes_snap_3d_is_enabled(), RulerInfo::gizmo, View3D::gizmo_flag, gizmo_ruler_check_for_operator(), RulerItem::gz, wmGizmo::highlight_part, wmGizmo::interaction_data, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_RUNNING_MODAL, RulerInfo::prop_prevpoint, RulerInfo::prop_snap_source_type, wmGizmo::ptr, wmOperator::reports, RNA_property_enum_set(), RNA_property_float_set_array(), RPT_WARNING, ruler_item_add(), RulerInfo::snap_data, RulerItem::snap_type, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_TOOL, view3d_gzgt_ruler_id, view3d_ruler_item_mousemove(), WM_event_drag_start_mval(), WM_gizmo_highlight_set(), WM_gizmomap_group_find(), WM_OP_INVOKE_REGION_WIN, and WM_operator_name_call().
Referenced by VIEW3D_OT_ruler_add().
|
static |
Definition at line 598 of file view3d_gizmo_ruler.cc.
References BKE_gpencil_layer_frame_get(), RulerItem::co, copy_v3_v3(), CTX_data_scene(), RulerItem::flag, GP_GETFRAME_USE_PREV, LISTBASE_FOREACH, ruler_item_add(), RULERITEM_USE_ANGLE, bGPDframe::strokes, view3d_ruler_layer_get(), and bGPDspoint::x.
Referenced by WIDGETGROUP_ruler_setup().
|
static |
Definition at line 515 of file view3d_gizmo_ruler.cc.
References BKE_gpencil_data_addnew(), CTX_data_main(), CTX_data_scene(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), and ID_RECALC_SYNC_TO_EVAL.
Referenced by gizmo_ruler_invoke(), and view3d_ruler_remove_invoke().
|
static |
Use for mouse-move events.
Definition at line 340 of file view3d_gizmo_ruler.cc.
References RulerInfo::area, BKE_scene_orientation_get_index(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_assert, RulerItem::co, RulerInteraction::co_index, RulerInfo::constrain_axis, RulerInfo::constrain_mode, CONSTRAIN_MODE_2, CONSTRAIN_MODE_OFF, DEG_get_input_scene(), DEG_get_input_view_layer(), depsgraph, RulerInteraction::drag_start_co, ED_gizmotypes_snap_3d_context_ensure(), ED_gizmotypes_snap_3d_data_get(), ED_gizmotypes_snap_3d_is_enabled(), ED_transform_calc_orientation_from_type_ex(), ED_transform_snap_object_project_ray(), ED_transform_snap_object_project_view3d(), ListBase::first, RulerItem::flag, float, RulerInfo::gizmo, RulerItem::gz, wmGizmo::interaction_data, blender::math::invert(), MVAL_MAX_PX_DIST, OBEDIT_FROM_OBACT, RulerInfo::prop_prevpoint, RulerInfo::prop_snap_source_type, wmGizmo::ptr, RulerInfo::region, ARegion::regiondata, RNA_property_enum_set(), RNA_property_float_set_array(), RULERITEM_USE_ANGLE, SCE_ORIENT_DEFAULT, SCE_SNAP_TARGET_ALL, SCE_SNAP_TO_FACE, RulerInfo::snap_data, SNAP_GEOM_CAGE, SnapObjectParams::snap_target_select, RulerItem::snap_type, ScrArea::spacedata, V3D_ORIENT_GLOBAL, V3D_ORIENT_LOCAL, and view3d_ruler_item_project().
Referenced by gizmo_ruler_invoke(), gizmo_ruler_modal(), and view3d_ruler_add_invoke().
|
static |
Definition at line 328 of file view3d_gizmo_ruler.cc.
References RulerInfo::area, ED_view3d_win_to_3d_int(), ListBase::first, RulerInfo::region, ScrArea::spacedata, and xy.
Referenced by view3d_ruler_item_mousemove().
Definition at line 492 of file view3d_gizmo_ruler.cc.
References GP_LAYER_IS_RULER, bGPdata::layers, and LISTBASE_FOREACH.
Referenced by view3d_ruler_from_gpencil(), and view3d_ruler_to_gpencil().
|
static |
Definition at line 229 of file view3d_gizmo_ruler.cc.
References RulerItem::co, wmGizmoGroup::customdata, dist_squared_to_line_segment_v2(), blender::math::distance_squared(), ED_view3d_project_float_global(), RulerItem::flag, min_axis_v3(), min_ff(), min_fff(), RulerInfo::region, RULER_PICK_DIST_SQ, RULERITEM_USE_ANGLE, UNPACK2, UNPACK3, UNUSED_VARS, and V3D_PROJ_TEST_NOP.
Referenced by gizmo_ruler_test_select().
|
static |
Definition at line 1314 of file view3d_gizmo_ruler.cc.
References CTX_wm_region_view3d(), bToolRef_Runtime::gizmo_group, STREQ, view3d_gzgt_ruler_id, and WM_toolsystem_runtime_from_context().
Referenced by VIEW3D_OT_ruler_add(), and VIEW3D_OT_ruler_remove().
|
static |
Definition at line 1402 of file view3d_gizmo_ruler.cc.
References BKE_report(), CTX_wm_region(), CTX_wm_view3d(), wmGizmoGroup::customdata, ED_region_tag_redraw_editor_overlays(), RulerItem::flag, View3D::gizmo_flag, gizmo_ruler_check_for_operator(), RulerInfo::item_active, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::reports, RPT_WARNING, ruler_item_remove(), RULERITEM_USE_ANGLE, RULERITEM_USE_ANGLE_ACTIVE, V3D_GIZMO_HIDE, V3D_GIZMO_HIDE_TOOL, view3d_gzgt_ruler_id, view3d_ruler_gpencil_ensure(), view3d_ruler_to_gpencil(), and WM_gizmomap_group_find().
Referenced by VIEW3D_OT_ruler_remove().
|
static |
Definition at line 527 of file view3d_gizmo_ruler.cc.
References bGPDstroke::aspect_ratio, BKE_gpencil_free_strokes(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_frame_get(), BLI_addtail(), BLI_assert, RulerItem::co, bGPDlayer::color, copy_v2_fl(), copy_v3_v3(), copy_v4_v4(), CTX_data_scene(), bGPDstroke::fill_opacity_fac, bGPDlayer::flag, bGPDstroke::flag, RulerItem::flag, GP_GETFRAME_ADD_NEW, GP_LAYER_HIDE, GP_LAYER_IS_RULER, GP_STROKE_3DSPACE, RulerItem::gz, gzgroup_ruler_item_first_get(), bGPDstroke::hardness, MEM_callocN, wmGizmo::next, bGPDstroke::points, bGPDspoint::pressure, RULER_ID, RULERITEM_USE_ANGLE, bGPDspoint::strength, bGPDframe::strokes, bGPDlayer::thickness, bGPDstroke::thickness, bGPDstroke::totpoints, bGPDstroke::uv_scale, view3d_ruler_layer_get(), and bGPDspoint::x.
Referenced by gizmo_ruler_exit(), and view3d_ruler_remove_invoke().
|
static |
Definition at line 1255 of file view3d_gizmo_ruler.cc.
References RulerInfo::area, CTX_wm_area(), CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), wmGizmoGroup::customdata, ED_gizmotypes_snap_3d_flag_set(), RulerInfo::gizmo, MEM_callocN, ot, RulerInfo::prop_prevpoint, RulerInfo::prop_snap_source_type, RulerInfo::region, RNA_struct_find_property(), RulerInfo::snap_data, V3D_SNAPCURSOR_SNAP_EDIT_GEOM_CAGE, view3d_ruler_from_gpencil(), RulerInfo::win, RulerInfo::wm, WM_gizmo_new_ptr(), WM_gizmo_operator_set(), WM_gizmo_set_color(), WM_gizmotype_find(), and WM_operatortype_find().
Referenced by VIEW3D_GGT_ruler().
|
static |
Definition at line 71 of file view3d_gizmo_ruler.cc.
Referenced by VIEW3D_GGT_ruler(), view3d_ruler_add_invoke(), view3d_ruler_poll(), and view3d_ruler_remove_invoke().