Blender  V3.3
Classes
WM_gizmo_api.h File Reference
#include "wm_gizmo_fn.h"

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.h

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

Function Documentation

◆ WM_gizmo_calc_matrix_final()

void WM_gizmo_calc_matrix_final ( const struct wmGizmo gz,
float  r_mat[4][4] 
)

◆ WM_gizmo_calc_matrix_final_no_offset()

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

◆ WM_gizmo_calc_matrix_final_params()

void WM_gizmo_calc_matrix_final_params ( const struct wmGizmo gz,
const struct WM_GizmoMatrixParams params,
float  r_mat[4][4] 
)

◆ WM_gizmo_cmp_temp_fl()

int WM_gizmo_cmp_temp_fl ( const void gz_a_ptr,
const void gz_b_ptr 
)

Definition at line 139 of file wm_gizmo_group.c.

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 struct bContext C,
eWM_GizmoFlagMapDrawStep  step 
)

◆ WM_gizmo_do_msg_notify_tag_refresh()

void WM_gizmo_do_msg_notify_tag_refresh ( struct bContext C,
struct wmMsgSubscribeKey msg_key,
struct wmMsgSubscribeValue msg_val 
)

◆ WM_gizmo_free()

void WM_gizmo_free ( struct 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.c.

References BPY_DECREF_RNA_INVALIDATE(), wmGizmoProperty::custom_func, wmGizmoType::free, wmGizmoProperty::free_fn, MEM_freeN, NULL, wmGizmo::op_data, wmGizmo::op_data_len, wmGizmoOpElem::ptr, 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 struct wmGizmo gz,
float  color[4] 
)

◆ WM_gizmo_get_color_highlight()

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

◆ WM_gizmo_group_refresh()

void WM_gizmo_group_refresh ( const struct bContext C,
struct wmGizmoGroup gzgroup 
)

◆ WM_gizmo_group_remove_by_tool()

void WM_gizmo_group_remove_by_tool ( struct bContext C,
struct Main bmain,
const struct wmGizmoGroupType gzgt,
const struct bToolRef tref 
)

◆ WM_gizmo_group_tag_remove()

void WM_gizmo_group_tag_remove ( struct wmGizmoGroup gzgroup)

◆ 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 ( struct wmGizmoGroupType gzgt)

◆ WM_gizmo_group_type_add_ptr_ex()

void WM_gizmo_group_type_add_ptr_ex ( struct wmGizmoGroupType gzgt,
struct wmGizmoMapType gzmap_type 
)

◆ WM_gizmo_group_type_ensure()

bool WM_gizmo_group_type_ensure ( const char *  idname)

◆ WM_gizmo_group_type_ensure_ptr()

bool WM_gizmo_group_type_ensure_ptr ( struct wmGizmoGroupType gzgt)

◆ WM_gizmo_group_type_ensure_ptr_ex()

bool WM_gizmo_group_type_ensure_ptr_ex ( struct wmGizmoGroupType gzgt,
struct wmGizmoMapType gzmap_type 
)

◆ WM_gizmo_group_type_free()

bool WM_gizmo_group_type_free ( const char *  idname)

◆ WM_gizmo_group_type_free_ptr()

void WM_gizmo_group_type_free_ptr ( wmGizmoGroupType gzgt)

◆ WM_gizmo_group_type_poll()

bool WM_gizmo_group_type_poll ( const struct bContext C,
const struct wmGizmoGroupType gzgt 
)

◆ WM_gizmo_group_type_reinit()

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

◆ WM_gizmo_group_type_reinit_ptr()

void WM_gizmo_group_type_reinit_ptr ( struct Main bmain,
struct wmGizmoGroupType gzgt 
)

◆ WM_gizmo_group_type_reinit_ptr_ex()

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

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

Definition at line 1150 of file wm_gizmo_group.c.

References BLI_assert, NULL, 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 ( struct Main bmain,
const char *  idname 
)

◆ WM_gizmo_group_type_remove_ptr()

void WM_gizmo_group_type_remove_ptr ( struct Main bmain,
struct wmGizmoGroupType gzgt 
)

◆ WM_gizmo_group_type_remove_ptr_ex()

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

Call WM_gizmo_group_type_free_ptr after to remove & free.

Definition at line 1132 of file wm_gizmo_group.c.

References NULL, and 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()

void WM_gizmo_group_type_unlink_delayed_ptr ( struct wmGizmoGroupType gzgt)

◆ WM_gizmo_group_type_unlink_delayed_ptr_ex()

void WM_gizmo_group_type_unlink_delayed_ptr_ex ( struct wmGizmoGroupType gzgt,
struct wmGizmoMapType gzmap_type 
)

◆ WM_gizmo_group_unlink_delayed_ptr_from_space()

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

◆ WM_gizmo_highlight_set()

bool WM_gizmo_highlight_set ( struct wmGizmoMap gzmap,
struct wmGizmo gz 
)

◆ WM_gizmo_keymap_generic()

struct wmKeyMap* WM_gizmo_keymap_generic ( struct wmWindowManager wm)

◆ WM_gizmo_keymap_generic_click_drag()

struct wmKeyMap* WM_gizmo_keymap_generic_click_drag ( struct wmWindowManager wm)

◆ WM_gizmo_keymap_generic_click_drag_with_keyconfig()

struct wmKeyMap* WM_gizmo_keymap_generic_click_drag_with_keyconfig ( struct wmKeyConfig kc)

◆ WM_gizmo_keymap_generic_drag()

struct wmKeyMap* WM_gizmo_keymap_generic_drag ( struct wmWindowManager wm)

◆ WM_gizmo_keymap_generic_drag_with_keyconfig()

struct wmKeyMap* WM_gizmo_keymap_generic_drag_with_keyconfig ( struct wmKeyConfig kc)

◆ WM_gizmo_keymap_generic_maybe_drag()

struct wmKeyMap* WM_gizmo_keymap_generic_maybe_drag ( struct wmWindowManager wm)

◆ WM_gizmo_keymap_generic_maybe_drag_with_keyconfig()

struct wmKeyMap* WM_gizmo_keymap_generic_maybe_drag_with_keyconfig ( struct wmKeyConfig kc)

Drag or press depending on preference.

Definition at line 903 of file wm_gizmo_group.c.

References wmKeyMap::idname, 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()

struct wmKeyMap* WM_gizmo_keymap_generic_select ( struct wmWindowManager wm)

◆ WM_gizmo_keymap_generic_select_with_keyconfig()

struct wmKeyMap* WM_gizmo_keymap_generic_select_with_keyconfig ( struct wmKeyConfig kc)

◆ WM_gizmo_keymap_generic_with_keyconfig()

struct wmKeyMap* WM_gizmo_keymap_generic_with_keyconfig ( struct wmKeyConfig kc)

◆ WM_gizmo_modal_set_from_setup()

void WM_gizmo_modal_set_from_setup ( struct wmGizmoMap gzmap,
struct bContext C,
struct wmGizmo gz,
int  part_index,
const struct 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.

◆ WM_gizmo_new()

struct wmGizmo* WM_gizmo_new ( const char *  idname,
struct wmGizmoGroup gzgroup,
struct PointerRNA properties 
)

◆ WM_gizmo_new_ptr()

struct wmGizmo* WM_gizmo_new_ptr ( const struct wmGizmoType gzt,
struct wmGizmoGroup gzgroup,
struct PointerRNA properties 
)

◆ WM_gizmo_operator_get()

struct wmGizmoOpElem* WM_gizmo_operator_get ( struct wmGizmo gz,
int  part_index 
)

◆ WM_gizmo_operator_invoke()

int WM_gizmo_operator_invoke ( struct bContext C,
struct wmGizmo gz,
struct wmGizmoOpElem gzop,
const struct wmEvent event 
)

◆ WM_gizmo_operator_set()

struct PointerRNA* WM_gizmo_operator_set ( struct wmGizmo gz,
int  part_index,
struct wmOperatorType ot,
struct IDProperty properties 
)

◆ WM_gizmo_properties_alloc()

void WM_gizmo_properties_alloc ( struct PointerRNA **  ptr,
struct 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 590 of file wm_gizmo.c.

References IDP_GROUP, IDP_New(), MEM_callocN, NULL, ptr, and WM_gizmo_properties_create().

◆ WM_gizmo_properties_clear()

void WM_gizmo_properties_clear ( struct PointerRNA ptr)

Definition at line 679 of file wm_gizmo.c.

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

◆ WM_gizmo_properties_create()

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

◆ WM_gizmo_properties_create_ptr()

void WM_gizmo_properties_create_ptr ( struct PointerRNA ptr,
struct wmGizmoType gzt 
)

Definition at line 573 of file wm_gizmo.c.

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

Referenced by WM_gizmo_properties_create().

◆ WM_gizmo_properties_default()

bool WM_gizmo_properties_default ( struct 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 634 of file wm_gizmo.c.

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, and RNA_STRUCT_END.

◆ WM_gizmo_properties_free()

void WM_gizmo_properties_free ( struct PointerRNA ptr)

Definition at line 688 of file wm_gizmo.c.

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

Referenced by WM_gizmo_free().

◆ WM_gizmo_properties_reset()

void WM_gizmo_properties_reset ( struct wmGizmo gz)

◆ WM_gizmo_properties_sanitize()

void WM_gizmo_properties_sanitize ( struct PointerRNA ptr,
bool  no_context 
)

◆ WM_gizmo_select_set()

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

◆ WM_gizmo_select_unlink()

bool WM_gizmo_select_unlink ( struct wmGizmoMap gzmap,
struct wmGizmo gz 
)

Remove from selection array without running callbacks.

Definition at line 392 of file wm_gizmo.c.

References wm_gizmo_select_set_ex().

Referenced by WM_gizmo_unlink(), and wm_gizmogroup_free().

◆ WM_gizmo_set_color()

void WM_gizmo_set_color ( struct wmGizmo gz,
const float  color[4] 
)

◆ WM_gizmo_set_color_highlight()

void WM_gizmo_set_color_highlight ( struct wmGizmo gz,
const float  color[4] 
)

◆ WM_gizmo_set_flag()

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

◆ WM_gizmo_set_fn_custom_modal()

void WM_gizmo_set_fn_custom_modal ( struct wmGizmo gz,
wmGizmoFnModal  fn 
)

◆ WM_gizmo_set_line_width()

void WM_gizmo_set_line_width ( struct wmGizmo gz,
float  line_width 
)

◆ WM_gizmo_set_matrix_location()

void WM_gizmo_set_matrix_location ( struct wmGizmo gz,
const float  origin[3] 
)

◆ WM_gizmo_set_matrix_offset_location()

void WM_gizmo_set_matrix_offset_location ( struct 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 ( struct wmGizmo gz,
const float  y_axis[3],
const float  z_axis[3] 
)

wmGizmo.matrix_offset utility, set the orientation by it's Y/Z axis.

Definition at line 293 of file wm_gizmo.c.

References wmGizmo::matrix_offset, and wm_gizmo_set_matrix_rotation_from_yz_axis__internal().

Referenced by gizmo_mesh_bisect_update_from_op().

◆ WM_gizmo_set_matrix_offset_rotation_from_z_axis()

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

wmGizmo.matrix_offset utility, set the orientation by it's Z axis.

Definition at line 289 of file wm_gizmo.c.

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 ( struct wmGizmo gz,
const float  y_axis[3],
const float  z_axis[3] 
)

◆ WM_gizmo_set_matrix_rotation_from_z_axis()

void WM_gizmo_set_matrix_rotation_from_z_axis ( struct wmGizmo gz,
const float  z_axis[3] 
)

◆ WM_gizmo_set_scale()

void WM_gizmo_set_scale ( struct wmGizmo gz,
float  scale 
)

◆ WM_gizmo_target_property_anim_autokey()

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

Auto-key function if auto-key is enabled.

◆ WM_gizmo_target_property_array()

struct wmGizmoProperty* WM_gizmo_target_property_array ( struct wmGizmo gz)

◆ WM_gizmo_target_property_array_length()

int WM_gizmo_target_property_array_length ( const struct wmGizmo gz,
struct wmGizmoProperty gz_prop 
)

◆ WM_gizmo_target_property_at_index()

struct wmGizmoProperty* WM_gizmo_target_property_at_index ( struct wmGizmo gz,
int  index 
)

◆ WM_gizmo_target_property_clear_rna()

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

◆ WM_gizmo_target_property_clear_rna_ptr()

void WM_gizmo_target_property_clear_rna_ptr ( struct wmGizmo gz,
const struct wmGizmoPropertyType gz_prop_type 
)

◆ WM_gizmo_target_property_def_func()

void WM_gizmo_target_property_def_func ( struct wmGizmo gz,
const char *  idname,
const struct wmGizmoPropertyFnParams params 
)

◆ WM_gizmo_target_property_def_func_ptr()

void WM_gizmo_target_property_def_func_ptr ( struct wmGizmo gz,
const struct wmGizmoPropertyType gz_prop_type,
const struct wmGizmoPropertyFnParams params 
)

◆ WM_gizmo_target_property_def_rna()

void WM_gizmo_target_property_def_rna ( struct wmGizmo gz,
const char *  idname,
struct PointerRNA ptr,
const char *  propname,
int  index 
)

◆ WM_gizmo_target_property_def_rna_ptr()

void WM_gizmo_target_property_def_rna_ptr ( struct wmGizmo gz,
const struct wmGizmoPropertyType gz_prop_type,
struct PointerRNA ptr,
struct PropertyRNA prop,
int  index 
)

◆ WM_gizmo_target_property_find()

struct wmGizmoProperty* WM_gizmo_target_property_find ( struct wmGizmo gz,
const char *  idname 
)

◆ WM_gizmo_target_property_float_get()

float WM_gizmo_target_property_float_get ( const struct wmGizmo gz,
struct wmGizmoProperty gz_prop 
)

◆ WM_gizmo_target_property_float_get_array()

void WM_gizmo_target_property_float_get_array ( const struct wmGizmo gz,
struct wmGizmoProperty gz_prop,
float value 
)

◆ WM_gizmo_target_property_float_range_get()

bool WM_gizmo_target_property_float_range_get ( const struct wmGizmo gz,
struct wmGizmoProperty gz_prop,
float  range[2] 
)

◆ WM_gizmo_target_property_float_set()

void WM_gizmo_target_property_float_set ( struct bContext C,
const struct wmGizmo gz,
struct wmGizmoProperty gz_prop,
float  value 
)

◆ WM_gizmo_target_property_float_set_array()

void WM_gizmo_target_property_float_set_array ( struct bContext C,
const struct wmGizmo gz,
struct wmGizmoProperty gz_prop,
const float value 
)

◆ WM_gizmo_target_property_is_valid()

bool WM_gizmo_target_property_is_valid ( const struct wmGizmoProperty gz_prop)

◆ WM_gizmo_target_property_is_valid_any()

bool WM_gizmo_target_property_is_valid_any ( struct wmGizmo gz)

◆ WM_gizmo_target_property_subscribe_all()

void WM_gizmo_target_property_subscribe_all ( struct wmGizmo gz,
struct wmMsgBus mbus,
struct ARegion region 
)

◆ WM_gizmo_unlink()

void WM_gizmo_unlink ( ListBase gizmolist,
struct wmGizmoMap gzmap,
struct wmGizmo gz,
struct bContext C 
)

◆ WM_gizmoconfig_update()

void WM_gizmoconfig_update ( struct Main bmain)

◆ WM_gizmoconfig_update_tag_group_remove()

void WM_gizmoconfig_update_tag_group_remove ( struct wmGizmoMap gzmap)

◆ WM_gizmoconfig_update_tag_group_type_init()

void WM_gizmoconfig_update_tag_group_type_init ( struct wmGizmoMapType gzmap_type,
struct wmGizmoGroupType gzgt 
)

◆ WM_gizmoconfig_update_tag_group_type_remove()

void WM_gizmoconfig_update_tag_group_type_remove ( struct wmGizmoMapType gzmap_type,
struct wmGizmoGroupType gzgt 
)

◆ WM_gizmogroup_ensure_init()

void WM_gizmogroup_ensure_init ( const struct bContext C,
struct wmGizmoGroup gzgroup 
)

◆ WM_gizmogroup_setup_keymap_generic()

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

◆ WM_gizmogroup_setup_keymap_generic_drag()

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

◆ WM_gizmogroup_setup_keymap_generic_maybe_drag()

struct wmKeyMap* WM_gizmogroup_setup_keymap_generic_maybe_drag ( const struct wmGizmoGroupType gzgt,
struct wmKeyConfig kc 
)

◆ WM_gizmogroup_setup_keymap_generic_select()

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

◆ WM_gizmogrouptype_append()

struct wmGizmoGroupType* WM_gizmogrouptype_append ( void(*)(struct wmGizmoGroupType *)  wtfunc)

◆ WM_gizmogrouptype_append_and_link()

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

◆ WM_gizmogrouptype_append_ptr()

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

◆ WM_gizmogrouptype_find()

struct wmGizmoGroupType* WM_gizmogrouptype_find ( const char *  idname,
bool  quiet 
)

◆ WM_gizmogrouptype_iter()

void WM_gizmogrouptype_iter ( struct GHashIterator ghi)

Caller must free.

Definition at line 61 of file wm_gizmo_group_type.c.

References BLI_ghashIterator_init(), and global_gizmogrouptype_hash.

◆ WM_gizmomap_add_handlers()

void WM_gizmomap_add_handlers ( struct ARegion region,
struct wmGizmoMap gzmap 
)

◆ WM_gizmomap_cursor_set()

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

◆ WM_gizmomap_draw()

void WM_gizmomap_draw ( struct wmGizmoMap gzmap,
const struct bContext C,
eWM_GizmoFlagMapDrawStep  drawstep 
)

◆ WM_gizmomap_drawstep_from_gizmo_group()

eWM_GizmoFlagMapDrawStep WM_gizmomap_drawstep_from_gizmo_group ( const struct wmGizmoGroup gzgroup)

◆ WM_gizmomap_get_modal()

struct wmGizmo* WM_gizmomap_get_modal ( const struct wmGizmoMap gzmap)

◆ WM_gizmomap_group_find()

struct wmGizmoGroup* WM_gizmomap_group_find ( struct wmGizmoMap gzmap,
const char *  idname 
)

◆ WM_gizmomap_group_find_ptr()

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

Definition at line 211 of file wm_gizmo_map.c.

References wmGizmoMap::groups, LISTBASE_FOREACH, and NULL.

Referenced by v3d_cursor_snap_poll_fn(), and WM_gizmomap_group_find().

◆ WM_gizmomap_group_list()

const struct ListBase* WM_gizmomap_group_list ( struct wmGizmoMap gzmap)

◆ WM_gizmomap_is_any_selected()

bool WM_gizmomap_is_any_selected ( const struct wmGizmoMap gzmap)

◆ WM_gizmomap_message_subscribe()

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

◆ WM_gizmomap_minmax()

bool WM_gizmomap_minmax ( const struct 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.

◆ WM_gizmomap_new_from_type()

struct wmGizmoMap* WM_gizmomap_new_from_type ( const struct wmGizmoMapType_Params gzmap_params)

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

Definition at line 166 of file wm_gizmo_map.c.

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 ( struct wmGizmoMap gzmap)

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

Definition at line 194 of file wm_gizmo_map.c.

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 ( struct bContext C,
struct wmGizmoMap gzmap,
int  action 
)

Select/Deselect all selectable gizmos in gzmap.

Returns
if selection has changed.

TODO: select all by type.

Definition at line 911 of file wm_gizmo_map.c.

References BLI_assert_unreachable, C, 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 ( struct wmGizmoMap gzmap)

◆ WM_gizmomap_tag_refresh()

void WM_gizmomap_tag_refresh ( struct wmGizmoMap gzmap)

◆ WM_gizmomap_tag_refresh_drawstep()

void WM_gizmomap_tag_refresh_drawstep ( struct wmGizmoMap gzmap,
eWM_GizmoFlagMapDrawStep  drawstep 
)

◆ WM_gizmomap_tooltip_init()

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

◆ WM_gizmomaptype_ensure()

struct wmGizmoMapType* WM_gizmomaptype_ensure ( const struct wmGizmoMapType_Params gzmap_params)

◆ WM_gizmomaptype_find()

struct wmGizmoMapType* WM_gizmomaptype_find ( const struct wmGizmoMapType_Params gzmap_params)

◆ WM_gizmomaptype_group_find()

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

Definition at line 931 of file wm_gizmo_group.c.

References wmGizmoMapType::grouptype_refs, LISTBASE_FOREACH, NULL, and STREQ.

◆ WM_gizmomaptype_group_find_ptr()

struct wmGizmoGroupTypeRef* WM_gizmomaptype_group_find_ptr ( struct wmGizmoMapType gzmap_type,
const struct wmGizmoGroupType gzgt 
)

◆ WM_gizmomaptype_group_free()

void WM_gizmomaptype_group_free ( struct wmGizmoGroupTypeRef gzgt)

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

Definition at line 1016 of file wm_gizmo_group.c.

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 struct Main bmain,
struct wmGizmoMapType gzmap_type,
struct wmGizmoGroupType gzgt 
)

◆ WM_gizmomaptype_group_init_runtime_keymap()

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

◆ WM_gizmomaptype_group_init_runtime_with_region()

wmGizmoGroup* WM_gizmomaptype_group_init_runtime_with_region ( struct wmGizmoMapType gzmap_type,
struct wmGizmoGroupType gzgt,
struct ARegion region 
)

◆ WM_gizmomaptype_group_link()

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

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

Definition at line 943 of file wm_gizmo_group.c.

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

◆ WM_gizmomaptype_group_link_ptr()

struct wmGizmoGroupTypeRef* WM_gizmomaptype_group_link_ptr ( struct wmGizmoMapType gzmap_type,
struct wmGizmoGroupType gzgt 
)

◆ WM_gizmomaptype_group_unlink()

void WM_gizmomaptype_group_unlink ( struct bContext C,
struct Main bmain,
struct wmGizmoMapType gzmap_type,
const struct wmGizmoGroupType gzgt 
)

◆ WM_gizmotype_append()

void WM_gizmotype_append ( void(*)(struct wmGizmoType *)  gtfunc)

◆ WM_gizmotype_append_ptr()

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

Definition at line 100 of file wm_gizmo_type.c.

References wm_gizmotype_append__begin(), and wm_gizmotype_append__end().

◆ WM_gizmotype_find()

const struct wmGizmoType* WM_gizmotype_find ( const char *  idname,
bool  quiet 
)

◆ WM_gizmotype_free_ptr()

void WM_gizmotype_free_ptr ( struct wmGizmoType gzt)

◆ WM_gizmotype_iter()

void WM_gizmotype_iter ( struct GHashIterator ghi)

Caller must free.

Definition at line 68 of file wm_gizmo_type.c.

References BLI_ghashIterator_init(), and global_gizmotype_hash.

◆ WM_gizmotype_remove()

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

◆ WM_gizmotype_remove_ptr()

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

◆ WM_gizmotype_target_property_def()

void WM_gizmotype_target_property_def ( struct wmGizmoType gzt,
const char *  idname,
int  data_type,
int  array_length 
)

◆ WM_gizmotype_target_property_find()

const struct wmGizmoPropertyType* WM_gizmotype_target_property_find ( const struct wmGizmoType gzt,
const char *  idname 
)