Blender V5.0
WM_toolsystem.hh File Reference

Go to the source code of this file.

Classes

struct  bToolKey

Macros

#define WM_TOOLSYSTEM_SPACE_MASK   ((1 << SPACE_IMAGE) | (1 << SPACE_NODE) | (1 << SPACE_VIEW3D) | (1 << SPACE_SEQ))
#define WM_TOOLSYSTEM_SPACE_MASK_MODE_FROM_SPACE   ((1 << SPACE_IMAGE) | (1 << SPACE_SEQ))
#define WM_toolsystem_ref_properties_ensure_from_operator(tref, ot, r_ptr)
#define WM_toolsystem_ref_properties_ensure_from_gizmo_group(tref, gzgroup, r_ptr)
#define WM_toolsystem_ref_properties_get_from_operator(tref, ot, r_ptr)
#define WM_toolsystem_ref_properties_get_from_gizmo_group(tref, gzgroup, r_ptr)

Functions

bToolRefWM_toolsystem_ref_from_context (const bContext *C)
bToolRefWM_toolsystem_ref_find (WorkSpace *workspace, const bToolKey *tkey)
bool WM_toolsystem_ref_ensure (WorkSpace *workspace, const bToolKey *tkey, bToolRef **r_tref)
bToolRefWM_toolsystem_ref_set_by_id_ex (bContext *C, WorkSpace *workspace, const bToolKey *tkey, const char *name, bool cycle)
bToolRefWM_toolsystem_ref_set_by_id (bContext *C, const char *name)
bToolRef_RuntimeWM_toolsystem_runtime_from_context (const bContext *C)
bToolRef_RuntimeWM_toolsystem_runtime_find (WorkSpace *workspace, const bToolKey *tkey)
bool WM_toolsystem_activate_brush_and_tool (bContext *C, Paint *paint, Brush *brush)
void WM_toolsystem_unlink (bContext *C, WorkSpace *workspace, const bToolKey *tkey)
void WM_toolsystem_refresh (const bContext *C, WorkSpace *workspace, const bToolKey *tkey)
void WM_toolsystem_reinit (bContext *C, WorkSpace *workspace, const bToolKey *tkey)
void WM_toolsystem_unlink_all (bContext *C, WorkSpace *workspace)
void WM_toolsystem_refresh_all (const bContext *C, WorkSpace *workspace)
void WM_toolsystem_reinit_all (bContext *C, wmWindow *win)
void WM_toolsystem_ref_set_from_runtime (bContext *C, WorkSpace *workspace, bToolRef *tref, const bToolRef_Runtime *tref_rt, const char *idname)
void WM_toolsystem_ref_sync_from_context (Main *bmain, WorkSpace *workspace, bToolRef *tref)
void WM_toolsystem_init (const bContext *C)
int WM_toolsystem_mode_from_spacetype (const Scene *scene, ViewLayer *view_layer, ScrArea *area, int space_type)
bool WM_toolsystem_key_from_context (const Scene *scene, ViewLayer *view_layer, ScrArea *area, bToolKey *tkey)
void WM_toolsystem_update_from_context_view3d (bContext *C)
void WM_toolsystem_update_from_context (bContext *C, WorkSpace *workspace, const Scene *scene, ViewLayer *view_layer, ScrArea *area)
bool WM_toolsystem_active_tool_is_brush (const bContext *C)
bool WM_toolsystem_active_tool_has_custom_cursor (const bContext *C)
void WM_toolsystem_do_msg_notify_tag_refresh (bContext *C, wmMsgSubscribeKey *msg_key, wmMsgSubscribeValue *msg_val)
IDPropertyWM_toolsystem_ref_properties_get_idprops (bToolRef *tref)
IDPropertyWM_toolsystem_ref_properties_ensure_idprops (bToolRef *tref)
void WM_toolsystem_ref_properties_ensure_ex (bToolRef *tref, const char *idname, StructRNA *type, PointerRNA *r_ptr)
bool WM_toolsystem_ref_properties_get_ex (bToolRef *tref, const char *idname, StructRNA *type, PointerRNA *r_ptr)
void WM_toolsystem_ref_properties_init_for_keymap (bToolRef *tref, PointerRNA *dst_ptr, PointerRNA *src_ptr, wmOperatorType *ot)
void WM_toolsystem_refresh_active (bContext *C)
bool WM_toolsystem_refresh_screen_area (WorkSpace *workspace, const Scene *scene, ViewLayer *view_layer, ScrArea *area)
void WM_toolsystem_refresh_screen_window (wmWindow *win)
void WM_toolsystem_refresh_screen_all (Main *bmain)

Macro Definition Documentation

◆ WM_toolsystem_ref_properties_ensure_from_gizmo_group

#define WM_toolsystem_ref_properties_ensure_from_gizmo_group ( tref,
gzgroup,
r_ptr )
Value:
WM_toolsystem_ref_properties_ensure_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr)
void WM_toolsystem_ref_properties_ensure_ex(bToolRef *tref, const char *idname, StructRNA *type, PointerRNA *r_ptr)

Definition at line 125 of file WM_toolsystem.hh.

Referenced by blender::ed::transform::gizmo_mesh_extrude_refresh(), gizmo_mesh_spin_init_draw_prepare(), gizmo_mesh_spin_init_refresh(), and blender::ed::transform::transform_from_gizmo_invoke().

◆ WM_toolsystem_ref_properties_ensure_from_operator

#define WM_toolsystem_ref_properties_ensure_from_operator ( tref,
ot,
r_ptr )
Value:
WM_toolsystem_ref_properties_ensure_ex(tref, (ot)->idname, (ot)->srna, r_ptr)
wmOperatorType * ot
Definition wm_files.cc:4237

Definition at line 123 of file WM_toolsystem.hh.

◆ WM_toolsystem_ref_properties_get_from_gizmo_group

#define WM_toolsystem_ref_properties_get_from_gizmo_group ( tref,
gzgroup,
r_ptr )
Value:
WM_toolsystem_ref_properties_get_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr)
bool WM_toolsystem_ref_properties_get_ex(bToolRef *tref, const char *idname, StructRNA *type, PointerRNA *r_ptr)

Definition at line 134 of file WM_toolsystem.hh.

Referenced by tool_generic_create_gizmo().

◆ WM_toolsystem_ref_properties_get_from_operator

#define WM_toolsystem_ref_properties_get_from_operator ( tref,
ot,
r_ptr )
Value:
WM_toolsystem_ref_properties_get_ex(tref, (ot)->idname, (ot)->srna, r_ptr)

Definition at line 132 of file WM_toolsystem.hh.

Referenced by WM_gizmo_operator_invoke().

◆ WM_TOOLSYSTEM_SPACE_MASK

◆ WM_TOOLSYSTEM_SPACE_MASK_MODE_FROM_SPACE

#define WM_TOOLSYSTEM_SPACE_MASK_MODE_FROM_SPACE   ((1 << SPACE_IMAGE) | (1 << SPACE_SEQ))

Space-types that define their own "mode" (as returned by WM_toolsystem_mode_from_spacetype).

Definition at line 35 of file WM_toolsystem.hh.

Referenced by toolsystem_ref_set_by_brush_type(), and WM_toolsystem_ref_set_by_id_ex().

Function Documentation

◆ WM_toolsystem_activate_brush_and_tool()

bool WM_toolsystem_activate_brush_and_tool ( bContext * C,
Paint * paint,
Brush * brush )

◆ WM_toolsystem_active_tool_has_custom_cursor()

bool WM_toolsystem_active_tool_has_custom_cursor ( const bContext * C)

◆ WM_toolsystem_active_tool_is_brush()

◆ WM_toolsystem_do_msg_notify_tag_refresh()

◆ WM_toolsystem_init()

void WM_toolsystem_init ( const bContext * C)

◆ WM_toolsystem_key_from_context()

bool WM_toolsystem_key_from_context ( const Scene * scene,
ViewLayer * view_layer,
ScrArea * area,
bToolKey * tkey )

◆ WM_toolsystem_mode_from_spacetype()

◆ WM_toolsystem_ref_ensure()

bool WM_toolsystem_ref_ensure ( WorkSpace * workspace,
const bToolKey * tkey,
bToolRef ** r_tref )

◆ WM_toolsystem_ref_find()

◆ WM_toolsystem_ref_from_context()

◆ WM_toolsystem_ref_properties_ensure_ex()

void WM_toolsystem_ref_properties_ensure_ex ( bToolRef * tref,
const char * idname,
StructRNA * type,
PointerRNA * r_ptr )

◆ WM_toolsystem_ref_properties_ensure_idprops()

IDProperty * WM_toolsystem_ref_properties_ensure_idprops ( bToolRef * tref)

◆ WM_toolsystem_ref_properties_get_ex()

bool WM_toolsystem_ref_properties_get_ex ( bToolRef * tref,
const char * idname,
StructRNA * type,
PointerRNA * r_ptr )

◆ WM_toolsystem_ref_properties_get_idprops()

IDProperty * WM_toolsystem_ref_properties_get_idprops ( bToolRef * tref)

◆ WM_toolsystem_ref_properties_init_for_keymap()

◆ WM_toolsystem_ref_set_by_id()

◆ WM_toolsystem_ref_set_by_id_ex()

◆ WM_toolsystem_ref_set_from_runtime()

◆ WM_toolsystem_ref_sync_from_context()

◆ WM_toolsystem_refresh()

void WM_toolsystem_refresh ( const bContext * C,
WorkSpace * workspace,
const bToolKey * tkey )

◆ WM_toolsystem_refresh_active()

void WM_toolsystem_refresh_active ( bContext * C)

◆ WM_toolsystem_refresh_all()

void WM_toolsystem_refresh_all ( const bContext * C,
WorkSpace * workspace )

◆ WM_toolsystem_refresh_screen_all()

void WM_toolsystem_refresh_screen_all ( Main * bmain)

◆ WM_toolsystem_refresh_screen_area()

bool WM_toolsystem_refresh_screen_area ( WorkSpace * workspace,
const Scene * scene,
ViewLayer * view_layer,
ScrArea * area )

◆ WM_toolsystem_refresh_screen_window()

◆ WM_toolsystem_reinit()

void WM_toolsystem_reinit ( bContext * C,
WorkSpace * workspace,
const bToolKey * tkey )

Definition at line 554 of file wm_toolsystem.cc.

References C, toolsystem_reinit_ref(), and WM_toolsystem_ref_find().

◆ WM_toolsystem_reinit_all()

◆ WM_toolsystem_runtime_find()

bToolRef_Runtime * WM_toolsystem_runtime_find ( WorkSpace * workspace,
const bToolKey * tkey )

Definition at line 116 of file wm_toolsystem.cc.

References bToolRef::runtime, and WM_toolsystem_ref_find().

◆ WM_toolsystem_runtime_from_context()

◆ WM_toolsystem_unlink()

void WM_toolsystem_unlink ( bContext * C,
WorkSpace * workspace,
const bToolKey * tkey )

◆ WM_toolsystem_unlink_all()

void WM_toolsystem_unlink_all ( bContext * C,
WorkSpace * workspace )

Operate on all active tools.

Definition at line 562 of file wm_toolsystem.cc.

References C, LISTBASE_FOREACH, WorkSpace::tools, and toolsystem_unlink_ref().

◆ WM_toolsystem_update_from_context()

void WM_toolsystem_update_from_context ( bContext * C,
WorkSpace * workspace,
const Scene * scene,
ViewLayer * view_layer,
ScrArea * area )

◆ WM_toolsystem_update_from_context_view3d()