|
Blender V5.0
|
Go to the source code of this file.
Classes | |
| struct | GizmoCommonData |
| struct | GizmoInteraction |
Macros | |
| #define | DIAL_RESOLUTION 48 |
| #define | WM_GIZMO_SELECT_BIAS 6.0f |
Functions | |
| static float | WM_gizmo_select_bias (bool select) |
| float | gizmo_offset_from_value (GizmoCommonData *data, float value, bool constrained, bool inverted) |
| float | gizmo_value_from_offset (GizmoCommonData *data, GizmoInteraction *inter, float offset, bool constrained, bool inverted, bool use_precision) |
| void | gizmo_property_data_update (wmGizmo *gz, GizmoCommonData *data, wmGizmoProperty *gz_prop, bool constrained, bool inverted) |
| void | gizmo_property_value_reset (bContext *C, const wmGizmo *gz, GizmoInteraction *inter, wmGizmoProperty *gz_prop) |
| void | gizmo_color_get (const wmGizmo *gz, bool highlight, float r_color[4]) |
| bool | gizmo_window_project_2d (bContext *C, const wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2]) |
| bool | gizmo_window_project_3d (bContext *C, const wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3]) |
| wmGizmo * | gizmo_find_from_properties (const IDProperty *properties, const int spacetype, const int regionid) |
| void | wm_gizmo_geometryinfo_draw (const GizmoGeomInfo *info, bool select, const float color[4]) |
| void | wm_gizmo_vec_draw (const float color[4], const float(*verts)[3], uint vert_count, uint pos, uint primitive_type) |
| #define DIAL_RESOLUTION 48 |
Definition at line 20 of file gizmo_library_intern.hh.
Referenced by dial_geom_draw(), dial_ghostarc_draw(), and gizmo_primitive_draw_intern().
| #define WM_GIZMO_SELECT_BIAS 6.0f |
This bias is to be applied on wire gizmos or any small gizmos which may be difficult to pick otherwise. The value is defined in logical pixels.
Definition at line 26 of file gizmo_library_intern.hh.
Referenced by WM_gizmo_select_bias().
Definition at line 158 of file gizmo_library_utils.cc.
References wmGizmo::color, wmGizmo::color_hi, copy_v4_v4(), wmGizmo::flag, and WM_GIZMO_DRAW_HOVER.
Referenced by arrow_draw_intern(), button2d_draw_intern(), dial_draw_intern(), ed_gizmo_draw_preset_geometry(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_primitive_draw_intern(), and move3d_draw_intern().
| wmGizmo * gizmo_find_from_properties | ( | const IDProperty * | properties, |
| const int | spacetype, | ||
| const int | regionid ) |
Definition at line 257 of file gizmo_library_utils.cc.
References ELEM, G_MAIN, LISTBASE_FOREACH, RGN_TYPE_ANY, SPACE_TYPE_ANY, and WM_gizmomap_group_list().
Referenced by gizmo_primitive_rna_find_operator(), and gizmo_snap_rna_find_operator().
| float gizmo_offset_from_value | ( | GizmoCommonData * | data, |
| float | value, | ||
| bool | constrained, | ||
| bool | inverted ) |
Definition at line 62 of file gizmo_library_utils.cc.
References data, and gizmo_offset_from_value_constr().
Referenced by gizmo_arrow_exit(), and gizmo_arrow_modal().
| void gizmo_property_data_update | ( | wmGizmo * | gz, |
| GizmoCommonData * | data, | ||
| wmGizmoProperty * | gz_prop, | ||
| bool | constrained, | ||
| bool | inverted ) |
Definition at line 110 of file gizmo_library_utils.cc.
References BLI_assert, wmGizmoProperty::custom_func, data, gizmo_offset_from_value_constr(), wmGizmoProperty::prop, wmGizmoProperty::value_get_fn, WM_gizmo_target_property_float_get(), and WM_gizmo_target_property_float_range_get().
Referenced by gizmo_arrow_property_update().
| void gizmo_property_value_reset | ( | bContext * | C, |
| const wmGizmo * | gz, | ||
| GizmoInteraction * | inter, | ||
| wmGizmoProperty * | gz_prop ) |
Definition at line 148 of file gizmo_library_utils.cc.
References C, GizmoInteraction::init_value, and WM_gizmo_target_property_float_set().
Referenced by gizmo_arrow_exit().
| float gizmo_value_from_offset | ( | GizmoCommonData * | data, |
| GizmoInteraction * | inter, | ||
| float | offset, | ||
| bool | constrained, | ||
| bool | inverted, | ||
| bool | use_precision ) |
Definition at line 75 of file gizmo_library_utils.cc.
References CLAMP, data, GIZMO_PRECISION_FAC, gizmo_value_from_offset_constr(), GizmoInteraction::init_offset, max, GizmoInteraction::precision_offset, and GizmoInteraction::prev_offset.
Referenced by gizmo_arrow_modal().
| bool gizmo_window_project_2d | ( | bContext * | C, |
| const wmGizmo * | gz, | ||
| const float | mval[2], | ||
| int | axis, | ||
| bool | use_offset, | ||
| float | r_co[2] ) |
Takes mouse coordinates and returns them in relation to the gizmo. Both 2D & 3D supported, use so we can use 2D gizmos in the 3D view.
Definition at line 170 of file gizmo_library_utils.cc.
References C, CLOG_WARN, copy_v2_v2(), CTX_wm_region(), ED_view3d_win_to_3d_on_plane(), wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoType::idname, invert_m4_m4(), LOG, mul_m4_v3(), params, wmGizmo::parent_gzgroup, plane_from_point_normal_v3(), ARegion::regiondata, wmGizmo::type, wmGizmoGroup::type, unit_m4(), WM_gizmo_calc_matrix_final_params(), and WM_GIZMOGROUPTYPE_3D.
Referenced by gizmo_button2d_test_select(), gizmo_cage2d_invoke(), gizmo_cage2d_modal(), gizmo_cage2d_test_select(), gizmo_move_modal(), and gizmo_move_test_select().
| bool gizmo_window_project_3d | ( | bContext * | C, |
| const wmGizmo * | gz, | ||
| const float | mval[2], | ||
| bool | use_offset, | ||
| float | r_co[3] ) |
Definition at line 215 of file gizmo_library_utils.cc.
References C, CLOG_WARN, copy_v2_v2(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_win_to_3d(), wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoType::idname, invert_m4_m4(), LOG, mul_m4_v3(), params, wmGizmo::parent_gzgroup, wmGizmo::type, wmGizmoGroup::type, unit_m4(), WM_gizmo_calc_matrix_final_params(), and WM_GIZMOGROUPTYPE_3D.
Referenced by gizmo_cage3d_invoke(), and gizmo_cage3d_modal().
| void wm_gizmo_geometryinfo_draw | ( | const GizmoGeomInfo * | info, |
| bool | select, | ||
| const float | color[4] ) |
Main draw call for GizmoGeomInfo data
Definition at line 17 of file gizmo_draw_utils.cc.
References batch, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_CULL_BACK, GPU_CULL_NONE, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_face_culling(), GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_TRIS, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format(), GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), i, GizmoGeomInfo::indices, GizmoGeomInfo::ntris, GizmoGeomInfo::nverts, and GizmoGeomInfo::verts.
Referenced by arrow_draw_geom(), dial_geom_draw(), ed_gizmo_draw_preset_geometry(), and move_geom_draw().
|
inlinestatic |
Definition at line 28 of file gizmo_library_intern.hh.
References select, UI_SCALE_FAC, and WM_GIZMO_SELECT_BIAS.
Referenced by arrow_draw_geom(), button2d_draw_intern(), button2d_geom_draw_backdrop(), dial_draw_intern(), gizmo_primitive_draw_geom(), and move_geom_draw().
| void wm_gizmo_vec_draw | ( | const float | color[4], |
| const float(*) | verts[3], | ||
| uint | vert_count, | ||
| uint | pos, | ||
| uint | primitive_type ) |
Definition at line 65 of file gizmo_draw_utils.cc.
References GPU_PRIM_LINE_LOOP, GPU_PRIM_LINES, GPU_PRIM_TRI_FAN, GPU_PRIM_TRIS, i, immBegin(), immEnd(), immUniformColor4fv(), immVertex3fv(), pos, and verts.
Referenced by arrow_draw_geom(), and gizmo_primitive_draw_geom().