[Bf-blender-cvs] [25739ada0b0] blender2.8: Correct view3d_draw_bgpic_test declaration

Campbell Barton noreply at git.blender.org
Fri Jan 19 13:02:06 CET 2018


Commit: 25739ada0b09cbfa3a112627546c5450a09e0020
Author: Campbell Barton
Date:   Fri Jan 19 23:11:57 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB25739ada0b09cbfa3a112627546c5450a09e0020

Correct view3d_draw_bgpic_test declaration

Was extern, which got out of sync, move into header.

===================================================================

M	source/blender/draw/intern/draw_manager.c
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/editors/space_view3d/view3d_intern.h

===================================================================

diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 49e40316ede..9fe8145f6b3 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -3447,10 +3447,8 @@ void DRW_draw_render_loop_ex(
 		}
 	}
 
-	extern void view3d_draw_bgpic_test(Scene *scene, ARegion *ar, View3D *v3d,
-	                                   const bool do_foreground, const bool do_camera_frame);
 	if (do_bg_image) {
-		view3d_draw_bgpic_test(scene, ar, v3d, false, true);
+		ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, true);
 	}
 
 
@@ -3486,7 +3484,7 @@ void DRW_draw_render_loop_ex(
 	DRW_stats_reset();
 
 	if (do_bg_image) {
-		view3d_draw_bgpic_test(scene, ar, v3d, true, true);
+		ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, true, true);
 	}
 
 	if (G.debug_value > 20) {
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 77beb634d0d..87570d215e4 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -480,4 +480,11 @@ void ED_view3d_shade_update(struct Main *bmain, struct Scene *scene, struct View
 
 void ED_view3d_id_remap(struct View3D *v3d, const struct ID *old_id, struct ID *new_id);
 
+/* view3d_draw_legacy.c */
+/* Try avoid using these more move out of legacy. */
+void ED_view3d_draw_bgpic_test(
+        struct Scene *scene, const struct Depsgraph *depsgraph,
+        struct ARegion *ar, struct View3D *v3d,
+        const bool do_foreground, const bool do_camera_frame);
+
 #endif /* __ED_VIEW3D_H__ */
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index e44f03775a1..7cb362ffb92 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -774,9 +774,10 @@ static void view3d_draw_bgpic(Scene *scene, const Depsgraph *depsgraph,
 	}
 }
 
-void view3d_draw_bgpic_test(Scene *scene, const Depsgraph *depsgraph,
-                            ARegion *ar, View3D *v3d,
-                            const bool do_foreground, const bool do_camera_frame)
+void ED_view3d_draw_bgpic_test(
+        Scene *scene, const Depsgraph *depsgraph,
+        ARegion *ar, View3D *v3d,
+        const bool do_foreground, const bool do_camera_frame)
 {
 	RegionView3D *rv3d = ar->regiondata;
 
@@ -1547,7 +1548,7 @@ static void view3d_draw_objects(
 
 	/* important to do before clipping */
 	if (do_bgpic) {
-		view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, do_camera_frame);
+		ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, do_camera_frame);
 	}
 
 	if (rv3d->rflag & RV3D_CLIPPING) {
@@ -1657,7 +1658,7 @@ static void view3d_draw_objects(
 
 	/* important to do after clipping */
 	if (do_bgpic) {
-		view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, true, do_camera_frame);
+		ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, true, do_camera_frame);
 	}
 
 	/* cleanup */
@@ -1875,7 +1876,7 @@ static bool view3d_main_region_draw_engine(
 		Camera *cam = ED_view3d_camera_data_get(v3d, rv3d);
 		if (cam->flag & CAM_SHOW_BG_IMAGE) {
 			show_image = true;
-			view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, true);
+			ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, true);
 		}
 		else {
 			imm_draw_box_checker_2d(0, 0, ar->winx, ar->winy);
@@ -1883,7 +1884,7 @@ static bool view3d_main_region_draw_engine(
 	}
 
 	if (show_image) {
-		view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, true);
+		ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, false, true);
 	}
 	else {
 		imm_draw_box_checker_2d(0, 0, ar->winx, ar->winy);
@@ -1894,7 +1895,7 @@ static bool view3d_main_region_draw_engine(
 	type->render_to_view(rv3d->render_engine, C);
 
 	if (show_image) {
-		view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, true, true);
+		ED_view3d_draw_bgpic_test(scene, depsgraph, ar, v3d, true, true);
 	}
 
 	if (clip_border) {
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index 8897b473b98..df2e5315c39 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -233,10 +233,6 @@ void ED_view3d_draw_select_loop(
 void ED_view3d_draw_depth_loop(
         const struct EvaluationContext *eval_ctx, Scene *scene, ARegion *ar, View3D *v3d);
 
-void view3d_draw_bgpic_test(Scene *scene, const struct Depsgraph *depsgraph,
-                            ARegion *ar, View3D *v3d,
-                            const bool do_foreground, const bool do_camera_frame);
-
 void ED_view3d_after_add(ListBase *lb, Base *base, const short dflag);
 
 void view3d_update_depths_rect(struct ARegion *ar, struct ViewDepths *d, struct rcti *rect);



More information about the Bf-blender-cvs mailing list