From 9a35ad752e845129aa756778e7f502a5057b92bf Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Sat, 21 Apr 2018 19:30:56 +0200 Subject: Cleanup: Get rid of context in editor 'new' callback Requiring context means we can't easily create new editors to replace deprecated ones in versioning code. Think it's reasonable to give editors access to scene and area data for their initial setup though. They mostly need it for setting "the view", as in, scrolling values. Also did minor cleanup in top-bar creation function. --- source/blender/blenkernel/BKE_screen.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 2a25120ba8d..2736833a5ca 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -77,8 +77,9 @@ typedef struct SpaceType { int spaceid; /* unique space identifier */ int iconid; /* icon lookup for menus */ - /* initial allocation, after this WM will call init() too */ - struct SpaceLink *(*new)(const struct bContext *C); + /* Initial allocation, after this WM will call init() too. Some editors need + * area and scene data (e.g. frame range) to set their initial scrolling. */ + struct SpaceLink *(*new)(const struct ScrArea *, const struct Scene *); /* not free spacelink itself */ void (*free)(struct SpaceLink *); -- cgit v1.2.3