From 7b6af843c2bdef9c9ab6d00100d93192a8e769c0 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 8 Jun 2018 12:16:37 +0200 Subject: Cleanup: getting rid of G.main. Sometimes one needs a *lot* of changes for a single G.main... :/ --- source/blender/editors/include/ED_view3d.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/include/ED_view3d.h') 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]); -- cgit v1.2.3