Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-26 13:40:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-26 14:02:40 +0300
commitef96f36ee961e7f11556570da2b9cef0a08159f9 (patch)
tree2a6943daee3d11baa7f3a92a58eff72d48ea3609 /source/blender/editors
parent654ee398ff0e37f4d5f5c4df96b1d521e4796de4 (diff)
Move background images into the camera
This moves background images out of the 3D viewport, to be used only as camera reference images. For 3D viewport references, background images can be used, see: D2827 Some work is still needed (background option isn't working at the moment).
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_screen.h1
-rw-r--r--source/blender/editors/include/ED_view3d.h5
-rw-r--r--source/blender/editors/screen/screen_ops.c6
-rw-r--r--source/blender/editors/space_image/image_ops.c23
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c37
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c97
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c73
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h3
8 files changed, 92 insertions, 153 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 5db85d582fc..93786a484f2 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -230,6 +230,7 @@ int ED_operator_posemode_context(struct bContext *C);
int ED_operator_posemode(struct bContext *C);
int ED_operator_posemode_local(struct bContext *C);
int ED_operator_mask(struct bContext *C);
+int ED_operator_camera(struct bContext *C);
/* Cache display helpers */
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index b55703bff0e..341cdcdb40a 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -40,6 +40,7 @@ struct BPoint;
struct BaseLegacy;
struct BezTriple;
struct BoundBox;
+struct Camera;
struct Depsgraph;
struct EditBone;
struct EvaluationContext;
@@ -430,10 +431,6 @@ bool ED_view3d_camera_lock_autokey(
void ED_view3D_lock_clear(struct View3D *v3d);
-struct BGpic *ED_view3D_background_image_new(struct View3D *v3d);
-void ED_view3D_background_image_remove(struct View3D *v3d, struct BGpic *bgpic);
-void ED_view3D_background_image_clear(struct View3D *v3d);
-
#define VIEW3D_MARGIN 1.4f
#define VIEW3D_DIST_FALLBACK 1.0f
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index bc8aa756931..9f300ff0d3e 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -583,6 +583,12 @@ int ED_operator_mask(bContext *C)
return false;
}
+int ED_operator_camera(bContext *C)
+{
+ struct Camera *cam = CTX_data_pointer_get_type(C, "camera", &RNA_Camera).data;
+ return (cam != NULL);
+}
+
/* *************************** action zone operator ************************** */
/* operator state vars used:
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 4fab7b33dbe..dbefcf3d297 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -48,6 +48,7 @@
#include "BLT_translation.h"
+#include "DNA_camera_types.h"
#include "DNA_object_types.h"
#include "DNA_node_types.h"
#include "DNA_packedFile_types.h"
@@ -1309,21 +1310,23 @@ static int image_open_exec(bContext *C, wmOperator *op)
ED_space_image_set(sima, scene, obedit, ima);
iuser = &sima->iuser;
}
- else if (sa->spacetype == SPACE_VIEW3D) {
- View3D *v3d = sa->spacedata.first;
-
- for (BGpic *bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) {
- if (bgpic->ima == ima) {
- iuser = &bgpic->iuser;
- break;
- }
- }
- }
else {
Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
if (tex && tex->type == TEX_IMAGE) {
iuser = &tex->iuser;
}
+
+ if (iuser == NULL) {
+ Camera *cam = CTX_data_pointer_get_type(C, "camera", &RNA_Camera).data;
+ if (cam) {
+ for (CameraBGImage *bgpic = cam->bg_images.first; bgpic; bgpic = bgpic->next) {
+ if (bgpic->ima == ima) {
+ iuser = &bgpic->iuser;
+ break;
+ }
+ }
+ }
+ }
}
/* initialize because of new image */
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 549747f98d7..9fe35d57168 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -409,17 +409,6 @@ static SpaceLink *view3d_new(const bContext *C)
static void view3d_free(SpaceLink *sl)
{
View3D *vd = (View3D *) sl;
- BGpic *bgpic;
-
- for (bgpic = vd->bgpicbase.first; bgpic; bgpic = bgpic->next) {
- if (bgpic->source == V3D_BGPIC_IMAGE) {
- id_us_min((ID *)bgpic->ima);
- }
- else if (bgpic->source == V3D_BGPIC_MOVIE) {
- id_us_min((ID *)bgpic->clip);
- }
- }
- BLI_freelistN(&vd->bgpicbase);
if (vd->localvd) MEM_freeN(vd->localvd);
@@ -450,7 +439,6 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl)
{
View3D *v3do = (View3D *)sl;
View3D *v3dn = MEM_dupallocN(sl);
- BGpic *bgpic;
/* clear or remove stuff from old */
@@ -467,16 +455,6 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl)
v3dn->defmaterial = NULL;
- BLI_duplicatelist(&v3dn->bgpicbase, &v3do->bgpicbase);
- for (bgpic = v3dn->bgpicbase.first; bgpic; bgpic = bgpic->next) {
- if (bgpic->source == V3D_BGPIC_IMAGE) {
- id_us_plus((ID *)bgpic->ima);
- }
- else if (bgpic->source == V3D_BGPIC_MOVIE) {
- id_us_plus((ID *)bgpic->clip);
- }
- }
-
v3dn->properties_storage = NULL;
if (v3dn->fx_settings.dof)
v3dn->fx_settings.dof = MEM_dupallocN(v3do->fx_settings.dof);
@@ -1420,21 +1398,6 @@ static void view3d_id_remap(ScrArea *sa, SpaceLink *slink, ID *old_id, ID *new_i
v3d->ob_centre_bone[0] = '\0';
}
}
-
- if (ELEM(GS(old_id->name), ID_IM, ID_MC)) {
- for (BGpic *bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) {
- if ((ID *)bgpic->ima == old_id) {
- bgpic->ima = (Image *)new_id;
- id_us_min(old_id);
- id_us_plus(new_id);
- }
- if ((ID *)bgpic->clip == old_id) {
- bgpic->clip = (MovieClip *)new_id;
- id_us_min(old_id);
- id_us_plus(new_id);
- }
- }
- }
}
if (is_local) {
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 3680470c734..834c0390e2c 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -534,17 +534,18 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
const bool do_foreground, const bool do_camera_frame)
{
RegionView3D *rv3d = ar->regiondata;
- int fg_flag = do_foreground ? V3D_BGPIC_FOREGROUND : 0;
+ int fg_flag = do_foreground ? CAM_BGIMG_FLAG_FOREGROUND : 0;
+ if (v3d->camera == NULL || v3d->camera->type != OB_CAMERA) {
+ return;
+ }
+ Camera *cam = v3d->camera->data;
- for (BGpic *bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) {
+ for (CameraBGImage *bgpic = cam->bg_images.first; bgpic; bgpic = bgpic->next) {
bgpic->iuser.scene = scene; /* Needed for render results. */
- if ((bgpic->flag & V3D_BGPIC_FOREGROUND) != fg_flag)
+ if ((bgpic->flag & CAM_BGIMG_FLAG_FOREGROUND) != fg_flag)
continue;
- if ((bgpic->view == 0) || /* zero for any */
- (bgpic->view & (1 << rv3d->view)) || /* check agaist flags */
- (rv3d->persp == RV3D_CAMOB && bgpic->view == (1 << RV3D_VIEW_CAMERA)))
{
float image_aspect[2];
float x1, y1, x2, y2, centx, centy;
@@ -554,13 +555,13 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
Image *ima = NULL;
/* disable individual images */
- if ((bgpic->flag & V3D_BGPIC_DISABLED))
+ if ((bgpic->flag & CAM_BGIMG_FLAG_DISABLED))
continue;
ImBuf *ibuf = NULL;
ImBuf *freeibuf = NULL;
ImBuf *releaseibuf = NULL;
- if (bgpic->source == V3D_BGPIC_IMAGE) {
+ if (bgpic->source == CAM_BGIMG_SOURCE_IMAGE) {
ima = bgpic->ima;
if (ima == NULL)
continue;
@@ -577,11 +578,11 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
image_aspect[0] = ima->aspx;
image_aspect[1] = ima->aspy;
}
- else if (bgpic->source == V3D_BGPIC_MOVIE) {
+ else if (bgpic->source == CAM_BGIMG_SOURCE_MOVIE) {
/* TODO: skip drawing when out of frame range (as image sequences do above) */
MovieClip *clip = NULL;
- if (bgpic->flag & V3D_BGPIC_CAMERACLIP) {
+ if (bgpic->flag & CAM_BGIMG_FLAG_CAMERACLIP) {
if (scene->camera)
clip = BKE_object_movieclip_get(scene, scene->camera, true);
}
@@ -624,8 +625,8 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
if (ibuf->rect == NULL)
IMB_rect_from_float(ibuf);
- if (rv3d->persp == RV3D_CAMOB) {
-
+ BLI_assert(rv3d->persp == RV3D_CAMOB);
+ {
if (do_camera_frame) {
rctf vb;
ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &vb, false);
@@ -645,8 +646,8 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
/* so this has some sane way of working - this matches camera's shift _exactly_ */
{
const float max_dim = max_ff(x2 - x1, y2 - y1);
- const float xof_scale = bgpic->xof * max_dim;
- const float yof_scale = bgpic->yof * max_dim;
+ const float xof_scale = bgpic->offset[0] * max_dim;
+ const float yof_scale = bgpic->offset[1] * max_dim;
x1 += xof_scale;
y1 += yof_scale;
@@ -658,7 +659,7 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
centy = (y1 + y2) * 0.5f;
/* aspect correction */
- if (bgpic->flag & V3D_BGPIC_CAMERA_ASPECT) {
+ if (bgpic->flag & CAM_BGIMG_FLAG_CAMERA_ASPECT) {
/* apply aspect from clip */
const float w_src = ibuf->x * image_aspect[0];
const float h_src = ibuf->y * image_aspect[1];
@@ -671,7 +672,7 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
const float asp_dst = w_dst / h_dst;
if (fabsf(asp_src - asp_dst) >= FLT_EPSILON) {
- if ((asp_src > asp_dst) == ((bgpic->flag & V3D_BGPIC_CAMERA_CROP) != 0)) {
+ if ((asp_src > asp_dst) == ((bgpic->flag & CAM_BGIMG_FLAG_CAMERA_CROP) != 0)) {
/* fit X */
const float div = asp_src / asp_dst;
x1 = ((x1 - centx) * div) + centx;
@@ -686,29 +687,6 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
}
}
}
- else {
- float tvec[3];
- float sco[2];
- const float mval_f[2] = {1.0f, 0.0f};
- const float co_zero[3] = {0};
-
- /* calc window coord */
- float zfac = ED_view3d_calc_zfac(rv3d, co_zero, NULL);
- ED_view3d_win_to_delta(ar, mval_f, tvec, zfac);
- float fac = 1.0f / max_ff(fabsf(tvec[0]), max_ff(fabsf(tvec[1]), fabsf(tvec[2]))); /* largest abs axis */
- float asp = (float)ibuf->y / (float)ibuf->x;
-
- zero_v3(tvec);
- ED_view3d_project_float_v2_m4(ar, tvec, sco, rv3d->persmat);
-
- x1 = sco[0] + fac * (bgpic->xof - bgpic->size);
- y1 = sco[1] + asp * fac * (bgpic->yof - bgpic->size);
- x2 = sco[0] + fac * (bgpic->xof + bgpic->size);
- y2 = sco[1] + asp * fac * (bgpic->yof + bgpic->size);
-
- centx = (x1 + x2) / 2.0f;
- centy = (y1 + y2) / 2.0f;
- }
/* complete clip? */
rctf clip_rect;
@@ -762,18 +740,19 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
ED_region_pixelspace(ar);
gpuTranslate2f(centx, centy);
+ gpuScaleUniform(bgpic->scale);
gpuRotate2D(RAD2DEGF(-bgpic->rotation));
- if (bgpic->flag & V3D_BGPIC_FLIP_X) {
+ if (bgpic->flag & CAM_BGIMG_FLAG_FLIP_X) {
zoomx *= -1.0f;
x1 = x2;
}
- if (bgpic->flag & V3D_BGPIC_FLIP_Y) {
+ if (bgpic->flag & CAM_BGIMG_FLAG_FLIP_Y) {
zoomy *= -1.0f;
y1 = y2;
}
- float col[4] = {1.0f, 1.0f, 1.0f, 1.0f - bgpic->blend};
+ float col[4] = {1.0f, 1.0f, 1.0f, bgpic->alpha};
IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
immDrawPixelsTex(&state, x1 - centx, y1 - centy, ibuf->x, ibuf->y, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, ibuf->rect,
zoomx, zoomy, col);
@@ -794,13 +773,20 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
}
}
-static void view3d_draw_bgpic_test(Scene *scene, ARegion *ar, View3D *v3d,
- const bool do_foreground, const bool do_camera_frame)
+void view3d_draw_bgpic_test(Scene *scene, ARegion *ar, View3D *v3d,
+ const bool do_foreground, const bool do_camera_frame)
{
RegionView3D *rv3d = ar->regiondata;
- if ((v3d->flag & V3D_DISPBGPICS) == 0)
+ if ((rv3d->persp == RV3D_CAMOB) && v3d->camera && (v3d->camera->type == OB_CAMERA)) {
+ Camera *cam = v3d->camera->data;
+ if ((cam->flag & CAM_SHOW_BG_IMAGE) == 0) {
+ return;
+ }
+ }
+ else {
return;
+ }
/* disabled - mango request, since footage /w only render is quite useful
* and this option is easy to disable all background images at once */
@@ -1884,17 +1870,32 @@ static bool view3d_main_region_draw_engine(
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- if (v3d->flag & V3D_DISPBGPICS)
+ bool show_image = false;
+ {
+ Camera *cam = ED_view3d_camera_data_get(v3d, rv3d);
+ if (cam->flag & CAM_SHOW_BG_IMAGE) {
+ show_image = true;
+ view3d_draw_bgpic_test(scene, ar, v3d, false, true);
+ }
+ else {
+ imm_draw_box_checker_2d(0, 0, ar->winx, ar->winy);
+ }
+ }
+
+ if (show_image) {
view3d_draw_bgpic_test(scene, ar, v3d, false, true);
- else
+ }
+ else {
imm_draw_box_checker_2d(0, 0, ar->winx, ar->winy);
+ }
/* render result draw */
type = rv3d->render_engine->type;
type->render_to_view(rv3d->render_engine, C);
- if (v3d->flag & V3D_DISPBGPICS)
+ if (show_image) {
view3d_draw_bgpic_test(scene, ar, v3d, true, true);
+ }
if (clip_border) {
/* restore scissor as it was before */
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 84f31020c32..8172f29e359 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -34,6 +34,7 @@
#include <float.h>
#include "DNA_armature_types.h"
+#include "DNA_camera_types.h"
#include "DNA_curve_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@@ -4515,11 +4516,11 @@ void VIEW3D_OT_navigate(wmOperatorType *ot)
/* ******************** add background image operator **************** */
-static BGpic *background_image_add(bContext *C)
+static CameraBGImage *background_image_add(bContext *C)
{
- View3D *v3d = CTX_wm_view3d(C);
+ Camera *cam = CTX_data_pointer_get_type(C, "camera", &RNA_Camera).data;
- return ED_view3D_background_image_new(v3d);
+ return BKE_camera_background_image_new(cam);
}
static int background_image_add_exec(bContext *C, wmOperator *UNUSED(op))
@@ -4531,9 +4532,9 @@ static int background_image_add_exec(bContext *C, wmOperator *UNUSED(op))
static int background_image_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
- View3D *v3d = CTX_wm_view3d(C);
+ Camera *cam = CTX_data_pointer_get_type(C, "camera", &RNA_Camera).data;
Image *ima;
- BGpic *bgpic;
+ CameraBGImage *bgpic;
ima = (Image *)WM_operator_drop_load_path(C, op, ID_IM);
/* may be NULL, continue anyway */
@@ -4541,10 +4542,10 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, const wmEven
bgpic = background_image_add(C);
bgpic->ima = ima;
- v3d->flag |= V3D_DISPBGPICS;
-
- WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
-
+ cam->flag |= CAM_SHOW_BG_IMAGE;
+
+ WM_event_add_notifier(C, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, cam);
+
return OPERATOR_FINISHED;
}
@@ -4560,7 +4561,7 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot)
/* api callbacks */
ot->invoke = background_image_add_invoke;
ot->exec = background_image_add_exec;
- ot->poll = ED_operator_view3d_active;
+ ot->poll = ED_operator_camera;
/* flags */
ot->flag = OPTYPE_UNDO;
@@ -4576,21 +4577,22 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot)
/* ***** remove image operator ******* */
static int background_image_remove_exec(bContext *C, wmOperator *op)
{
- View3D *v3d = CTX_wm_view3d(C);
+ Camera *cam = CTX_data_pointer_get_type(C, "camera", &RNA_Camera).data;
const int index = RNA_int_get(op->ptr, "index");
- BGpic *bgpic_rem = BLI_findlink(&v3d->bgpicbase, index);
+ CameraBGImage *bgpic_rem = BLI_findlink(&cam->bg_images, index);
if (bgpic_rem) {
- if (bgpic_rem->source == V3D_BGPIC_IMAGE) {
+ if (bgpic_rem->source == CAM_BGIMG_SOURCE_IMAGE) {
id_us_min((ID *)bgpic_rem->ima);
}
- else if (bgpic_rem->source == V3D_BGPIC_MOVIE) {
+ else if (bgpic_rem->source == CAM_BGIMG_SOURCE_MOVIE) {
id_us_min((ID *)bgpic_rem->clip);
}
- ED_view3D_background_image_remove(v3d, bgpic_rem);
+ BKE_camera_background_image_remove(cam, bgpic_rem);
+
+ WM_event_add_notifier(C, NC_CAMERA | ND_DRAW_RENDER_VIEWPORT, cam);
- WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
return OPERATOR_FINISHED;
}
else {
@@ -4608,7 +4610,7 @@ void VIEW3D_OT_background_image_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec = background_image_remove_exec;
- ot->poll = ED_operator_view3d_active;
+ ot->poll = ED_operator_camera;
/* flags */
ot->flag = 0;
@@ -5186,43 +5188,6 @@ void ED_view3d_lastview_store(RegionView3D *rv3d)
}
}
-BGpic *ED_view3D_background_image_new(View3D *v3d)
-{
- BGpic *bgpic = MEM_callocN(sizeof(BGpic), "Background Image");
-
- bgpic->rotation = 0.0f;
- bgpic->size = 5.0f;
- bgpic->blend = 0.5f;
- bgpic->iuser.fie_ima = 2;
- bgpic->iuser.ok = 1;
- bgpic->view = 0; /* 0 for all */
- bgpic->flag |= V3D_BGPIC_EXPANDED;
-
- BLI_addtail(&v3d->bgpicbase, bgpic);
-
- return bgpic;
-}
-
-void ED_view3D_background_image_remove(View3D *v3d, BGpic *bgpic)
-{
- BLI_remlink(&v3d->bgpicbase, bgpic);
-
- MEM_freeN(bgpic);
-}
-
-void ED_view3D_background_image_clear(View3D *v3d)
-{
- BGpic *bgpic = v3d->bgpicbase.first;
-
- while (bgpic) {
- BGpic *next_bgpic = bgpic->next;
-
- ED_view3D_background_image_remove(v3d, bgpic);
-
- bgpic = next_bgpic;
- }
-}
-
void ED_view3D_lock_clear(View3D *v3d)
{
v3d->ob_centre = NULL;
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index cdba5ce8b81..6cdc9b02da6 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -231,6 +231,9 @@ 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, ARegion *ar, View3D *v3d,
+ const bool do_foreground, const bool do_camera_frame);
+
void ED_view3d_after_add(ListBase *lb, BaseLegacy *base, const short dflag);
void view3d_update_depths_rect(struct ARegion *ar, struct ViewDepths *d, struct rcti *rect);