diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-02 08:39:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-02 08:39:20 +0300 |
commit | dce12293d0dbaf0ae1e2ea90dc46ae7e40763f31 (patch) | |
tree | b5d8d133e5b6fc150efd9389100882da28cd11f3 /source/blender/windowmanager/WM_toolsystem.h | |
parent | 0e7a592c3c16bfb77ca9410a49d00d416406bdec (diff) |
WM: generalize tool property initialization
Prepare for storing different kinds of properties in tools.
Diffstat (limited to 'source/blender/windowmanager/WM_toolsystem.h')
-rw-r--r-- | source/blender/windowmanager/WM_toolsystem.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_toolsystem.h b/source/blender/windowmanager/WM_toolsystem.h index f4505bef962..6203b9c80d1 100644 --- a/source/blender/windowmanager/WM_toolsystem.h +++ b/source/blender/windowmanager/WM_toolsystem.h @@ -40,6 +40,7 @@ struct wmOperatorType; struct PointerRNA; struct ScrArea; struct Main; +struct StructRNA; /* wm_toolsystem.c */ @@ -88,7 +89,11 @@ void WM_toolsystem_do_msg_notify_tag_refresh( struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val); struct IDProperty *WM_toolsystem_ref_properties_ensure_idprops(struct bToolRef *tref); -void WM_toolsystem_ref_properties_ensure(struct bToolRef *tref, struct wmOperatorType *ot, struct PointerRNA *ptr); +void WM_toolsystem_ref_properties_ensure_ex( + struct bToolRef *tref, const char *idname, struct StructRNA *type, struct PointerRNA *r_ptr); + +#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) void WM_toolsystem_ref_properties_init_for_keymap( struct bToolRef *tref, struct PointerRNA *dst_ptr, struct PointerRNA *src_ptr, struct wmOperatorType *ot); |