82 tref, gzgroup->
type, &gzgt_ptr);
85 const float radius = (gzgt_ptr_is_valid ?
RNA_float_get(&gzgt_ptr,
"radius") :
97 const float radius = gzgt_ptr_is_valid ?
RNA_float_get(&gzgt_ptr,
"radius") :
107 "backdrop_fill_alpha",
108 gzgt_ptr_is_valid ?
RNA_float_get(&gzgt_ptr,
"backdrop_fill_alpha") : 0.125f);
174 msg_sub_value_gz_tag_refresh.
owner = region;
180 &rna_ToolSettings_workspace_tool_type,
189 mbus, &toolsettings_ptr, props[i], &msg_sub_value_gz_tag_refresh, __func__);
196 gzgt->
name =
"Generic Tool Widget Normal";
223 gzgt->
name =
"Generic Tool Widget Free";
248 gzgt->
srna,
"backdrop_fill_alpha", 0.125, 0.0f, 1.0f,
"Backdrop Alpha",
"", 0.0f, 1.0f);
Read Blender memory allocation and freeing.
void get_color_3fv(int colorid, float col[3])
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void WM_gizmo_do_msg_notify_tag_refresh(bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void copy_m4_m3(float m1[4][4], const float m2[3][3])
static bool WIDGETGROUP_tool_generic_poll(const bContext *C, wmGizmoGroupType *gzgt)
static void WIDGETGROUP_tool_generic_refresh(const bContext *C, wmGizmoGroup *gzgroup)
static const char * handle_free_id
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
void WM_gizmo_set_line_width(wmGizmo *gz, const float line_width)
void * CTX_wm_region_data(const bContext *C)
void WM_gizmo_set_flag(wmGizmo *gz, const int flag, const bool enable)
void VIEW3D_GGT_tool_generic_handle_free(wmGizmoGroupType *gzgt)
wmWindowManager * CTX_wm_manager(const bContext *C)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
MINLINE void negate_v3(float r[3])
wmKeyMap * WM_keymap_ensure(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid)
void unit_m4(float m[4][4])
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
ToolSettings * CTX_data_tool_settings(const bContext *C)
wmGizmo * WM_gizmo_new(const StringRef idname, wmGizmoGroup *gzgroup, PointerRNA *properties)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
@ SCE_WORKSPACE_TOOL_FALLBACK
void WM_msg_subscribe_rna(wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
@ WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK
@ WM_GIZMOGROUPTYPE_TOOL_FALLBACK_KEYMAP
@ WM_GIZMO_OPERATOR_TOOL_INIT
@ WM_GIZMO_DRAW_OFFSET_SCALE
void VIEW3D_GGT_tool_generic_handle_normal(wmGizmoGroupType *gzgt)
static const float handle_normal_radius_default
bToolRef * WM_toolsystem_ref_from_context(const bContext *C)
static const char * handle_normal_id
Scene * CTX_data_scene(const bContext *C)
static void WIDGETGROUP_tool_generic_setup(const bContext *C, wmGizmoGroup *gzgroup)
static wmGizmo * tool_generic_create_gizmo(const bContext *C, wmGizmoGroup *gzgroup)
static const float handle_free_radius_default
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
@ ED_GIZMO_BUTTON_SHOW_BACKDROP
@ ED_GIZMO_BUTTON_SHOW_OUTLINE
@ ED_GIZMO_BUTTON_SHOW_HELPLINE
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
ARegion * CTX_wm_region(const bContext *C)
float RNA_float_get(PointerRNA *ptr, const char *name)
View3D * CTX_wm_view3d(const bContext *C)
static void WIDGETGROUP_gizmo_message_subscribe(const bContext *C, wmGizmoGroup *gzgroup, wmMsgBus *mbus)
struct ToolSettings * toolsettings
eView3D_GizmoFlag gizmo_flag
wmGizmoGroupFnMsgBusSubscribe message_subscribe
wmGizmoGroupFnRefresh refresh
wmGizmoMapType_Params gzmap_params
eWM_GizmoFlagGroupTypeFlag flag
wmGizmoMap * parent_gzmap
float matrix_offset[4][4]