diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-12 18:26:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-12 18:26:38 +0300 |
commit | 760e79d8092a121b9d0e1cd02019478c808acae9 (patch) | |
tree | dfd5050507b6a3c87a7314abd805fc792083c947 /source/blender/python/intern/bpy_rna_callback.c | |
parent | ec4ce908db6124037c4dfd927f22a9eec0ba4d52 (diff) |
WM: rename BKE_regiontype_from_id
This returns the first as a fallback, causing confusing usage.
Renamed and added a version of the function that doesn't.
Diffstat (limited to 'source/blender/python/intern/bpy_rna_callback.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_callback.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c index b1ac6bee608..0a7e9c3b4c9 100644 --- a/source/blender/python/intern/bpy_rna_callback.c +++ b/source/blender/python/intern/bpy_rna_callback.c @@ -226,7 +226,7 @@ PyObject *pyrna_callback_classmethod_add(PyObject *UNUSED(self), PyObject *args) } else { SpaceType *st = BKE_spacetype_from_id(spaceid); - ARegionType *art = BKE_regiontype_from_id(st, cb_regiontype); + ARegionType *art = BKE_regiontype_from_id_or_first(st, cb_regiontype); handle = ED_region_draw_cb_activate(art, cb_region_draw, (void *)args, cb_event); Py_INCREF(args); @@ -289,7 +289,7 @@ PyObject *pyrna_callback_classmethod_remove(PyObject *UNUSED(self), PyObject *ar } else { SpaceType *st = BKE_spacetype_from_id(spaceid); - ARegionType *art = BKE_regiontype_from_id(st, cb_regiontype); + ARegionType *art = BKE_regiontype_from_id_or_first(st, cb_regiontype); ED_region_draw_cb_exit(art, handle); } |