diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-08 13:16:37 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-08 13:17:22 +0300 |
commit | 7b6af843c2bdef9c9ab6d00100d93192a8e769c0 (patch) | |
tree | 1dae0407c639733739a2e281547f54d8e8a93614 /source/blender/editors/include | |
parent | 55606dbdbcd33fb8ba2ee41284fc1c5c35977815 (diff) |
Cleanup: getting rid of G.main.
Sometimes one needs a *lot* of changes for a single G.main... :/
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_object.h | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 13 | ||||
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 31a03f336a9..ade68de6d24 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -140,7 +140,7 @@ void ED_object_wpaintmode_exit_ex(struct Object *ob); void ED_object_wpaintmode_exit(struct bContext *C); void ED_object_sculptmode_enter_ex( - struct Scene *scene, struct Object *ob, + struct Main *bmain, struct Scene *scene, struct Object *ob, struct ReportList *reports); void ED_object_sculptmode_enter(struct bContext *C, struct ReportList *reports); void ED_object_sculptmode_exit_ex( diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 5110dd1a3f6..b1b1c5d1612 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -70,6 +70,7 @@ enum eGPUFXFlags; /* for derivedmesh drawing callbacks, for view3d_select, .... */ typedef struct ViewContext { + struct Main *bmain; struct Scene *scene; struct Object *obact; struct Object *obedit; @@ -298,12 +299,12 @@ int ED_view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float unsigned int ED_view3d_backbuf_sample(struct ViewContext *vc, int x, int y); bool ED_view3d_autodist( - struct Scene *scene, struct ARegion *ar, struct View3D *v3d, + struct Main *bmain, struct Scene *scene, struct ARegion *ar, struct View3D *v3d, const int mval[2], float mouse_worldloc[3], const bool alphaoverride, const float fallback_depth_pt[3]); /* only draw so ED_view3d_autodist_simple can be called many times after */ -void ED_view3d_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode); +void ED_view3d_autodist_init(struct Main *bmain, struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode); bool ED_view3d_autodist_simple(struct ARegion *ar, const int mval[2], float mouse_worldloc[3], int margin, float *force_depth); bool ED_view3d_autodist_depth(struct ARegion *ar, const int mval[2], int margin, float *depth); bool ED_view3d_autodist_depth_seg(struct ARegion *ar, const int mval_sta[2], const int mval_end[2], int margin, float *depth); @@ -359,7 +360,7 @@ struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d); void ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat); bool ED_view3d_context_activate(struct bContext *C); -void ED_view3d_draw_offscreen_init(struct Scene *scene, struct View3D *v3d); +void ED_view3d_draw_offscreen_init(struct Main *bmain, struct Scene *scene, struct View3D *v3d); void ED_view3d_draw_offscreen( struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int winx, int winy, float viewmat[4][4], float winmat[4][4], bool do_bgpic, bool do_sky, bool is_persp, const char *viewname, @@ -382,12 +383,14 @@ enum { }; struct ImBuf *ED_view3d_draw_offscreen_imbuf( - struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, + struct Main *bmain, struct Scene *scene, + struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag, unsigned int draw_flags, int alpha_mode, int samples, const char *viewname, struct GPUFX *fx, struct GPUOffScreen *ofs, char err_out[256]); struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple( - struct Scene *scene, struct Object *camera, int width, int height, + struct Main *bmain, struct Scene *scene, + struct Object *camera, int width, int height, unsigned int flag, unsigned int draw_flags, int drawtype, int alpha_mode, int samples, const char *viewname, struct GPUFX *fx, struct GPUOffScreen *ofs, char err_out[256]); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index b6e75893431..0fd253e9fec 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -807,7 +807,7 @@ void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers) * be used to reinitialize some internal state if user preferences change. */ void UI_init(void); -void UI_init_userdef(void); +void UI_init_userdef(struct Main *bmain); void UI_reinit_font(void); void UI_reinit_gl_state(void); void UI_exit(void); |