Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_preview.c
| Context not available. | |||||
| #include "BKE_light.h" | #include "BKE_light.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "BKE_movieclip.h" | |||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| Context not available. | |||||
| BKE_image_release_ibuf(ima, ibuf, NULL); | BKE_image_release_ibuf(ima, ibuf, NULL); | ||||
| } | } | ||||
| else if (idtype == ID_MC) { | |||||
| MovieClip *clip = (MovieClip *)id; | |||||
| ImBuf *ibuf = NULL; | |||||
| MovieClipUser mcuser; | |||||
| if (clip == NULL) { | |||||
| return; | |||||
| } | |||||
| /* setup dummy image user */ | |||||
| mcuser.framenr = 1; | |||||
| mcuser.scene = sp->scene; | |||||
| /* 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 | |||||
| * only get existing ibuf */ | |||||
| ibuf = BKE_movieclip_get_ibuf(clip, &mcuser); | |||||
| if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) { | |||||
| IMB_freeImBuf(ibuf); | |||||
| return; | |||||
| } | |||||
| icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect); | |||||
| *do_update = true; | |||||
| IMB_freeImBuf(ibuf); | |||||
| } | |||||
| else if (idtype == ID_BR) { | else if (idtype == ID_BR) { | ||||
| Brush *br = (Brush *)id; | Brush *br = (Brush *)id; | ||||
| Context not available. | |||||