diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-21 22:17:31 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-21 22:17:31 +0300 |
commit | f2f734c9a5668e370253ff550de9a240bb142466 (patch) | |
tree | 0e1d5614150354f0a35694a2e0953ee2adb2e8cd /source | |
parent | 93c367dc29d1c3735b136664b3956fbc9d022799 (diff) |
2.5
View3D: background image buttons back. Again nice
to use blend or size or other sliders for live
updates. :)
Note that 'load' doesnt work yet, the operator for
image load only does space-image now.
Also note that with a built-in 4-split option, we
can also encode a way to show 3 different pics.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/ED_image.h | 6 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_panels.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 99a8a02e7cf..566105109b2 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -30,6 +30,9 @@ struct SpaceImage; struct bContext; +struct Image; +struct ImageUser; +struct uiBlock; /* space_image.c, exported for transform */ struct Image *ED_space_image(struct SpaceImage *sima); @@ -50,6 +53,9 @@ int ED_space_image_show_paint(struct SpaceImage *sima); int ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit); int ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit); +void ED_image_uiblock_panel(const struct bContext *C, struct uiBlock *block, struct Image **ima_pp, + struct ImageUser *iuser, short redraw, short imagechanged); + /* image_render.c, export for screen_ops.c, render operator */ void ED_space_image_output(struct bContext *C); diff --git a/source/blender/editors/space_image/image_panels.c b/source/blender/editors/space_image/image_panels.c index cfca3b04ff9..c0fe8afd036 100644 --- a/source/blender/editors/space_image/image_panels.c +++ b/source/blender/editors/space_image/image_panels.c @@ -1229,7 +1229,7 @@ static void uiblock_layer_pass_arrow_buttons(uiBlock *block, RenderResult *rr, I static int packdummy=0; /* The general Image panel with the loadsa callbacks! */ -void uiblock_image_panel(const bContext *C, uiBlock *block, Image **ima_pp, ImageUser *iuser, +void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, ImageUser *iuser, short redraw, short imagechanged) { Scene *scene= CTX_data_scene(C); @@ -1410,7 +1410,7 @@ static void image_panel_properties(const bContext *C, ARegion *ar) uiBlockSetHandleFunc(block, do_image_panel_events, NULL); /* note, it draws no bottom half in facemode, for vertex buttons */ - uiblock_image_panel(C, block, &sima->image, &sima->iuser, B_REDR, B_REDR); + ED_image_uiblock_panel(C, block, &sima->image, &sima->iuser, B_REDR, B_REDR); image_editvertex_buts(C, block); uiEndBlock(C, block); diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index d449b0cc774..668e9bb748b 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -77,10 +77,11 @@ #include "ED_armature.h" #include "ED_curve.h" -#include "ED_particle.h" +#include "ED_image.h" #include "ED_keyframing.h" #include "ED_mesh.h" #include "ED_object.h" +#include "ED_particle.h" #include "ED_screen.h" #include "ED_types.h" #include "ED_util.h" @@ -1303,6 +1304,7 @@ static void view3d_panel_background(const bContext *C, ARegion *ar, short cntrl) block= uiBeginBlock(C, ar, "view3d_panel_background", UI_EMBOSS, UI_HELV); if(uiNewPanel(C, ar, block, "Background Image", "View3d", 340, 10, 318, 204)==0) return; + uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); if(v3d->flag & V3D_DISPBGPIC) { if(v3d->bgpic==NULL) { @@ -1327,7 +1329,7 @@ static void view3d_panel_background(const bContext *C, ARegion *ar, short cntrl) uiDefButF(block, NUM, B_REDR, "X Offset:", 10, 205, 150, 20, &v3d->bgpic->xof, -250.0*v3d->grid,250.0*v3d->grid, 10, 2, "Set the horizontal offset of the background image"); uiDefButF(block, NUM, B_REDR, "Y Offset:", 160, 205, 150, 20, &v3d->bgpic->yof, -250.0*v3d->grid,250.0*v3d->grid, 10, 2, "Set the vertical offset of the background image"); -// XXX uiblock_image_panel(block, &v3d->bgpic->ima, &v3d->bgpic->iuser, B_REDR, B_REDR); + ED_image_uiblock_panel(C, block, &v3d->bgpic->ima, &v3d->bgpic->iuser, B_REDR, B_REDR); uiBlockEndAlign(block); } uiEndBlock(C, block); |