Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_image_api.c
| Context not available. | |||||
| iuser.scene = scene; | iuser.scene = scene; | ||||
| iuser.ok = 1; | iuser.ok = 1; | ||||
| ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock); | ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock, IMA_IBUF_IMA); | ||||
| if (ibuf == NULL) { | if (ibuf == NULL) { | ||||
| BKE_report(reports, RPT_ERROR, "Could not acquire buffer from image"); | BKE_report(reports, RPT_ERROR, "Could not acquire buffer from image"); | ||||
| Context not available. | |||||
| static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *reports) | static void rna_Image_save(Image *image, Main *bmain, bContext *C, ReportList *reports) | ||||
| { | { | ||||
| ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL); | ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL, IMA_IBUF_IMA); | ||||
| if (ibuf) { | if (ibuf) { | ||||
| char filename[FILE_MAX]; | char filename[FILE_MAX]; | ||||
| BLI_strncpy(filename, image->name, sizeof(filename)); | BLI_strncpy(filename, image->name, sizeof(filename)); | ||||
| Context not available. | |||||
| Image *image, Main *bmain, bContext *C, ReportList *reports, | Image *image, Main *bmain, bContext *C, ReportList *reports, | ||||
| int as_png, const char *data, int data_len) | int as_png, const char *data, int data_len) | ||||
| { | { | ||||
| ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL); | ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL, IMA_IBUF_IMA); | ||||
| if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) { | if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) { | ||||
| BKE_report(reports, RPT_ERROR, "Cannot pack edited image from disk, only as internal PNG"); | BKE_report(reports, RPT_ERROR, "Cannot pack edited image from disk, only as internal PNG"); | ||||
| Context not available. | |||||
| static void rna_Image_update(Image *image, ReportList *reports) | static void rna_Image_update(Image *image, ReportList *reports) | ||||
| { | { | ||||
| ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL); | ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL, IMA_IBUF_IMA); | ||||
| if (ibuf == NULL) { | if (ibuf == NULL) { | ||||
| BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2); | BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2); | ||||
| Context not available. | |||||
| iuser.framenr = frame; | iuser.framenr = frame; | ||||
| iuser.ok = true; | iuser.ok = true; | ||||
| ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock); | ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock, IMA_IBUF_IMA); | ||||
| if (ibuf == NULL || ibuf->rect == NULL) { | if (ibuf == NULL || ibuf->rect == NULL) { | ||||
| BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2); | BKE_reportf(reports, RPT_ERROR, "Image '%s' does not have any image data", image->id.name + 2); | ||||
| Context not available. | |||||