Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/image.c
| Show First 20 Lines • Show All 3,079 Lines • ▼ Show 20 Lines | struct anim *openanim(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE]) | ||||
| struct anim *anim; | struct anim *anim; | ||||
| struct ImBuf *ibuf; | struct ImBuf *ibuf; | ||||
| anim = IMB_open_anim(name, flags, streamindex, colorspace); | anim = IMB_open_anim(name, flags, streamindex, colorspace); | ||||
| if (anim == NULL) { | if (anim == NULL) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE); | ibuf = IMB_anim_absolute(anim, 0, IMB_TC_NONE, IMB_PROXY_NONE, IMB_DOWNSCALE_NONE); | ||||
| if (ibuf == NULL) { | if (ibuf == NULL) { | ||||
| if (BLI_exists(name)) { | if (BLI_exists(name)) { | ||||
| printf("not an anim: %s\n", name); | printf("not an anim: %s\n", name); | ||||
| } | } | ||||
| else { | else { | ||||
| printf("anim file doesn't exist: %s\n", name); | printf("anim file doesn't exist: %s\n", name); | ||||
| } | } | ||||
| IMB_free_anim(anim); | IMB_free_anim(anim); | ||||
| ▲ Show 20 Lines • Show All 1,195 Lines • ▼ Show 20 Lines | if (ia->anim) { | ||||
| int fra = frame - 1; | int fra = frame - 1; | ||||
| if (fra < 0) { | if (fra < 0) { | ||||
| fra = 0; | fra = 0; | ||||
| } | } | ||||
| if (fra > (dur - 1)) { | if (fra > (dur - 1)) { | ||||
| fra = dur - 1; | fra = dur - 1; | ||||
| } | } | ||||
| ibuf = IMB_makeSingleUser(IMB_anim_absolute(ia->anim, fra, IMB_TC_RECORD_RUN, IMB_PROXY_NONE)); | ibuf = IMB_makeSingleUser( | ||||
| IMB_anim_absolute(ia->anim, fra, IMB_TC_RECORD_RUN, IMB_PROXY_NONE, IMB_DOWNSCALE_NONE)); | |||||
| if (ibuf) { | if (ibuf) { | ||||
| image_init_after_load(ima, iuser, ibuf); | image_init_after_load(ima, iuser, ibuf); | ||||
| } | } | ||||
| else { | else { | ||||
| tile->ok = 0; | tile->ok = 0; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,634 Lines • Show Last 20 Lines | |||||