diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-23 07:36:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-23 07:36:10 +0300 |
commit | 7ce38978aea12bd912f46eed836f8210ec0cf03e (patch) | |
tree | 4db374454b5f8c7e8f9a93a7782f477fff1a6fce /source/blender/windowmanager/intern | |
parent | 2e4f1b592f7d1b63ec012528997fab64f16c0416 (diff) |
WM: add tool property getter function
Matches 'ensure' functions but doesn't add data.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_toolsystem.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c index 3bef4e3482a..c6aa571b92a 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.c +++ b/source/blender/windowmanager/intern/wm_toolsystem.c @@ -897,6 +897,13 @@ IDProperty *WM_toolsystem_ref_properties_ensure_idprops(bToolRef *tref) return tref->properties; } +bool WM_toolsystem_ref_properties_get_ex(bToolRef *tref, const char *idname, StructRNA *type, PointerRNA *r_ptr) +{ + IDProperty *group = tref->properties; + IDProperty *prop = group ? IDP_GetPropertyFromGroup(group, idname) : NULL; + RNA_pointer_create(NULL, type, prop, r_ptr); + return (prop != NULL); +} void WM_toolsystem_ref_properties_ensure_ex(bToolRef *tref, const char *idname, StructRNA *type, PointerRNA *r_ptr) { |