Code Cleanup: replace checks for ima->source with BKE_image_is_animated
[blender.git] / source / blender / editors / space_image / image_buttons.c
index 3ff404d38a9dd73ef90f6ea19da64942e3c325e4..003476882f76d5406c272b52370fcc39b002f13f 100644 (file)
@@ -701,7 +701,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
                                        col = uiLayoutColumn(split, FALSE);
                                        /* XXX Why only display fields_per_frame only for video image types?
                                         *     And why allow fields for non-video image types at all??? */
-                                       if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+                                       if (BKE_image_is_animated(ima)) {
                                                uiLayout *subsplit = uiLayoutSplit(col, 0.0f, FALSE);
                                                uiLayout *subcol = uiLayoutColumn(subsplit, FALSE);
                                                uiItemR(subcol, &imaptr, "use_fields", 0, NULL, ICON_NONE);
@@ -717,7 +717,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
                                }
                        }
 
-                       if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+                       if (BKE_image_is_animated(ima)) {
                                uiItemS(layout);
 
                                split = uiLayoutSplit(layout, 0.0f, FALSE);