From b6acf0bb48e8d8e606a7b4b9c0d96337091c0bd4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 27 Feb 2010 13:27:06 +0000 Subject: python support for defining region drawing callbacks, while not directly related to operators, this means python can now make operators that draw in the 3D viewport interactively. nicer then 2.4x space handelers because you can register draw handelers to draw pre/post 3d space or in pixel space. --- source/blender/editors/include/ED_space_api.h | 1 + source/blender/editors/space_api/spacetypes.c | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h index 7f2effdd975..3529eddd6d9 100644 --- a/source/blender/editors/include/ED_space_api.h +++ b/source/blender/editors/include/ED_space_api.h @@ -69,6 +69,7 @@ void *ED_region_draw_cb_activate(struct ARegionType *, void *custumdata, int type); void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int); void ED_region_draw_cb_exit(struct ARegionType *, void *); +void *ED_region_draw_cb_customdata(void *handle); #endif /* ED_SPACE_API_H */ diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 9bfe3213587..a3fe29536a3 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -204,6 +204,11 @@ void ED_region_draw_cb_exit(ARegionType *art, void *handle) } } +void *ED_region_draw_cb_customdata(void *handle) +{ + return ((RegionDrawCB *)handle)->customdata; +} + void ED_region_draw_cb_draw(const bContext *C, ARegion *ar, int type) { RegionDrawCB *rdc; -- cgit v1.2.3