diff options
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 4 |
3 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index ecbd9a4033a..de171bc45f8 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -146,7 +146,7 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf, /* the frame number, even if we cant */ if (ima->source == IMA_SRC_SEQUENCE) { /* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */ - const int framenr = BKE_image_user_get_frame(iuser, CFRA, 0); + const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0); ofs += sprintf(str + ofs, ", Frame: %d", framenr); } @@ -430,7 +430,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, IMB_TC_RECORD_RUN); - BKE_image_user_calc_frame(iuser, scene->r.cfra, 0); + BKE_image_user_frame_calc(iuser, scene->r.cfra, 0); } } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index bbc12520978..58fbceb999d 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -833,7 +833,7 @@ static int image_open_exec(bContext *C, wmOperator *op) errno = 0; - ima = BKE_add_image_file(str); + ima = BKE_image_load_exists(str); if (!ima) { if (op->customdata) MEM_freeN(op->customdata); @@ -1150,7 +1150,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI /* TODO, better solution, if a 24bit image is painted onto it may contain alpha */ if (ibuf->userflags & IB_BITMAPDIRTY) { /* it has been painted onto */ /* checks each pixel, not ideal */ - ibuf->planes = BKE_alphatest_ibuf(ibuf) ? 32 : 24; + ibuf->planes = BKE_imbuf_alpha_test(ibuf) ? 32 : 24; } } @@ -1167,7 +1167,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI BKE_image_release_renderresult(scene, ima); } else { - if (BKE_write_ibuf_as(ibuf, simopts->filepath, &simopts->im_format, save_copy)) { + if (BKE_imbuf_write_as(ibuf, simopts->filepath, &simopts->im_format, save_copy)) { ok = TRUE; } } @@ -1528,7 +1528,7 @@ static int image_new_exec(bContext *C, wmOperator *op) if (!alpha) color[3] = 1.0f; - ima = BKE_add_image_size(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color); + ima = BKE_image_add_generated(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color); if (!ima) return OPERATOR_CANCELLED; @@ -2173,7 +2173,7 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot) /* identifiers */ ot->name = "Set Curves Point"; ot->idname = "IMAGE_OT_curves_point_set"; - ot->description = "Set black or white point for curves"; + ot->description = "Set black point or white point for curves"; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -2408,7 +2408,7 @@ void ED_image_update_frame(const Main *mainp, int cfra) if (tex->type == TEX_IMAGE && tex->ima) { if (ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { if (tex->iuser.flag & IMA_ANIM_ALWAYS) - BKE_image_user_calc_frame(&tex->iuser, cfra, 0); + BKE_image_user_frame_calc(&tex->iuser, cfra, 0); } } } @@ -2423,12 +2423,12 @@ void ED_image_update_frame(const Main *mainp, int cfra) BGpic *bgpic; for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) if (bgpic->iuser.flag & IMA_ANIM_ALWAYS) - BKE_image_user_calc_frame(&bgpic->iuser, cfra, 0); + BKE_image_user_frame_calc(&bgpic->iuser, cfra, 0); } else if (sa->spacetype == SPACE_IMAGE) { SpaceImage *sima = sa->spacedata.first; if (sima->iuser.flag & IMA_ANIM_ALWAYS) - BKE_image_user_calc_frame(&sima->iuser, cfra, 0); + BKE_image_user_frame_calc(&sima->iuser, cfra, 0); } else if (sa->spacetype == SPACE_NODE) { SpaceNode *snode = sa->spacedata.first; @@ -2440,7 +2440,7 @@ void ED_image_update_frame(const Main *mainp, int cfra) ImageUser *iuser = node->storage; if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) if (iuser->flag & IMA_ANIM_ALWAYS) - BKE_image_user_calc_frame(iuser, cfra, 0); + BKE_image_user_frame_calc(iuser, cfra, 0); } } } diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 447028b8bef..9e0f538056c 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -590,7 +590,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) ima = ED_space_image(sima); if (sima->iuser.flag & IMA_ANIM_ALWAYS) - BKE_image_user_calc_frame(&sima->iuser, scene->r.cfra, 0); + BKE_image_user_frame_calc(&sima->iuser, scene->r.cfra, 0); /* check if we have to set the image from the editmesh */ if (ima && (ima->source == IMA_SRC_VIEWER || sima->pin)) ; @@ -599,7 +599,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) struct BMEditMesh *em = me->edit_btmesh; int sloppy = 1; /* partially selected face is ok */ - if (scene_use_new_shading_nodes(scene)) { + if (BKE_scene_use_new_shading_nodes(scene)) { /* new shading system, get image from material */ BMFace *efa = BM_active_face_get(em->bm, sloppy); |