Blender V5.3
WM_gizmo_api.hh File Reference
#include "WM_gizmo_types.hh"
#include "wm_gizmo_fn.hh"
#include "BLI_string_ref.hh"
#include "DNA_listBase.h"

Go to the source code of this file.

Classes

struct  blender::wmGizmoMatrixParams

Namespaces

namespace  blender
 BMesh Iterators.

Functions

wmGizmo * blender::WM_gizmo_new_ptr (const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
wmGizmo * blender::WM_gizmo_new (const StringRef idname, wmGizmoGroup *gzgroup, PointerRNA *properties)
void blender::WM_gizmo_free (wmGizmo *gz)
void blender::WM_gizmo_unlink (ListBaseT< wmGizmo > *gizmolist, wmGizmoMap *gzmap, wmGizmo *gz, bContext *C)
bool blender::WM_gizmo_select_unlink (wmGizmoMap *gzmap, wmGizmo *gz)
bool blender::WM_gizmo_select_set (wmGizmoMap *gzmap, wmGizmo *gz, bool select)
bool blender::WM_gizmo_highlight_set (wmGizmoMap *gzmap, wmGizmo *gz)
void blender::WM_gizmo_modal_set_from_setup (wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, int part_index, const wmEvent *event)
void blender::WM_gizmo_modal_set_while_modal (wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, const wmEvent *event)
void blender::WM_gizmo_calc_matrix_final_params (const wmGizmo *gz, const wmGizmoMatrixParams *params, float r_mat[4][4])
void blender::WM_gizmo_calc_matrix_final_no_offset (const wmGizmo *gz, float r_mat[4][4])
void blender::WM_gizmo_calc_matrix_final (const wmGizmo *gz, float r_mat[4][4])
Gizmo Creation API

API for defining data on gizmo creation.

wmGizmoOpElem * blender::WM_gizmo_operator_get (wmGizmo *gz, int part_index)
PointerRNA * blender::WM_gizmo_operator_set (wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
wmOperatorStatus blender::WM_gizmo_operator_invoke (bContext *C, wmGizmo *gz, wmGizmoOpElem *gzop, const wmEvent *event)
void blender::WM_gizmo_set_matrix_location (wmGizmo *gz, const float origin[3])
void blender::WM_gizmo_set_matrix_rotation_from_z_axis (wmGizmo *gz, const float z_axis[3])
void blender::WM_gizmo_set_matrix_rotation_from_yz_axis (wmGizmo *gz, const float y_axis[3], const float z_axis[3])
void blender::WM_gizmo_set_matrix_offset_location (wmGizmo *gz, const float offset[3])
void blender::WM_gizmo_set_matrix_offset_rotation_from_z_axis (wmGizmo *gz, const float z_axis[3])
void blender::WM_gizmo_set_matrix_offset_rotation_from_yz_axis (wmGizmo *gz, const float y_axis[3], const float z_axis[3])
void blender::WM_gizmo_set_flag (wmGizmo *gz, const int flag, const bool enable)
void blender::WM_gizmo_set_scale (wmGizmo *gz, const float scale)
void blender::WM_gizmo_set_line_width (wmGizmo *gz, const float line_width)
void blender::WM_gizmo_get_color (const wmGizmo *gz, float color[4])
void blender::WM_gizmo_set_color (wmGizmo *gz, const float color[4])
void blender::WM_gizmo_get_color_highlight (const wmGizmo *gz, float color_hi[4])
void blender::WM_gizmo_set_color_highlight (wmGizmo *gz, const float color_hi[4])
Gizmo Callback Assignment
void blender::WM_gizmo_set_fn_custom_modal (wmGizmo *gz, wmGizmoFnModal fn)
Gizmo Property Access

Matches WM_operator_properties conventions.

void blender::WM_gizmo_properties_create_ptr (PointerRNA *ptr, wmGizmoType *gzt)
void blender::WM_gizmo_properties_create (PointerRNA *ptr, const StringRef gtstring)
void blender::WM_gizmo_properties_alloc (PointerRNA **ptr, IDProperty **properties, const StringRef gtstring)
void blender::WM_gizmo_properties_sanitize (PointerRNA *ptr, const bool no_context)
bool blender::WM_gizmo_properties_default (PointerRNA *ptr, const bool do_update)
void blender::WM_gizmo_properties_reset (wmGizmo *gz)
void blender::WM_gizmo_properties_clear (PointerRNA *ptr)
void blender::WM_gizmo_properties_free (PointerRNA *ptr)
Gizmo Type Append
Note
This follows conventions from WM_operatortype_find WM_operatortype_append & friends.
const wmGizmoType * blender::WM_gizmotype_find (const StringRef idname, bool quiet)
void blender::WM_gizmotype_append (void(*gtfunc)(wmGizmoType *))
void blender::WM_gizmotype_append_ptr (void(*gtfunc)(wmGizmoType *, void *), void *userdata)
bool blender::WM_gizmotype_remove (bContext *C, Main *bmain, const StringRef idname)
void blender::WM_gizmotype_remove_ptr (bContext *C, Main *bmain, wmGizmoType *gzt)
void blender::WM_gizmotype_free_ptr (wmGizmoType *gzt)
GizmoGroup Type Append
Note
This follows conventions from WM_operatortype_find WM_operatortype_append & friends.
wmGizmoGroupType * blender::WM_gizmogrouptype_find (const StringRef idname, bool quiet)
wmGizmoGroupType * blender::WM_gizmogrouptype_append (void(*wtfunc)(wmGizmoGroupType *))
wmGizmoGroupType * blender::WM_gizmogrouptype_append_ptr (void(*wtfunc)(wmGizmoGroupType *, void *), void *userdata)
wmGizmoGroupTypeRef * blender::WM_gizmogrouptype_append_and_link (wmGizmoMapType *gzmap_type, void(*wtfunc)(wmGizmoGroupType *))
void blender::WM_gizmo_group_type_free_ptr (wmGizmoGroupType *gzgt)
bool blender::WM_gizmo_group_type_free (const StringRef idname)
Updates for Dynamic Type Registration
void blender::WM_gizmoconfig_update_tag_group_type_init (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
void blender::WM_gizmoconfig_update_tag_group_type_remove (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
void blender::WM_gizmoconfig_update (Main *bmain)
void blender::WM_gizmoconfig_update_tag_group_remove (wmGizmoMap *gzmap)
void blender::WM_gizmoconfig_update_tag_reinit_all ()
Property Definition
wmGizmoProperty * blender::WM_gizmo_target_property_find (wmGizmo *gz, const char *idname)
void blender::WM_gizmo_target_property_def_rna_ptr (wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type, PointerRNA *ptr, PropertyRNA *prop, int index)
void blender::WM_gizmo_target_property_def_rna (wmGizmo *gz, const char *idname, PointerRNA *ptr, const char *propname, int index)
void blender::WM_gizmo_target_property_def_func_ptr (wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type, const wmGizmoPropertyFnParams *params)
void blender::WM_gizmo_target_property_def_func (wmGizmo *gz, const char *idname, const wmGizmoPropertyFnParams *params)
void blender::WM_gizmo_target_property_clear_rna_ptr (wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type)
void blender::WM_gizmo_target_property_clear_rna (wmGizmo *gz, const char *idname)
Property Access
bool blender::WM_gizmo_target_property_is_valid_any (const wmGizmo *gz)
bool blender::WM_gizmo_target_property_is_valid (const wmGizmoProperty *gz_prop)
float blender::WM_gizmo_target_property_float_get (const wmGizmo *gz, wmGizmoProperty *gz_prop)
void blender::WM_gizmo_target_property_float_set (bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float value)
void blender::WM_gizmo_target_property_float_get_array (const wmGizmo *gz, wmGizmoProperty *gz_prop, float *value)
void blender::WM_gizmo_target_property_float_set_array (bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float *value)
bool blender::WM_gizmo_target_property_float_range_get (const wmGizmo *gz, wmGizmoProperty *gz_prop, float range[2])
int blender::WM_gizmo_target_property_array_length (const wmGizmo *, wmGizmoProperty *gz_prop)
Property Define
const wmGizmoPropertyType * blender::WM_gizmotype_target_property_find (const wmGizmoType *gzt, const char *idname)
void blender::WM_gizmotype_target_property_def (wmGizmoType *gzt, const char *idname, int data_type, int array_length)
Property Utilities
void blender::WM_gizmo_do_msg_notify_tag_refresh (bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
void blender::WM_gizmo_target_property_subscribe_all (wmGizmo *gz, wmMsgBus *mbus, ARegion *region)
void blender::WM_gizmo_target_property_anim_autokey (bContext *C, const wmGizmo *, wmGizmoProperty *gz_prop)
wmGizmoGroup (Key-map callbacks)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic (const wmGizmoGroupType *, wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic_select (const wmGizmoGroupType *, wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic_drag (const wmGizmoGroupType *, wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmogroup_setup_keymap_generic_maybe_drag (const wmGizmoGroupType *, wmKeyConfig *kc)
wmGizmo (Key-map access)

Key config version so these can be called from wmGizmoGroupFnSetupKeymap.

wmKeyMap * blender::WM_gizmo_keymap_generic_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_select_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_select (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_drag_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_drag (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_press_drag_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_press_drag (wmWindowManager *wm)
wmKeyMap * blender::WM_gizmo_keymap_generic_maybe_drag_with_keyconfig (wmKeyConfig *kc)
wmKeyMap * blender::WM_gizmo_keymap_generic_maybe_drag (wmWindowManager *wm)
wmGizmoGroup
void blender::WM_gizmogroup_ensure_init (const bContext *C, wmGizmoGroup *gzgroup)
int blender::WM_gizmo_cmp_temp_fl (const void *gz_a_ptr, const void *gz_b_ptr)
int blender::WM_gizmo_cmp_temp_fl_reverse (const void *gz_a_ptr, const void *gz_b_ptr)
void blender::WM_gizmo_group_remove_by_tool (bContext *C, Main *bmain, const wmGizmoGroupType *gzgt, const bToolRef *tref)
void blender::WM_gizmo_group_tag_remove (wmGizmoGroup *gzgroup)
wmGizmoMap
wmGizmoMap * blender::WM_gizmomap_new_from_type (const wmGizmoMapType_Params *gzmap_params)
void blender::WM_gizmomap_reinit (wmGizmoMap *gzmap)
const ListBaseT< wmGizmoGroup > * blender::WM_gizmomap_group_list (wmGizmoMap *gzmap)
wmGizmoGroup * blender::WM_gizmomap_group_find (wmGizmoMap *gzmap, const char *idname)
wmGizmoGroup * blender::WM_gizmomap_group_find_ptr (wmGizmoMap *gzmap, const wmGizmoGroupType *gzgt)
eWM_GizmoFlagMapDrawStep blender::WM_gizmomap_drawstep_from_gizmo_group (const wmGizmoGroup *gzgroup)
void blender::WM_gizmomap_tag_refresh_drawstep (wmGizmoMap *gzmap, const eWM_GizmoFlagMapDrawStep drawstep)
void blender::WM_gizmomap_tag_refresh (wmGizmoMap *gzmap)
bool blender::WM_gizmomap_tag_delay_refresh_for_tweak_check (wmGizmoMap *gzmap)
void blender::WM_gizmomap_draw (wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
void blender::WM_gizmomap_add_handlers (ARegion *region, wmGizmoMap *gzmap)
bool blender::WM_gizmomap_select_all (bContext *C, wmGizmoMap *gzmap, const int action)
bool blender::WM_gizmomap_cursor_set (const wmGizmoMap *gzmap, wmWindow *win)
void blender::WM_gizmomap_message_subscribe (const bContext *C, wmGizmoMap *gzmap, ARegion *region, wmMsgBus *mbus)
bool blender::WM_gizmomap_is_any_selected (const wmGizmoMap *gzmap)
wmGizmo * blender::WM_gizmomap_get_modal (const wmGizmoMap *gzmap)
bool blender::WM_gizmomap_minmax (const wmGizmoMap *gzmap, bool, bool use_select, float r_min[3], float r_max[3])
Tooltip Handling
ARegion * blender::WM_gizmomap_tooltip_init (bContext *C, ARegion *region, int *, double *, bool *r_exit_on_event)
wmGizmoMapType
wmGizmoMapType * blender::WM_gizmomaptype_find (const wmGizmoMapType_Params *gzmap_params)
wmGizmoMapType * blender::WM_gizmomaptype_ensure (const wmGizmoMapType_Params *gzmap_params)
wmGizmoGroupType
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_find (wmGizmoMapType *gzmap_type, const StringRef idname)
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_find_ptr (wmGizmoMapType *gzmap_type, const wmGizmoGroupType *gzgt)
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_link (wmGizmoMapType *gzmap_type, const StringRef idname)
wmGizmoGroupTypeRef * blender::WM_gizmomaptype_group_link_ptr (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
void blender::WM_gizmomaptype_group_init_runtime_keymap (const Main *bmain, wmGizmoGroupType *gzgt)
void blender::WM_gizmomaptype_group_init_runtime (const Main *bmain, wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
wmGizmoGroup * blender::WM_gizmomaptype_group_init_runtime_with_region (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt, ARegion *region)
void blender::WM_gizmomaptype_group_unlink (bContext *C, Main *bmain, wmGizmoMapType *gzmap_type, const wmGizmoGroupType *gzgt)
void blender::WM_gizmomaptype_group_free (wmGizmoGroupTypeRef *gzgt_ref)
High Level Add/Remove API

For use directly from operators & RNA registration.

Note
In context of gizmo API these names are a bit misleading, but for general use terms its OK. WM_gizmo_group_type_add would be more correctly called: WM_gizmomaptype_grouptype_reference_link but for general purpose API this is too detailed & annoying.
We may want to return a value if there is nothing to remove.
void blender::WM_gizmo_group_type_add_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_add_ptr (wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_add (const StringRef idname)
bool blender::WM_gizmo_group_type_ensure_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
bool blender::WM_gizmo_group_type_ensure_ptr (wmGizmoGroupType *gzgt)
bool blender::WM_gizmo_group_type_ensure (const StringRef idname)
void blender::WM_gizmo_group_type_remove_ptr_ex (Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_remove_ptr (Main *bmain, wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_remove (Main *bmain, const StringRef idname)
void blender::WM_gizmo_group_type_unlink_delayed_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_unlink_delayed_ptr (wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_unlink_delayed (const StringRef idname)
void blender::WM_gizmo_group_unlink_delayed_ptr_from_space (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type, ScrArea *area)
void blender::WM_gizmo_group_type_reinit_ptr_ex (Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
void blender::WM_gizmo_group_type_reinit_ptr (Main *bmain, wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_type_reinit (Main *bmain, const StringRef idname)
General Utilities
bool blender::WM_gizmo_group_is_modal (const wmGizmoGroup *gzgroup)
bool blender::WM_gizmo_context_check_drawstep (const bContext *C, eWM_GizmoFlagMapDrawStep step)
Gizmo Group Type Callback Wrappers
bool blender::WM_gizmo_group_type_poll (const bContext *C, const wmGizmoGroupType *gzgt)
void blender::WM_gizmo_group_refresh (const bContext *C, wmGizmoGroup *gzgroup)