Commit: 25a4363ed4f99e69b263e4669514be2f54be56e7
Author: Lukas Stockner
Date:   Mon Jun 11 11:16:51 2018 +0200
Branches: temp-udim-images
https://developer.blender.org/rB25a4363ed4f99e69b263e4669514be2f54be56e7

Rename IMA_SRC_UDIM to IMA_SRC_TILED

===================================================================

M       source/blender/blenkernel/BKE_image.h
M       source/blender/blenkernel/intern/bpath.c
M       source/blender/blenkernel/intern/image.c
M       source/blender/editors/space_image/image_buttons.c
M       source/blender/editors/space_image/image_draw.c
M       source/blender/editors/space_image/image_edit.c
M       source/blender/editors/space_image/image_ops.c
M       source/blender/makesrna/intern/rna_image.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_image.h 
b/source/blender/blenkernel/BKE_image.h
index 7b3aa3a3679..8ede9c3d88d 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -136,7 +136,7 @@ struct RenderResult;
 #define IMA_SRC_MOVIE       3
 #define IMA_SRC_GENERATED   4
 #define IMA_SRC_VIEWER      5
-#define IMA_SRC_UDIM        6
+#define IMA_SRC_TILED       6
 
 /* ima->type, how to handle/generate it */
 #define IMA_TYPE_IMAGE      0
diff --git a/source/blender/blenkernel/intern/bpath.c 
b/source/blender/blenkernel/intern/bpath.c
index 605ba1644f3..2f88f03096e 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -435,7 +435,7 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, 
BPathVisitor visit_cb, const int
                        Image *ima;
                        ima = (Image *)id;
                        if (BKE_image_has_packedfile(ima) == false || (flag & 
BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
-                               if (ELEM(ima->source, IMA_SRC_FILE, 
IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+                               if (ELEM(ima->source, IMA_SRC_FILE, 
IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                                        if (rewrite_path_fixed(ima->name, 
visit_cb, absbase, bpath_user_data)) {
                                                if (flag & 
BKE_BPATH_TRAVERSE_RELOAD_EDITED) {
                                                        if 
(!BKE_image_has_packedfile(ima) &&
diff --git a/source/blender/blenkernel/intern/image.c 
b/source/blender/blenkernel/intern/image.c
index a0de165441e..c19d60da04a 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2818,7 +2818,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int 
signal)
                case IMA_SIGNAL_USER_NEW_IMAGE:
                        if (iuser) {
                                iuser->ok = 1;
-                               if (ELEM(ima->source, IMA_SRC_FILE, 
IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+                               if (ELEM(ima->source, IMA_SRC_FILE, 
IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                                        if (ima->type == IMA_TYPE_MULTILAYER) {
                                                image_init_imageuser(ima, 
iuser);
                                        }
@@ -2951,7 +2951,7 @@ void BKE_image_multiview_index(Image *ima, ImageUser 
*iuser)
 /* and because rendered results use fake layer/passes, don't correct for wrong 
indices here */
 bool BKE_image_is_multilayer(Image *ima)
 {
-       if (ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+       if (ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                if (ima->type == IMA_TYPE_MULTILAYER) {
                        return true;
                }
@@ -3039,7 +3039,7 @@ void BKE_image_release_renderresult(Scene *scene, Image 
*ima)
 bool BKE_image_is_openexr(struct Image *ima)
 {
 #ifdef WITH_OPENEXR
-       if (ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+       if (ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                return BLI_testextensie(ima->name, ".exr");
        }
 #else
@@ -3887,7 +3887,7 @@ static void image_get_entry_and_index(Image *ima, 
ImageUser *iuser, int *r_entry
                        entry = iuser ? iuser->framenr : ima->lastframe;
                }
        }
-       else if (ima->source == IMA_SRC_UDIM) {
+       else if (ima->source == IMA_SRC_TILED) {
                entry = iuser? iuser->tile : 0;
        }
 
@@ -3941,7 +3941,7 @@ static ImBuf *image_get_cached_ibuf(Image *ima, ImageUser 
*iuser, int *r_entry,
                        ibuf = image_get_cached_ibuf_for_index_entry(ima, 
index, entry);
                }
        }
-       else if (ima->source == IMA_SRC_UDIM) {
+       else if (ima->source == IMA_SRC_TILED) {
                if (ELEM(ima->type, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER)) {
                        entry = iuser? iuser->tile : 0;
                        ibuf = image_get_cached_ibuf_for_index_entry(ima, 
index, entry);
@@ -4028,7 +4028,7 @@ static ImBuf *image_acquire_ibuf(Image *ima, ImageUser 
*iuser, void **r_lock)
                                ibuf = image_load_sequence_multilayer(ima, 
iuser, entry, entry);
                        }
                }
-               else if (ima->source == IMA_SRC_UDIM) {
+               else if (ima->source == IMA_SRC_TILED) {
                        if (ima->type == IMA_TYPE_IMAGE) {
                                /* regular files, ibufs in flipbook, allows 
saving */
                                ibuf = image_load_sequence_file(ima, iuser, 
entry, 0);
@@ -4390,7 +4390,7 @@ void BKE_image_user_file_path(ImageUser *iuser, Image 
*ima, char *filepath)
                BLI_strncpy(filepath, ima->name, FILE_MAX);
        }
 
-       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                char head[FILE_MAX], tail[FILE_MAX];
                unsigned short numlen;
 
@@ -4562,7 +4562,7 @@ bool BKE_image_is_animated(Image *image)
 /* Checks whether the image consists of multiple buffers. */
 bool BKE_image_has_multiple(Image *image)
 {
-       return ELEM(image->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, 
IMA_SRC_UDIM);
+       return ELEM(image->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, 
IMA_SRC_TILED);
 }
 
 bool BKE_image_is_dirty(Image *image)
diff --git a/source/blender/editors/space_image/image_buttons.c 
b/source/blender/editors/space_image/image_buttons.c
index 7709bebc436..68d380c8d97 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -112,7 +112,7 @@ static void image_info(Scene *scene, ImageUser *iuser, 
Image *ima, ImBuf *ibuf,
                if (ibuf->zbuf || ibuf->zbuf_float)
                        ofs += BLI_strncpy_rlen(str + ofs, IFACE_(" + Z"), len 
- ofs);
 
-               if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+               if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                        const char *file = BLI_last_slash(ibuf->name);
                        if (file == NULL)
                                file = ibuf->name;
diff --git a/source/blender/editors/space_image/image_draw.c 
b/source/blender/editors/space_image/image_draw.c
index 28dc108a4d8..cf8c9f6ca16 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -774,7 +774,7 @@ void draw_image_main(const bContext *C, ARegion *ar)
 
        /* draw the image or grid */
        if (ibuf == NULL) {
-               if (ima && ima->source == IMA_SRC_UDIM) {
+               if (ima && ima->source == IMA_SRC_TILED) {
                        draw_image_udim_grid(ar, sima, zoomx, zoomy, true);
                }
                else {
@@ -797,7 +797,7 @@ void draw_image_main(const bContext *C, ARegion *ar)
 
        ED_space_image_release_buffer(sima, ibuf, lock);
 
-       if (ima && ima->source == IMA_SRC_UDIM) {
+       if (ima && ima->source == IMA_SRC_TILED) {
                for (int t = 1; t < ima->num_tiles; t++) {
                        ibuf = ED_space_image_acquire_buffer(sima, &lock, t);
                        if (ibuf) {
diff --git a/source/blender/editors/space_image/image_edit.c 
b/source/blender/editors/space_image/image_edit.c
index 1d4397361be..e2a3698b017 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -156,7 +156,7 @@ void ED_space_image_get_size(SpaceImage *sima, int *width, 
int *height)
        ImBuf *ibuf;
        void *lock;
 
-       /* TODO(lukas): Support UDIMs with different sizes */
+       /* TODO(lukas): Support tiled images with different sizes */
        ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
 
        if (ibuf && ibuf->x > 0 && ibuf->y > 0) {
diff --git a/source/blender/editors/space_image/image_ops.c 
b/source/blender/editors/space_image/image_ops.c
index 735d8f74444..1fc09fb5e86 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -226,7 +226,7 @@ static int space_image_file_exists_poll(bContext *C)
                bool ret = false;
                char name[FILE_MAX];
 
-               /* TODO(lukas): Saving UDIMs */
+               /* TODO(lukas): Saving tiled images */
                ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
                if (ibuf) {
                        BLI_strncpy(name, ibuf->name, FILE_MAX);
@@ -1270,7 +1270,7 @@ static Image *image_open_single(
 
                if ((frame_seq_len > 1) && (ima->source == IMA_SRC_FILE)) {
                        if (frame_seq_ofs == 1001) {
-                               ima->source = IMA_SRC_UDIM;
+                               ima->source = IMA_SRC_TILED;
                                ima->num_tiles = frame_seq_len;
                        }
                        else {
@@ -1696,7 +1696,7 @@ static int save_image_options_init(Main *bmain, 
SaveImageOptions *simopts, Space
                                    const bool guess_path, const bool 
save_as_render)
 {
        void *lock;
-       /* TODO(lukas): Saving UDIMs */
+       /* TODO(lukas): Saving tiled images */
        ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
 
        if (ibuf) {
@@ -1882,7 +1882,7 @@ static bool save_image_doit(bContext *C, SpaceImage 
*sima, wmOperator *op, SaveI
 {
        Image *ima = ED_space_image(sima);
        void *lock;
-       /* TODO(lukas): Saving UDIMs */
+       /* TODO(lukas): Saving tiled images */
        ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
        Scene *scene;
        RenderResult *rr = NULL;
@@ -2325,7 +2325,7 @@ static int image_save_sequence_exec(bContext *C, 
wmOperator *op)
        if (sima->image == NULL)
                return OPERATOR_CANCELLED;
 
-       if (ELEM(sima->image->source, IMA_SRC_SEQUENCE, IMA_SRC_UDIM)) {
+       if (ELEM(sima->image->source, IMA_SRC_SEQUENCE, IMA_SRC_TILED)) {
                BKE_report(op->reports, RPT_ERROR, "Can only save sequence on 
image sequences");
                return OPERATOR_CANCELLED;
        }
@@ -2786,7 +2786,7 @@ static bool image_pack_test(bContext *C, wmOperator *op)
        if (!as_png && BKE_image_has_packedfile(ima))
                return 0;
 
-       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_UDIM)) {
+       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_TILED)) {
                BKE_report(op->reports, RPT_ERROR, "Packing movies or image 
sequences not supported");
                return 0;
        }
@@ -2887,7 +2887,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op)
        if (!ima || !BKE_image_has_packedfile(ima))
                return OPERATOR_CANCELLED;
 
-       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_UDIM)) {
+       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_TILED)) {
                BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image 
sequences not supported");
                return OPERATOR_CANCELLED;
        }
@@ -2915,7 +2915,7 @@ static int image_unpack_invoke(bContext *C, wmOperator 
*op, const wmEvent *UNUSE
        if (!ima || !BKE_image_has_packedfile(ima))
                return OPERATOR_CANCELLED;
 
-       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_UDIM)) {
+       if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE, IMA_SRC_TILED)) {
                BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image 
sequences not supported");
                return OPERATOR_CANCELLED;
        }
@@ -2989,7 +2989,7 @@ static int image_get_position(SpaceImage *sima, ARegion 
*ar, const int mval[2],
        /* If the image has tiles, shift the positions accordingly. */
 
        Image *image = ED_space_image(sima);
-       if (!image || imag

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to