Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_preview.c
| Show First 20 Lines • Show All 1,336 Lines • ▼ Show 20 Lines | if (idtype == ID_IM) { | ||||
| /* setup dummy image user */ | /* setup dummy image user */ | ||||
| iuser.ok = iuser.framenr = 1; | iuser.ok = iuser.framenr = 1; | ||||
| iuser.scene = sp->scene; | iuser.scene = sp->scene; | ||||
| /* elubie: this needs to be changed: here image is always loaded if not | /* elubie: this needs to be changed: here image is always loaded if not | ||||
| * already there. Very expensive for large images. Need to find a way to | * already there. Very expensive for large images. Need to find a way to | ||||
| * only get existing ibuf */ | * only get existing ibuf */ | ||||
| ibuf = BKE_image_acquire_ibuf(ima, &iuser, NULL); | ibuf = BKE_image_acquire_ibuf(ima, &iuser, NULL); | ||||
| if (ibuf == NULL || ibuf->rect == NULL) { | if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) { | ||||
| BKE_image_release_ibuf(ima, ibuf, NULL); | BKE_image_release_ibuf(ima, ibuf, NULL); | ||||
| return; | return; | ||||
| } | } | ||||
| icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect); | icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect); | ||||
| *do_update = true; | *do_update = true; | ||||
| ▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines | |||||