Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/bake.c
| Context not available. | |||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "IMB_imbuf_types.h" | #include "DNA_imbuf_types.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_colormanagement.h" | #include "IMB_colormanagement.h" | ||||
| Context not available. | |||||
| continue; | continue; | ||||
| ima = tface->tpage; | ima = tface->tpage; | ||||
| ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); | ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL, IMA_IBUF_IMA); | ||||
| if (ibuf == NULL) | if (ibuf == NULL) | ||||
| continue; | continue; | ||||
| Context not available. | |||||
| BKE_image_release_ibuf(bs->ima, bs->ibuf, NULL); | BKE_image_release_ibuf(bs->ima, bs->ibuf, NULL); | ||||
| bs->ima = ima; | bs->ima = ima; | ||||
| bs->ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); | bs->ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL, IMA_IBUF_IMA); | ||||
| /* note, these calls only free/fill contents of zspan struct, not zspan itself */ | /* note, these calls only free/fill contents of zspan struct, not zspan itself */ | ||||
| zbuf_free_span(bs->zspan); | zbuf_free_span(bs->zspan); | ||||
| zbuf_alloc_span(bs->zspan, bs->ibuf->x, bs->ibuf->y, R.clipcrop); | zbuf_alloc_span(bs->zspan, bs->ibuf->x, bs->ibuf->y, R.clipcrop); | ||||
| Context not available. | |||||
| /* baker uses this flag to detect if image was initialized */ | /* baker uses this flag to detect if image was initialized */ | ||||
| if ((R.r.bake_flag & R_BAKE_VCOL) == 0) { | if ((R.r.bake_flag & R_BAKE_VCOL) == 0) { | ||||
| for (ima = G.main->image.first; ima; ima = ima->id.next) { | for (ima = G.main->image.first; ima; ima = ima->id.next) { | ||||
| ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); | ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL, IMA_IBUF_IMA); | ||||
| ima->id.flag |= LIB_DOIT; | ima->id.flag |= LIB_DOIT; | ||||
| ima->flag &= ~IMA_USED_FOR_RENDER; | ima->flag &= ~IMA_USED_FOR_RENDER; | ||||
| if (ibuf) { | if (ibuf) { | ||||
| Context not available. | |||||
| for (ima = G.main->image.first; ima; ima = ima->id.next) { | for (ima = G.main->image.first; ima; ima = ima->id.next) { | ||||
| if ((ima->id.flag & LIB_DOIT) == 0) { | if ((ima->id.flag & LIB_DOIT) == 0) { | ||||
| ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); | ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL, IMA_IBUF_IMA); | ||||
| BakeImBufuserData *userdata; | BakeImBufuserData *userdata; | ||||
| if (ima->flag & IMA_USED_FOR_RENDER) | if (ima->flag & IMA_USED_FOR_RENDER) | ||||
| Context not available. | |||||