Blender V4.3
WM_gizmo_api.hh File Reference
#include "wm_gizmo_fn.hh"

Go to the source code of this file.

Classes

struct  WM_GizmoMatrixParams
 

Functions

Gizmo API

API for external use of wmGizmo types.

Only included in WM_api.hh

wmGizmoWM_gizmo_new_ptr (const wmGizmoType *gzt, wmGizmoGroup *gzgroup, PointerRNA *properties)
 
wmGizmoWM_gizmo_new (const char *idname, wmGizmoGroup *gzgroup, PointerRNA *properties)
 
void WM_gizmo_free (wmGizmo *gz)
 
void WM_gizmo_unlink (ListBase *gizmolist, wmGizmoMap *gzmap, wmGizmo *gz, bContext *C)
 
bool WM_gizmo_select_unlink (wmGizmoMap *gzmap, wmGizmo *gz)
 
bool WM_gizmo_select_set (wmGizmoMap *gzmap, wmGizmo *gz, bool select)
 
bool WM_gizmo_highlight_set (wmGizmoMap *gzmap, wmGizmo *gz)
 
void WM_gizmo_modal_set_from_setup (wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, int part_index, const wmEvent *event)
 
void WM_gizmo_modal_set_while_modal (wmGizmoMap *gzmap, bContext *C, wmGizmo *gz, const wmEvent *event)
 
wmGizmoOpElemWM_gizmo_operator_get (wmGizmo *gz, int part_index)
 
PointerRNAWM_gizmo_operator_set (wmGizmo *gz, int part_index, wmOperatorType *ot, IDProperty *properties)
 
int WM_gizmo_operator_invoke (bContext *C, wmGizmo *gz, wmGizmoOpElem *gzop, const wmEvent *event)
 
void WM_gizmo_set_fn_custom_modal (wmGizmo *gz, wmGizmoFnModal fn)
 
void WM_gizmo_set_matrix_location (wmGizmo *gz, const float origin[3])
 
void WM_gizmo_set_matrix_rotation_from_z_axis (wmGizmo *gz, const float z_axis[3])
 
void WM_gizmo_set_matrix_rotation_from_yz_axis (wmGizmo *gz, const float y_axis[3], const float z_axis[3])
 
void WM_gizmo_set_matrix_offset_location (wmGizmo *gz, const float offset[3])
 
void WM_gizmo_set_matrix_offset_rotation_from_z_axis (wmGizmo *gz, const float z_axis[3])
 
void WM_gizmo_set_matrix_offset_rotation_from_yz_axis (wmGizmo *gz, const float y_axis[3], const float z_axis[3])
 
void WM_gizmo_set_flag (wmGizmo *gz, int flag, bool enable)
 
void WM_gizmo_set_scale (wmGizmo *gz, float scale)
 
void WM_gizmo_set_line_width (wmGizmo *gz, float line_width)
 
void WM_gizmo_get_color (const wmGizmo *gz, float color[4])
 
void WM_gizmo_set_color (wmGizmo *gz, const float color[4])
 
void WM_gizmo_get_color_highlight (const wmGizmo *gz, float color_hi[4])
 
void WM_gizmo_set_color_highlight (wmGizmo *gz, const float color_hi[4])
 
void WM_gizmo_calc_matrix_final_params (const wmGizmo *gz, const WM_GizmoMatrixParams *params, float r_mat[4][4])
 
void WM_gizmo_calc_matrix_final_no_offset (const wmGizmo *gz, float r_mat[4][4])
 
void WM_gizmo_calc_matrix_final (const wmGizmo *gz, float r_mat[4][4])
 
void WM_gizmo_properties_create_ptr (PointerRNA *ptr, wmGizmoType *gzt)
 
void WM_gizmo_properties_create (PointerRNA *ptr, const char *gtstring)
 
void WM_gizmo_properties_alloc (PointerRNA **ptr, IDProperty **properties, const char *gtstring)
 
void WM_gizmo_properties_sanitize (PointerRNA *ptr, bool no_context)
 
bool WM_gizmo_properties_default (PointerRNA *ptr, bool do_update)
 
void WM_gizmo_properties_reset (wmGizmo *gz)
 
void WM_gizmo_properties_clear (PointerRNA *ptr)
 
void WM_gizmo_properties_free (PointerRNA *ptr)
 
const wmGizmoTypeWM_gizmotype_find (const char *idname, bool quiet)
 
void WM_gizmotype_append (void(*gtfunc)(wmGizmoType *))
 
void WM_gizmotype_append_ptr (void(*gtfunc)(wmGizmoType *, void *), void *userdata)
 
bool WM_gizmotype_remove (bContext *C, Main *bmain, const char *idname)
 
void WM_gizmotype_remove_ptr (bContext *C, Main *bmain, wmGizmoType *gzt)
 
void WM_gizmotype_free_ptr (wmGizmoType *gzt)
 
void WM_gizmotype_iter (GHashIterator *ghi)
 
wmGizmoGroupTypeWM_gizmogrouptype_find (const char *idname, bool quiet)
 
wmGizmoGroupTypeWM_gizmogrouptype_append (void(*wtfunc)(wmGizmoGroupType *))
 
wmGizmoGroupTypeWM_gizmogrouptype_append_ptr (void(*wtfunc)(wmGizmoGroupType *, void *), void *userdata)
 
void WM_gizmogrouptype_iter (GHashIterator *ghi)
 
wmGizmoGroupTypeRefWM_gizmogrouptype_append_and_link (wmGizmoMapType *gzmap_type, void(*wtfunc)(wmGizmoGroupType *))
 
void WM_gizmoconfig_update_tag_group_type_init (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
 
void WM_gizmoconfig_update_tag_group_type_remove (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
 
void WM_gizmoconfig_update (Main *bmain)
 
void WM_gizmoconfig_update_tag_group_remove (wmGizmoMap *gzmap)
 
void WM_gizmoconfig_update_tag_reinit_all ()
 
wmGizmoPropertyWM_gizmo_target_property_array (wmGizmo *gz)
 
wmGizmoPropertyWM_gizmo_target_property_at_index (wmGizmo *gz, int index)
 
wmGizmoPropertyWM_gizmo_target_property_find (wmGizmo *gz, const char *idname)
 
void WM_gizmo_target_property_def_rna_ptr (wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type, PointerRNA *ptr, PropertyRNA *prop, int index)
 
void WM_gizmo_target_property_def_rna (wmGizmo *gz, const char *idname, PointerRNA *ptr, const char *propname, int index)
 
void WM_gizmo_target_property_def_func_ptr (wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type, const wmGizmoPropertyFnParams *params)
 
void WM_gizmo_target_property_def_func (wmGizmo *gz, const char *idname, const wmGizmoPropertyFnParams *params)
 
void WM_gizmo_target_property_clear_rna_ptr (wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type)
 
void WM_gizmo_target_property_clear_rna (wmGizmo *gz, const char *idname)
 
bool WM_gizmo_target_property_is_valid_any (wmGizmo *gz)
 
bool WM_gizmo_target_property_is_valid (const wmGizmoProperty *gz_prop)
 
float WM_gizmo_target_property_float_get (const wmGizmo *gz, wmGizmoProperty *gz_prop)
 
void WM_gizmo_target_property_float_set (bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, float value)
 
void WM_gizmo_target_property_float_get_array (const wmGizmo *gz, wmGizmoProperty *gz_prop, float *value)
 
void WM_gizmo_target_property_float_set_array (bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop, const float *value)
 
bool WM_gizmo_target_property_float_range_get (const wmGizmo *gz, wmGizmoProperty *gz_prop, float range[2])
 
int WM_gizmo_target_property_array_length (const wmGizmo *gz, wmGizmoProperty *gz_prop)
 
const wmGizmoPropertyTypeWM_gizmotype_target_property_find (const wmGizmoType *gzt, const char *idname)
 
void WM_gizmotype_target_property_def (wmGizmoType *gzt, const char *idname, int data_type, int array_length)
 
void WM_gizmo_do_msg_notify_tag_refresh (bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
 
void WM_gizmo_target_property_subscribe_all (wmGizmo *gz, wmMsgBus *mbus, ARegion *region)
 
void WM_gizmo_target_property_anim_autokey (bContext *C, const wmGizmo *gz, wmGizmoProperty *gz_prop)
 
wmKeyMapWM_gizmogroup_setup_keymap_generic (const wmGizmoGroupType *gzgt, wmKeyConfig *kc)
 
wmKeyMapWM_gizmogroup_setup_keymap_generic_select (const wmGizmoGroupType *gzgt, wmKeyConfig *kc)
 
wmKeyMapWM_gizmogroup_setup_keymap_generic_drag (const wmGizmoGroupType *gzgt, wmKeyConfig *kc)
 
wmKeyMapWM_gizmogroup_setup_keymap_generic_maybe_drag (const wmGizmoGroupType *gzgt, wmKeyConfig *kc)
 
wmKeyMapWM_gizmo_keymap_generic_with_keyconfig (wmKeyConfig *kc)
 
wmKeyMapWM_gizmo_keymap_generic (wmWindowManager *wm)
 
wmKeyMapWM_gizmo_keymap_generic_select_with_keyconfig (wmKeyConfig *kc)
 
wmKeyMapWM_gizmo_keymap_generic_select (wmWindowManager *wm)
 
wmKeyMapWM_gizmo_keymap_generic_drag_with_keyconfig (wmKeyConfig *kc)
 
wmKeyMapWM_gizmo_keymap_generic_drag (wmWindowManager *wm)
 
wmKeyMapWM_gizmo_keymap_generic_click_drag_with_keyconfig (wmKeyConfig *kc)
 
wmKeyMapWM_gizmo_keymap_generic_click_drag (wmWindowManager *wm)
 
wmKeyMapWM_gizmo_keymap_generic_maybe_drag_with_keyconfig (wmKeyConfig *kc)
 
wmKeyMapWM_gizmo_keymap_generic_maybe_drag (wmWindowManager *wm)
 
void WM_gizmogroup_ensure_init (const bContext *C, wmGizmoGroup *gzgroup)
 
int WM_gizmo_cmp_temp_fl (const void *gz_a_ptr, const void *gz_b_ptr)
 
int WM_gizmo_cmp_temp_fl_reverse (const void *gz_a_ptr, const void *gz_b_ptr)
 
wmGizmoMapWM_gizmomap_new_from_type (const wmGizmoMapType_Params *gzmap_params)
 
void WM_gizmomap_reinit (wmGizmoMap *gzmap)
 
const ListBaseWM_gizmomap_group_list (wmGizmoMap *gzmap)
 
wmGizmoGroupWM_gizmomap_group_find (wmGizmoMap *gzmap, const char *idname)
 
wmGizmoGroupWM_gizmomap_group_find_ptr (wmGizmoMap *gzmap, const wmGizmoGroupType *gzgt)
 
eWM_GizmoFlagMapDrawStep WM_gizmomap_drawstep_from_gizmo_group (const wmGizmoGroup *gzgroup)
 
void WM_gizmomap_tag_refresh_drawstep (wmGizmoMap *gzmap, eWM_GizmoFlagMapDrawStep drawstep)
 
void WM_gizmomap_tag_refresh (wmGizmoMap *gzmap)
 
bool WM_gizmomap_tag_delay_refresh_for_tweak_check (wmGizmoMap *gzmap)
 
void WM_gizmomap_draw (wmGizmoMap *gzmap, const bContext *C, eWM_GizmoFlagMapDrawStep drawstep)
 
void WM_gizmomap_add_handlers (ARegion *region, wmGizmoMap *gzmap)
 
bool WM_gizmomap_select_all (bContext *C, wmGizmoMap *gzmap, int action)
 
bool WM_gizmomap_cursor_set (const wmGizmoMap *gzmap, wmWindow *win)
 
void WM_gizmomap_message_subscribe (const bContext *C, wmGizmoMap *gzmap, ARegion *region, wmMsgBus *mbus)
 
bool WM_gizmomap_is_any_selected (const wmGizmoMap *gzmap)
 
wmGizmoWM_gizmomap_get_modal (const wmGizmoMap *gzmap)
 
bool WM_gizmomap_minmax (const wmGizmoMap *gzmap, bool use_hidden, bool use_select, float r_min[3], float r_max[3])
 
ARegionWM_gizmomap_tooltip_init (bContext *C, ARegion *region, int *pass, double *pass_delay, bool *r_exit_on_event)
 
wmGizmoMapTypeWM_gizmomaptype_find (const wmGizmoMapType_Params *gzmap_params)
 
wmGizmoMapTypeWM_gizmomaptype_ensure (const wmGizmoMapType_Params *gzmap_params)
 
wmGizmoGroupTypeRefWM_gizmomaptype_group_find (wmGizmoMapType *gzmap_type, const char *idname)
 
wmGizmoGroupTypeRefWM_gizmomaptype_group_find_ptr (wmGizmoMapType *gzmap_type, const wmGizmoGroupType *gzgt)
 
wmGizmoGroupTypeRefWM_gizmomaptype_group_link (wmGizmoMapType *gzmap_type, const char *idname)
 
wmGizmoGroupTypeRefWM_gizmomaptype_group_link_ptr (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
 
void WM_gizmomaptype_group_init_runtime_keymap (const Main *bmain, wmGizmoGroupType *gzgt)
 
void WM_gizmomaptype_group_init_runtime (const Main *bmain, wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt)
 
wmGizmoGroupWM_gizmomaptype_group_init_runtime_with_region (wmGizmoMapType *gzmap_type, wmGizmoGroupType *gzgt, ARegion *region)
 
void WM_gizmomaptype_group_unlink (bContext *C, Main *bmain, wmGizmoMapType *gzmap_type, const wmGizmoGroupType *gzgt)
 
void WM_gizmomaptype_group_free (wmGizmoGroupTypeRef *gzgt_ref)
 
void WM_gizmo_group_type_add_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
 
void WM_gizmo_group_type_add_ptr (wmGizmoGroupType *gzgt)
 
void WM_gizmo_group_type_add (const char *idname)
 
bool WM_gizmo_group_type_ensure_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
 
bool WM_gizmo_group_type_ensure_ptr (wmGizmoGroupType *gzgt)
 
bool WM_gizmo_group_type_ensure (const char *idname)
 
void WM_gizmo_group_type_remove_ptr_ex (Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
 
void WM_gizmo_group_type_remove_ptr (Main *bmain, wmGizmoGroupType *gzgt)
 
void WM_gizmo_group_type_remove (Main *bmain, const char *idname)
 
void WM_gizmo_group_type_unlink_delayed_ptr_ex (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
 
void WM_gizmo_group_type_unlink_delayed_ptr (wmGizmoGroupType *gzgt)
 
void WM_gizmo_group_type_unlink_delayed (const char *idname)
 
void WM_gizmo_group_unlink_delayed_ptr_from_space (wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type, ScrArea *area)
 
void WM_gizmo_group_type_free_ptr (wmGizmoGroupType *gzgt)
 
bool WM_gizmo_group_type_free (const char *idname)
 
void WM_gizmo_group_type_reinit_ptr_ex (Main *bmain, wmGizmoGroupType *gzgt, wmGizmoMapType *gzmap_type)
 
void WM_gizmo_group_type_reinit_ptr (Main *bmain, wmGizmoGroupType *gzgt)
 
void WM_gizmo_group_type_reinit (Main *bmain, const char *idname)
 
bool WM_gizmo_context_check_drawstep (const bContext *C, eWM_GizmoFlagMapDrawStep step)
 
void WM_gizmo_group_remove_by_tool (bContext *C, Main *bmain, const wmGizmoGroupType *gzgt, const bToolRef *tref)
 
void WM_gizmo_group_tag_remove (wmGizmoGroup *gzgroup)
 
bool WM_gizmo_group_type_poll (const bContext *C, const wmGizmoGroupType *gzgt)
 
void WM_gizmo_group_refresh (const bContext *C, wmGizmoGroup *gzgroup)
 

Function Documentation

◆ WM_gizmo_calc_matrix_final()

◆ WM_gizmo_calc_matrix_final_no_offset()

void WM_gizmo_calc_matrix_final_no_offset ( const wmGizmo * gz,
float r_mat[4][4] )

◆ WM_gizmo_calc_matrix_final_params()

◆ WM_gizmo_cmp_temp_fl()

int WM_gizmo_cmp_temp_fl ( const void * gz_a_ptr,
const void * gz_b_ptr )

Definition at line 137 of file wm_gizmo_group.cc.

References wmGizmo::f, and wmGizmo::temp.

◆ WM_gizmo_cmp_temp_fl_reverse()

int WM_gizmo_cmp_temp_fl_reverse ( const void * gz_a_ptr,
const void * gz_b_ptr )

◆ WM_gizmo_context_check_drawstep()

bool WM_gizmo_context_check_drawstep ( const bContext * C,
eWM_GizmoFlagMapDrawStep step )

◆ WM_gizmo_do_msg_notify_tag_refresh()

◆ WM_gizmo_free()

void WM_gizmo_free ( wmGizmo * gz)
Warning
this doesn't check wmGizmoMap (highlight, selection etc). Typical use is when freeing the windowing data, where caller can manage clearing selection, highlight... etc.

Definition at line 126 of file wm_gizmo.cc.

References BPY_DECREF_RNA_INVALIDATE(), wmGizmoProperty::custom_func, wmGizmoType::free, wmGizmoProperty::free_fn, MEM_freeN(), wmGizmo::op_data, wmGizmo::ptr, wmGizmo::py_instance, wmGizmoType::target_property_defs_len, wmGizmo::type, WM_gizmo_properties_free(), WM_gizmo_target_property_array(), and WM_operator_properties_free().

Referenced by WM_gizmo_unlink(), and wm_gizmogroup_free().

◆ WM_gizmo_get_color()

void WM_gizmo_get_color ( const wmGizmo * gz,
float color[4] )

Definition at line 323 of file wm_gizmo.cc.

References wmGizmo::color, and copy_v4_v4().

◆ WM_gizmo_get_color_highlight()

void WM_gizmo_get_color_highlight ( const wmGizmo * gz,
float color_hi[4] )

Definition at line 332 of file wm_gizmo.cc.

References wmGizmo::color_hi, and copy_v4_v4().

◆ WM_gizmo_group_refresh()

◆ WM_gizmo_group_remove_by_tool()

◆ WM_gizmo_group_tag_remove()

◆ WM_gizmo_group_type_add()

void WM_gizmo_group_type_add ( const char * idname)

◆ WM_gizmo_group_type_add_ptr()

void WM_gizmo_group_type_add_ptr ( wmGizmoGroupType * gzgt)

◆ WM_gizmo_group_type_add_ptr_ex()

◆ WM_gizmo_group_type_ensure()

bool WM_gizmo_group_type_ensure ( const char * idname)

◆ WM_gizmo_group_type_ensure_ptr()

◆ WM_gizmo_group_type_ensure_ptr_ex()

bool WM_gizmo_group_type_ensure_ptr_ex ( wmGizmoGroupType * gzgt,
wmGizmoMapType * gzmap_type )

◆ WM_gizmo_group_type_free()

bool WM_gizmo_group_type_free ( const char * idname)

◆ WM_gizmo_group_type_free_ptr()

◆ WM_gizmo_group_type_poll()

◆ WM_gizmo_group_type_reinit()

void WM_gizmo_group_type_reinit ( Main * bmain,
const char * idname )

◆ WM_gizmo_group_type_reinit_ptr()

◆ WM_gizmo_group_type_reinit_ptr_ex()

void WM_gizmo_group_type_reinit_ptr_ex ( Main * bmain,
wmGizmoGroupType * gzgt,
wmGizmoMapType * gzmap_type )

Has the result of unlinking and linking (re-initializes gizmo's).

Definition at line 1168 of file wm_gizmo_group.cc.

References BLI_assert, UNUSED_VARS_NDEBUG, WM_gizmo_group_type_add_ptr_ex(), WM_gizmomaptype_group_find_ptr(), and WM_gizmomaptype_group_unlink().

Referenced by WM_gizmo_group_type_reinit_ptr().

◆ WM_gizmo_group_type_remove()

void WM_gizmo_group_type_remove ( Main * bmain,
const char * idname )

◆ WM_gizmo_group_type_remove_ptr()

void WM_gizmo_group_type_remove_ptr ( Main * bmain,
wmGizmoGroupType * gzgt )

◆ WM_gizmo_group_type_remove_ptr_ex()

void WM_gizmo_group_type_remove_ptr_ex ( Main * bmain,
wmGizmoGroupType * gzgt,
wmGizmoMapType * gzmap_type )

Call WM_gizmo_group_type_free_ptr after to remove & free.

Definition at line 1150 of file wm_gizmo_group.cc.

References WM_gizmomaptype_group_unlink().

Referenced by WM_gizmo_group_type_remove_ptr().

◆ WM_gizmo_group_type_unlink_delayed()

void WM_gizmo_group_type_unlink_delayed ( const char * idname)

◆ WM_gizmo_group_type_unlink_delayed_ptr()

◆ WM_gizmo_group_type_unlink_delayed_ptr_ex()

void WM_gizmo_group_type_unlink_delayed_ptr_ex ( wmGizmoGroupType * gzgt,
wmGizmoMapType * gzmap_type )

◆ WM_gizmo_group_unlink_delayed_ptr_from_space()

void WM_gizmo_group_unlink_delayed_ptr_from_space ( wmGizmoGroupType * gzgt,
wmGizmoMapType * gzmap_type,
ScrArea * area )

◆ WM_gizmo_highlight_set()

◆ WM_gizmo_keymap_generic()

wmKeyMap * WM_gizmo_keymap_generic ( wmWindowManager * wm)

◆ WM_gizmo_keymap_generic_click_drag()

wmKeyMap * WM_gizmo_keymap_generic_click_drag ( wmWindowManager * wm)

◆ WM_gizmo_keymap_generic_click_drag_with_keyconfig()

wmKeyMap * WM_gizmo_keymap_generic_click_drag_with_keyconfig ( wmKeyConfig * kc)

Definition at line 904 of file wm_gizmo_group.cc.

References RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().

Referenced by WM_gizmo_keymap_generic_click_drag().

◆ WM_gizmo_keymap_generic_drag()

wmKeyMap * WM_gizmo_keymap_generic_drag ( wmWindowManager * wm)

◆ WM_gizmo_keymap_generic_drag_with_keyconfig()

wmKeyMap * WM_gizmo_keymap_generic_drag_with_keyconfig ( wmKeyConfig * kc)

◆ WM_gizmo_keymap_generic_maybe_drag()

wmKeyMap * WM_gizmo_keymap_generic_maybe_drag ( wmWindowManager * wm)

◆ WM_gizmo_keymap_generic_maybe_drag_with_keyconfig()

wmKeyMap * WM_gizmo_keymap_generic_maybe_drag_with_keyconfig ( wmKeyConfig * kc)

Drag or press depending on preference.

Definition at line 914 of file wm_gizmo_group.cc.

References RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().

Referenced by WM_gizmo_keymap_generic_maybe_drag(), and WM_gizmogroup_setup_keymap_generic_maybe_drag().

◆ WM_gizmo_keymap_generic_select()

wmKeyMap * WM_gizmo_keymap_generic_select ( wmWindowManager * wm)

◆ WM_gizmo_keymap_generic_select_with_keyconfig()

wmKeyMap * WM_gizmo_keymap_generic_select_with_keyconfig ( wmKeyConfig * kc)

Definition at line 884 of file wm_gizmo_group.cc.

References RGN_TYPE_WINDOW, SPACE_EMPTY, and WM_keymap_ensure().

Referenced by WM_gizmo_keymap_generic_select().

◆ WM_gizmo_keymap_generic_with_keyconfig()

wmKeyMap * WM_gizmo_keymap_generic_with_keyconfig ( wmKeyConfig * kc)

◆ WM_gizmo_modal_set_from_setup()

void WM_gizmo_modal_set_from_setup ( wmGizmoMap * gzmap,
bContext * C,
wmGizmo * gz,
int part_index,
const wmEvent * event )

Special function to run from setup so gizmos start out interactive.

We could do this when linking them, but this complicates things since the window update code needs to run first.

Definition at line 415 of file wm_gizmo.cc.

References wmGizmo::highlight_part, WM_gizmo_highlight_set(), wm_gizmomap_modal_set(), WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().

Referenced by gizmo_mesh_placement_modal_from_setup(), and gizmo_mesh_spin_redo_modal_from_setup().

◆ WM_gizmo_modal_set_while_modal()

void WM_gizmo_modal_set_while_modal ( wmGizmoMap * gzmap,
bContext * C,
wmGizmo * gz,
const wmEvent * event )

Replaces the current gizmo modal. The substitute gizmo start out interactive. It is similar to WM_gizmo_modal_set_from_setup but without operator initialization.

Definition at line 429 of file wm_gizmo.cc.

References wmGizmoMap::gzmap_context, wmGizmo::highlight_part, wmGizmoMap::modal, wm_gizmo_calculate_scale(), and wm_gizmomap_modal_set().

Referenced by transform_gizmo_3d_model_from_constraint_and_mode_set(), and transform_mode_snap_source_init().

◆ WM_gizmo_new()

◆ WM_gizmo_new_ptr()

◆ WM_gizmo_operator_get()

◆ WM_gizmo_operator_invoke()

◆ WM_gizmo_operator_set()

◆ WM_gizmo_properties_alloc()

void WM_gizmo_properties_alloc ( PointerRNA ** ptr,
IDProperty ** properties,
const char * gtstring )

Similar to WM_gizmo_properties_create except its uses ID properties used for key-maps and macros.

Definition at line 603 of file wm_gizmo.cc.

References blender::bke::idprop::create_group(), ptr, and WM_gizmo_properties_create().

◆ WM_gizmo_properties_clear()

void WM_gizmo_properties_clear ( PointerRNA * ptr)

Definition at line 691 of file wm_gizmo.cc.

References PointerRNA::data, IDP_ClearProperty(), and ptr.

◆ WM_gizmo_properties_create()

void WM_gizmo_properties_create ( PointerRNA * ptr,
const char * gtstring )

◆ WM_gizmo_properties_create_ptr()

void WM_gizmo_properties_create_ptr ( PointerRNA * ptr,
wmGizmoType * gzt )

Definition at line 586 of file wm_gizmo.cc.

References ptr, RNA_pointer_create(), and wmGizmoType::srna.

Referenced by WM_gizmo_properties_create().

◆ WM_gizmo_properties_default()

bool WM_gizmo_properties_default ( PointerRNA * ptr,
bool do_update )

Set all props to their default.

Parameters
do_updateOnly update un-initialized props.
Note
There's nothing specific to gizmos here. This could be made a general function.

Definition at line 646 of file wm_gizmo.cc.

References PROP_POINTER, ptr, RNA_property_is_set(), RNA_property_pointer_get(), RNA_property_pointer_type(), RNA_property_reset(), RNA_property_type(), RNA_STRUCT_BEGIN, RNA_STRUCT_END, and WM_gizmo_properties_default().

Referenced by WM_gizmo_properties_default().

◆ WM_gizmo_properties_free()

void WM_gizmo_properties_free ( PointerRNA * ptr)

Definition at line 700 of file wm_gizmo.cc.

References PointerRNA::data, IDP_FreeProperty(), and ptr.

Referenced by WM_gizmo_free().

◆ WM_gizmo_properties_reset()

◆ WM_gizmo_properties_sanitize()

◆ WM_gizmo_select_set()

bool WM_gizmo_select_set ( wmGizmoMap * gzmap,
wmGizmo * gz,
bool select )

◆ WM_gizmo_select_unlink()

bool WM_gizmo_select_unlink ( wmGizmoMap * gzmap,
wmGizmo * gz )

Remove from selection array without running callbacks.

Definition at line 391 of file wm_gizmo.cc.

References wm_gizmo_select_set_ex().

Referenced by WM_gizmo_unlink(), and wm_gizmogroup_free().

◆ WM_gizmo_set_color()

◆ WM_gizmo_set_color_highlight()

void WM_gizmo_set_color_highlight ( wmGizmo * gz,
const float color_hi[4] )

◆ WM_gizmo_set_flag()

void WM_gizmo_set_flag ( wmGizmo * gz,
int flag,
bool enable )

Definition at line 303 of file wm_gizmo.cc.

References flag, and wmGizmo::flag.

Referenced by gizmo_3d_draw_invoke(), gizmo_3d_setup_draw_default(), gizmo_3d_setup_draw_from_twtype(), gizmo_3d_setup_draw_modal(), gizmo_mesh_bisect_setup(), gizmo_mesh_extrude_refresh(), gizmo_mesh_placement_setup(), gizmo_mesh_spin_init_draw_prepare(), gizmo_mesh_spin_init_refresh(), gizmo_mesh_spin_init_setup(), gizmo_mesh_spin_redo_setup(), gizmogroup_hide_all(), blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::hide_all(), ruler_item_add(), ruler_state_set(), blender::ed::view3d::geometry_nodes_gizmos::NodeGizmos::show_all(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_style(), blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_style(), blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_translate_style(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_visibility(), WIDGETGROUP_armature_spline_setup(), WIDGETGROUP_camera_refresh(), WIDGETGROUP_camera_setup(), WIDGETGROUP_camera_view_refresh(), WIDGETGROUP_empty_image_setup(), WIDGETGROUP_forcefield_refresh(), WIDGETGROUP_forcefield_setup(), blender::ed::view3d::geometry_nodes_gizmos::WIDGETGROUP_geometry_nodes_refresh(), WIDGETGROUP_gizmo_draw_prepare(), WIDGETGROUP_light_area_setup(), WIDGETGROUP_light_point_setup(), WIDGETGROUP_light_spot_setup(), WIDGETGROUP_light_target_draw_prepare(), WIDGETGROUP_navigate_draw_prepare(), WIDGETGROUP_navigate_draw_prepare(), blender::ed::space_node::WIDGETGROUP_node_corner_pin_refresh(), blender::ed::space_node::WIDGETGROUP_node_crop_refresh(), blender::ed::space_node::WIDGETGROUP_node_sbeam_refresh(), blender::ed::space_node::WIDGETGROUP_node_transform_refresh(), WIDGETGROUP_tool_generic_refresh(), WIDGETGROUP_xform_cage_refresh(), WIDGETGROUP_xform_shear_refresh(), and WIDGETGROUP_xform_shear_setup().

◆ WM_gizmo_set_fn_custom_modal()

void WM_gizmo_set_fn_custom_modal ( wmGizmo * gz,
wmGizmoFnModal fn )

◆ WM_gizmo_set_line_width()

◆ WM_gizmo_set_matrix_location()

◆ WM_gizmo_set_matrix_offset_location()

void WM_gizmo_set_matrix_offset_location ( wmGizmo * gz,
const float offset[3] )

◆ WM_gizmo_set_matrix_offset_rotation_from_yz_axis()

void WM_gizmo_set_matrix_offset_rotation_from_yz_axis ( wmGizmo * gz,
const float y_axis[3],
const float z_axis[3] )

wmGizmo.matrix_offset utility, set the orientation by its Y/Z axis.

Definition at line 292 of file wm_gizmo.cc.

References wmGizmo::matrix_offset, and wm_gizmo_set_matrix_rotation_from_yz_axis__internal().

◆ WM_gizmo_set_matrix_offset_rotation_from_z_axis()

void WM_gizmo_set_matrix_offset_rotation_from_z_axis ( wmGizmo * gz,
const float z_axis[3] )

wmGizmo.matrix_offset utility, set the orientation by its Z axis.

Definition at line 288 of file wm_gizmo.cc.

References wmGizmo::matrix_offset, and wm_gizmo_set_matrix_rotation_from_z_axis__internal().

◆ WM_gizmo_set_matrix_rotation_from_yz_axis()

void WM_gizmo_set_matrix_rotation_from_yz_axis ( wmGizmo * gz,
const float y_axis[3],
const float z_axis[3] )

◆ WM_gizmo_set_matrix_rotation_from_z_axis()

◆ WM_gizmo_set_scale()

◆ WM_gizmo_target_property_anim_autokey()

void WM_gizmo_target_property_anim_autokey ( bContext * C,
const wmGizmo * gz,
wmGizmoProperty * gz_prop )

◆ WM_gizmo_target_property_array()

◆ WM_gizmo_target_property_array_length()

◆ WM_gizmo_target_property_at_index()

◆ WM_gizmo_target_property_clear_rna()

void WM_gizmo_target_property_clear_rna ( wmGizmo * gz,
const char * idname )

◆ WM_gizmo_target_property_clear_rna_ptr()

◆ WM_gizmo_target_property_def_func()

◆ WM_gizmo_target_property_def_func_ptr()

◆ WM_gizmo_target_property_def_rna()

◆ WM_gizmo_target_property_def_rna_ptr()

◆ WM_gizmo_target_property_find()

◆ WM_gizmo_target_property_float_get()

◆ WM_gizmo_target_property_float_get_array()

◆ WM_gizmo_target_property_float_range_get()

◆ WM_gizmo_target_property_float_set()

◆ WM_gizmo_target_property_float_set_array()

◆ WM_gizmo_target_property_is_valid()

◆ WM_gizmo_target_property_is_valid_any()

bool WM_gizmo_target_property_is_valid_any ( wmGizmo * gz)

◆ WM_gizmo_target_property_subscribe_all()

◆ WM_gizmo_unlink()

◆ WM_gizmoconfig_update()

◆ WM_gizmoconfig_update_tag_group_remove()

void WM_gizmoconfig_update_tag_group_remove ( wmGizmoMap * gzmap)

◆ WM_gizmoconfig_update_tag_group_type_init()

◆ WM_gizmoconfig_update_tag_group_type_remove()

◆ WM_gizmoconfig_update_tag_reinit_all()

void WM_gizmoconfig_update_tag_reinit_all ( )

Definition at line 1333 of file wm_gizmo_map.cc.

References WM_GIZMOTYPE_GLOBAL_REINIT_ALL, and wm_gzmap_type_update_flag.

Referenced by WM_script_tag_reload().

◆ WM_gizmogroup_ensure_init()

◆ WM_gizmogroup_setup_keymap_generic()

wmKeyMap * WM_gizmogroup_setup_keymap_generic ( const wmGizmoGroupType * gzgt,
wmKeyConfig * kc )

◆ WM_gizmogroup_setup_keymap_generic_drag()

wmKeyMap * WM_gizmogroup_setup_keymap_generic_drag ( const wmGizmoGroupType * gzgt,
wmKeyConfig * kc )

Definition at line 770 of file wm_gizmo_group.cc.

References WM_gizmo_keymap_generic_drag_with_keyconfig().

◆ WM_gizmogroup_setup_keymap_generic_maybe_drag()

◆ WM_gizmogroup_setup_keymap_generic_select()

wmKeyMap * WM_gizmogroup_setup_keymap_generic_select ( const wmGizmoGroupType * gzgt,
wmKeyConfig * kc )

◆ WM_gizmogrouptype_append()

◆ WM_gizmogrouptype_append_and_link()

wmGizmoGroupTypeRef * WM_gizmogrouptype_append_and_link ( wmGizmoMapType * gzmap_type,
void(* wtfunc )(wmGizmoGroupType *) )

◆ WM_gizmogrouptype_append_ptr()

wmGizmoGroupType * WM_gizmogrouptype_append_ptr ( void(* wtfunc )(wmGizmoGroupType *, void *),
void * userdata )

◆ WM_gizmogrouptype_find()

◆ WM_gizmogrouptype_iter()

void WM_gizmogrouptype_iter ( GHashIterator * ghi)

Caller must free.

Definition at line 57 of file wm_gizmo_group_type.cc.

References BLI_ghashIterator_init(), and global_gizmogrouptype_hash.

◆ WM_gizmomap_add_handlers()

◆ WM_gizmomap_cursor_set()

bool WM_gizmomap_cursor_set ( const wmGizmoMap * gzmap,
wmWindow * win )

◆ WM_gizmomap_draw()

◆ WM_gizmomap_drawstep_from_gizmo_group()

◆ WM_gizmomap_get_modal()

◆ WM_gizmomap_group_find()

◆ WM_gizmomap_group_find_ptr()

wmGizmoGroup * WM_gizmomap_group_find_ptr ( wmGizmoMap * gzmap,
const wmGizmoGroupType * gzgt )

◆ WM_gizmomap_group_list()

const ListBase * WM_gizmomap_group_list ( wmGizmoMap * gzmap)

◆ WM_gizmomap_is_any_selected()

bool WM_gizmomap_is_any_selected ( const wmGizmoMap * gzmap)

◆ WM_gizmomap_message_subscribe()

void WM_gizmomap_message_subscribe ( const bContext * C,
wmGizmoMap * gzmap,
ARegion * region,
wmMsgBus * mbus )

◆ WM_gizmomap_minmax()

bool WM_gizmomap_minmax ( const wmGizmoMap * gzmap,
bool use_hidden,
bool use_select,
float r_min[3],
float r_max[3] )
Note
We could use a callback to define bounds, for now just use matrix location.

Definition at line 253 of file wm_gizmo_map.cc.

References BLI_assert_msg, wmGizmoMap::gzmap_context, wmGizmoMapSelectState::items, wmGizmoMapSelectState::len, wmGizmo::matrix_basis, minmax_v3v3_v3(), and wmGizmoMap::select.

Referenced by viewselected_exec().

◆ WM_gizmomap_new_from_type()

wmGizmoMap * WM_gizmomap_new_from_type ( const wmGizmoMapType_Params * gzmap_params)

Creates a gizmo-map with all registered gizmos for that type

Definition at line 181 of file wm_gizmo_map.cc.

References MEM_callocN, wm_gizmomap_new_from_type_ex(), and WM_gizmomaptype_ensure().

Referenced by ed_default_handlers().

◆ WM_gizmomap_reinit()

void WM_gizmomap_reinit ( wmGizmoMap * gzmap)

Re-create the gizmos (use when changing theme settings).

Definition at line 211 of file wm_gizmo_map.cc.

References wmGizmoMap::type, wm_gizmomap_free_data(), and wm_gizmomap_new_from_type_ex().

Referenced by WM_reinit_gizmomap_all().

◆ WM_gizmomap_select_all()

bool WM_gizmomap_select_all ( bContext * C,
wmGizmoMap * gzmap,
int action )

Select/Deselect all selectable gizmos in gzmap.

Returns
if selection has changed.

TODO: select all by type.

Definition at line 931 of file wm_gizmo_map.cc.

References BLI_assert_unreachable, CTX_wm_window(), SEL_DESELECT, SEL_SELECT, WM_event_add_mousemove(), wm_gizmomap_deselect_all(), and wm_gizmomap_select_all_intern().

◆ WM_gizmomap_tag_delay_refresh_for_tweak_check()

bool WM_gizmomap_tag_delay_refresh_for_tweak_check ( wmGizmoMap * gzmap)

◆ WM_gizmomap_tag_refresh()

◆ WM_gizmomap_tag_refresh_drawstep()

void WM_gizmomap_tag_refresh_drawstep ( wmGizmoMap * gzmap,
eWM_GizmoFlagMapDrawStep drawstep )

◆ WM_gizmomap_tooltip_init()

ARegion * WM_gizmomap_tooltip_init ( bContext * C,
ARegion * region,
int * pass,
double * pass_delay,
bool * r_exit_on_event )

◆ WM_gizmomaptype_ensure()

◆ WM_gizmomaptype_find()

◆ WM_gizmomaptype_group_find()

wmGizmoGroupTypeRef * WM_gizmomaptype_group_find ( wmGizmoMapType * gzmap_type,
const char * idname )

Definition at line 942 of file wm_gizmo_group.cc.

References wmGizmoMapType::grouptype_refs, LISTBASE_FOREACH, and STREQ.

◆ WM_gizmomaptype_group_find_ptr()

◆ WM_gizmomaptype_group_free()

void WM_gizmomaptype_group_free ( wmGizmoGroupTypeRef * gzgt_ref)

Unlike WM_gizmomaptype_group_unlink this doesn't maintain correct state, simply free.

Definition at line 1030 of file wm_gizmo_group.cc.

References MEM_freeN().

Referenced by WM_gizmomaptype_group_unlink(), and wm_gizmomaptypes_free().

◆ WM_gizmomaptype_group_init_runtime()

void WM_gizmomaptype_group_init_runtime ( const Main * bmain,
wmGizmoMapType * gzmap_type,
wmGizmoGroupType * gzgt )

◆ WM_gizmomaptype_group_init_runtime_keymap()

void WM_gizmomaptype_group_init_runtime_keymap ( const Main * bmain,
wmGizmoGroupType * gzgt )

Definition at line 970 of file wm_gizmo_group.cc.

References ListBase::first, Main::wm, and wm_gizmogrouptype_setup_keymap().

Referenced by WM_gizmoconfig_update().

◆ WM_gizmomaptype_group_init_runtime_with_region()

◆ WM_gizmomaptype_group_link()

wmGizmoGroupTypeRef * WM_gizmomaptype_group_link ( wmGizmoMapType * gzmap_type,
const char * idname )

Use this for registering gizmos on startup. For runtime, use #WM_gizmomaptype_group_link_runtime.

Definition at line 953 of file wm_gizmo_group.cc.

References BLI_assert, WM_gizmogrouptype_find(), and WM_gizmomaptype_group_link_ptr().

◆ WM_gizmomaptype_group_link_ptr()

◆ WM_gizmomaptype_group_unlink()

◆ WM_gizmotype_append()

◆ WM_gizmotype_append_ptr()

void WM_gizmotype_append_ptr ( void(* gtfunc )(wmGizmoType *, void *),
void * userdata )

Definition at line 97 of file wm_gizmo_type.cc.

References wm_gizmotype_append__begin(), and wm_gizmotype_append__end().

◆ WM_gizmotype_find()

◆ WM_gizmotype_free_ptr()

void WM_gizmotype_free_ptr ( wmGizmoType * gzt)

◆ WM_gizmotype_iter()

void WM_gizmotype_iter ( GHashIterator * ghi)

Caller must free.

Definition at line 65 of file wm_gizmo_type.cc.

References BLI_ghashIterator_init(), and global_gizmotype_hash.

◆ WM_gizmotype_remove()

bool WM_gizmotype_remove ( bContext * C,
Main * bmain,
const char * idname )

◆ WM_gizmotype_remove_ptr()

void WM_gizmotype_remove_ptr ( bContext * C,
Main * bmain,
wmGizmoType * gzt )

◆ WM_gizmotype_target_property_def()

◆ WM_gizmotype_target_property_find()