diff options
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_image.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_image.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_viewer.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/texture.c | 2 |
10 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 6b8d9d1768e..bf50648fea2 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -128,7 +128,7 @@ struct Image *BKE_image_verify_viewer(int type, const char *name); void BKE_image_assign_ibuf(struct Image *ima, struct ImBuf *ibuf); /* called on frame change or before render */ -void BKE_image_user_calc_imanr(struct ImageUser *iuser, int cfra, int fieldnr); +void BKE_image_user_calc_frame(struct ImageUser *iuser, int cfra, int fieldnr); /* produce image export path */ int BKE_get_image_export_path(struct Image *im, const char *dest_dir, char *abs, int abs_size, char *rel, int rel_size); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index b9be4602345..ad7826ab9c4 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2214,7 +2214,7 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser) return BKE_image_acquire_ibuf(ima, iuser, NULL); } -void BKE_image_user_calc_imanr(ImageUser *iuser, int cfra, int fieldnr) +void BKE_image_user_calc_frame(ImageUser *iuser, int cfra, int fieldnr) { int imanr, len; diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index e740b355727..c882c8db6c6 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -592,7 +592,7 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v) if(ima->anim) { iuser->frames = IMB_anim_get_duration(ima->anim); - BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0); + BKE_image_user_calc_frame(iuser, scene->r.cfra, 0); } } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 986d8003e6e..6ba27870022 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -785,6 +785,7 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes } /*area (not region) level listener*/ +#if 0 // removed since BKE_image_user_calc_frame is now called in draw_bgpic because screen_ops doesnt call the notifier. void space_view3d_listener(struct ScrArea *area, struct wmNotifier *wmn) { if (wmn->category == NC_SCENE && wmn->data == ND_FRAME) { @@ -793,10 +794,11 @@ void space_view3d_listener(struct ScrArea *area, struct wmNotifier *wmn) if (v3d->bgpic && v3d->bgpic->ima) { Scene *scene = wmn->reference; - BKE_image_user_calc_imanr(&v3d->bgpic->iuser, scene->r.cfra, 0); + BKE_image_user_calc_frame(&v3d->bgpic->iuser, scene->r.cfra, 0); } } } +#endif /* only called once, from space/spacetypes.c */ void ED_spacetype_view3d(void) @@ -810,7 +812,7 @@ void ED_spacetype_view3d(void) st->new= view3d_new; st->free= view3d_free; st->init= view3d_init; - st->listener = space_view3d_listener; +// st->listener = space_view3d_listener; st->duplicate= view3d_duplicate; st->operatortypes= view3d_operatortypes; st->keymap= view3d_keymap; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 914344647bd..529b100c1d4 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1317,9 +1317,12 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) if(bgpic==NULL) return; ima= bgpic->ima; - - if(ima) + + if(ima) { + /* notifier can also call this however screen_ops.c */ + BKE_image_user_calc_frame(&bgpic->iuser, CFRA, 0); ibuf= BKE_image_get_ibuf(ima, &bgpic->iuser); + } if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL) ) return; if(ibuf->channels!=4) diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index c4d7e772c58..1c0ee2c416f 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -118,7 +118,7 @@ static void rna_ImageUser_update(Main *bmain, Scene *scene, PointerRNA *ptr) { ImageUser *iuser= ptr->data; - BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0); + BKE_image_user_calc_frame(iuser, scene->r.cfra, 0); } static EnumPropertyItem *rna_Image_source_itemf(bContext *C, PointerRNA *ptr, int *free) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c index a204f8df4b2..f209687d6a5 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c @@ -198,7 +198,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **in, b CompBuf *stackbuf= NULL; /* first set the right frame number in iuser */ - BKE_image_user_calc_imanr(iuser, rd->cfra, 0); + BKE_image_user_calc_frame(iuser, rd->cfra, 0); /* force a load, we assume iuser index will be set OK anyway */ if(ima->type==IMA_TYPE_MULTILAYER) diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c index 04383f478e9..7564b07523f 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c @@ -65,7 +65,7 @@ static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack * buf1= typecheck_compbuf(in[0]->data, CB_RGBA); buf2= typecheck_compbuf(in[1]->data, CB_RGBA); - BKE_image_user_calc_imanr(node->storage, rd->cfra, 0); + BKE_image_user_calc_frame(node->storage, rd->cfra, 0); /* always returns for viewer image, but we check nevertheless */ ibuf= BKE_image_get_ibuf(ima, node->storage); diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c index d0dcc5c6973..105037d3bfc 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c @@ -51,7 +51,7 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in, CompBuf *cbuf, *tbuf; int rectx, recty; - BKE_image_user_calc_imanr(node->storage, rd->cfra, 0); + BKE_image_user_calc_frame(node->storage, rd->cfra, 0); /* always returns for viewer image, but we check nevertheless */ ibuf= BKE_image_get_ibuf(ima, node->storage); diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c index 38ee8f73616..6aacf99a074 100644 --- a/source/blender/render/intern/source/texture.c +++ b/source/blender/render/intern/source/texture.c @@ -92,7 +92,7 @@ void init_render_texture(Render *re, Tex *tex) /* imap test */ if(tex->ima && ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { - BKE_image_user_calc_imanr(&tex->iuser, cfra, re?re->flag & R_SEC_FIELD:0); + BKE_image_user_calc_frame(&tex->iuser, cfra, re?re->flag & R_SEC_FIELD:0); } if(tex->type==TEX_PLUGIN) { |