Blender  V3.3
Classes | Macros | Typedefs | Functions
WM_toolsystem.h File Reference
#include "BLI_compiler_attrs.h"

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)    WM_toolsystem_ref_properties_ensure_ex(tref, (ot)->idname, (ot)->srna, r_ptr)
 
#define WM_toolsystem_ref_properties_ensure_from_gizmo_group(tref, gzgroup, r_ptr)    WM_toolsystem_ref_properties_ensure_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr)
 
#define WM_toolsystem_ref_properties_get_from_operator(tref, ot, r_ptr)    WM_toolsystem_ref_properties_get_ex(tref, (ot)->idname, (ot)->srna, r_ptr)
 
#define WM_toolsystem_ref_properties_get_from_gizmo_group(tref, gzgroup, r_ptr)    WM_toolsystem_ref_properties_get_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr)
 

Typedefs

typedef struct bToolKey bToolKey
 

Functions

struct bToolRefWM_toolsystem_ref_from_context (struct bContext *C)
 
struct bToolRefWM_toolsystem_ref_find (struct WorkSpace *workspace, const bToolKey *tkey)
 
bool WM_toolsystem_ref_ensure (struct WorkSpace *workspace, const bToolKey *tkey, struct bToolRef **r_tref)
 
struct bToolRefWM_toolsystem_ref_set_by_id_ex (struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey, const char *name, bool cycle)
 
struct bToolRefWM_toolsystem_ref_set_by_id (struct bContext *C, const char *name)
 
struct bToolRef_RuntimeWM_toolsystem_runtime_from_context (struct bContext *C)
 
struct bToolRef_RuntimeWM_toolsystem_runtime_find (struct WorkSpace *workspace, const bToolKey *tkey)
 
void WM_toolsystem_unlink (struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey)
 
void WM_toolsystem_refresh (struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey)
 
void WM_toolsystem_reinit (struct bContext *C, struct WorkSpace *workspace, const bToolKey *tkey)
 
void WM_toolsystem_unlink_all (struct bContext *C, struct WorkSpace *workspace)
 
void WM_toolsystem_refresh_all (struct bContext *C, struct WorkSpace *workspace)
 
void WM_toolsystem_reinit_all (struct bContext *C, struct wmWindow *win)
 
void WM_toolsystem_ref_set_from_runtime (struct bContext *C, struct WorkSpace *workspace, struct bToolRef *tref, const struct bToolRef_Runtime *tref_rt, const char *idname)
 
void WM_toolsystem_ref_sync_from_context (struct Main *bmain, struct WorkSpace *workspace, struct bToolRef *tref)
 
void WM_toolsystem_init (struct bContext *C)
 
int WM_toolsystem_mode_from_spacetype (struct ViewLayer *view_layer, struct ScrArea *area, int space_type)
 
bool WM_toolsystem_key_from_context (struct ViewLayer *view_layer, struct ScrArea *area, bToolKey *tkey)
 
void WM_toolsystem_update_from_context_view3d (struct bContext *C)
 
void WM_toolsystem_update_from_context (struct bContext *C, struct WorkSpace *workspace, struct ViewLayer *view_layer, struct ScrArea *area)
 
bool WM_toolsystem_active_tool_is_brush (const struct bContext *C)
 
void WM_toolsystem_do_msg_notify_tag_refresh (struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val)
 
struct IDPropertyWM_toolsystem_ref_properties_get_idprops (struct bToolRef *tref)
 
struct IDPropertyWM_toolsystem_ref_properties_ensure_idprops (struct bToolRef *tref)
 
void WM_toolsystem_ref_properties_ensure_ex (struct bToolRef *tref, const char *idname, struct StructRNA *type, struct PointerRNA *r_ptr)
 
bool WM_toolsystem_ref_properties_get_ex (struct bToolRef *tref, const char *idname, struct StructRNA *type, struct PointerRNA *r_ptr)
 
void WM_toolsystem_ref_properties_init_for_keymap (struct bToolRef *tref, struct PointerRNA *dst_ptr, struct PointerRNA *src_ptr, struct wmOperatorType *ot)
 
void WM_toolsystem_refresh_active (struct bContext *C)
 
void WM_toolsystem_refresh_screen_area (struct WorkSpace *workspace, struct ViewLayer *view_layer, struct ScrArea *area)
 
void WM_toolsystem_refresh_screen_window (struct wmWindow *win)
 
void WM_toolsystem_refresh_screen_all (struct 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 
)     WM_toolsystem_ref_properties_ensure_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr)

Definition at line 120 of file WM_toolsystem.h.

◆ WM_toolsystem_ref_properties_ensure_from_operator

#define WM_toolsystem_ref_properties_ensure_from_operator (   tref,
  ot,
  r_ptr 
)     WM_toolsystem_ref_properties_ensure_ex(tref, (ot)->idname, (ot)->srna, r_ptr)

Definition at line 118 of file WM_toolsystem.h.

◆ WM_toolsystem_ref_properties_get_from_gizmo_group

#define WM_toolsystem_ref_properties_get_from_gizmo_group (   tref,
  gzgroup,
  r_ptr 
)     WM_toolsystem_ref_properties_get_ex(tref, (gzgroup)->idname, (gzgroup)->srna, r_ptr)

Definition at line 129 of file WM_toolsystem.h.

◆ WM_toolsystem_ref_properties_get_from_operator

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

Definition at line 127 of file WM_toolsystem.h.

◆ WM_TOOLSYSTEM_SPACE_MASK

#define WM_TOOLSYSTEM_SPACE_MASK    ((1 << SPACE_IMAGE) | (1 << SPACE_NODE) | (1 << SPACE_VIEW3D) | (1 << SPACE_SEQ))

Definition at line 29 of file WM_toolsystem.h.

◆ 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 34 of file WM_toolsystem.h.

Typedef Documentation

◆ bToolKey

typedef struct bToolKey bToolKey

Function Documentation

◆ WM_toolsystem_active_tool_is_brush()

bool WM_toolsystem_active_tool_is_brush ( const struct bContext C)

For paint modes to support non-brush tools.

◆ WM_toolsystem_do_msg_notify_tag_refresh()

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

Follow wmMsgNotifyFn spec.

◆ WM_toolsystem_init()

void WM_toolsystem_init ( struct bContext C)

◆ WM_toolsystem_key_from_context()

bool WM_toolsystem_key_from_context ( struct ViewLayer view_layer,
struct ScrArea area,
bToolKey tkey 
)

◆ WM_toolsystem_mode_from_spacetype()

int WM_toolsystem_mode_from_spacetype ( struct ViewLayer view_layer,
struct ScrArea area,
int  space_type 
)

◆ WM_toolsystem_ref_ensure()

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

◆ WM_toolsystem_ref_find()

struct bToolRef* WM_toolsystem_ref_find ( struct WorkSpace workspace,
const bToolKey tkey 
)

◆ WM_toolsystem_ref_from_context()

struct bToolRef* WM_toolsystem_ref_from_context ( struct bContext C)

◆ WM_toolsystem_ref_properties_ensure_ex()

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

◆ WM_toolsystem_ref_properties_ensure_idprops()

struct IDProperty* WM_toolsystem_ref_properties_ensure_idprops ( struct bToolRef tref)

◆ WM_toolsystem_ref_properties_get_ex()

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

◆ WM_toolsystem_ref_properties_get_idprops()

struct IDProperty* WM_toolsystem_ref_properties_get_idprops ( struct bToolRef tref)

◆ WM_toolsystem_ref_properties_init_for_keymap()

void WM_toolsystem_ref_properties_init_for_keymap ( struct bToolRef tref,
struct PointerRNA dst_ptr,
struct PointerRNA src_ptr,
struct wmOperatorType ot 
)

◆ WM_toolsystem_ref_set_by_id()

struct bToolRef* WM_toolsystem_ref_set_by_id ( struct bContext C,
const char *  name 
)

◆ WM_toolsystem_ref_set_by_id_ex()

struct bToolRef* WM_toolsystem_ref_set_by_id_ex ( struct bContext C,
struct WorkSpace workspace,
const bToolKey tkey,
const char *  name,
bool  cycle 
)

◆ WM_toolsystem_ref_set_from_runtime()

void WM_toolsystem_ref_set_from_runtime ( struct bContext C,
struct WorkSpace workspace,
struct bToolRef tref,
const struct bToolRef_Runtime tref_rt,
const char *  idname 
)

◆ WM_toolsystem_ref_sync_from_context()

void WM_toolsystem_ref_sync_from_context ( struct Main bmain,
struct WorkSpace workspace,
struct bToolRef tref 
)

◆ WM_toolsystem_refresh()

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

◆ WM_toolsystem_refresh_active()

void WM_toolsystem_refresh_active ( struct bContext C)

◆ WM_toolsystem_refresh_all()

void WM_toolsystem_refresh_all ( struct bContext C,
struct WorkSpace workspace 
)

◆ WM_toolsystem_refresh_screen_all()

void WM_toolsystem_refresh_screen_all ( struct Main bmain)

◆ WM_toolsystem_refresh_screen_area()

void WM_toolsystem_refresh_screen_area ( struct WorkSpace workspace,
struct ViewLayer view_layer,
struct ScrArea area 
)

◆ WM_toolsystem_refresh_screen_window()

void WM_toolsystem_refresh_screen_window ( struct wmWindow win)

◆ WM_toolsystem_reinit()

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

Definition at line 237 of file wm_toolsystem.c.

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

◆ WM_toolsystem_reinit_all()

void WM_toolsystem_reinit_all ( struct bContext C,
struct wmWindow win 
)

◆ WM_toolsystem_runtime_find()

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

Definition at line 94 of file wm_toolsystem.c.

References NULL, bToolRef::runtime, and WM_toolsystem_ref_find().

◆ WM_toolsystem_runtime_from_context()

struct bToolRef_Runtime* WM_toolsystem_runtime_from_context ( struct bContext C)

◆ WM_toolsystem_unlink()

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

◆ WM_toolsystem_unlink_all()

void WM_toolsystem_unlink_all ( struct bContext C,
struct WorkSpace workspace 
)

Operate on all active tools.

Definition at line 245 of file wm_toolsystem.c.

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

◆ WM_toolsystem_update_from_context()

void WM_toolsystem_update_from_context ( struct bContext C,
struct WorkSpace workspace,
struct ViewLayer view_layer,
struct ScrArea area 
)

◆ WM_toolsystem_update_from_context_view3d()

void WM_toolsystem_update_from_context_view3d ( struct bContext C)