[Bf-blender-cvs] [cf1054b] multiview: Support builds without EXR

Campbell Barton noreply at git.blender.org
Mon Nov 24 12:22:55 CET 2014


Commit: cf1054bb7507d0c9027f97a2a4469d0d51099702
Author: Campbell Barton
Date:   Mon Nov 24 12:23:05 2014 +0100
Branches: multiview
https://developer.blender.org/rBcf1054bb7507d0c9027f97a2a4469d0d51099702

Support builds without EXR

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

M	source/blender/blenkernel/intern/image.c
M	source/blender/imbuf/intern/openexr/openexr_multi.h
M	source/blender/imbuf/intern/openexr/openexr_stub.cpp

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

diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 66f55c7..4e2da68 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2780,6 +2780,8 @@ bool BKE_image_is_openexr(struct Image *ima)
 	if (ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_SEQUENCE)) {
 		return BLI_testextensie(ima->name, ".exr");
 	}
+#else
+	UNUSED_VARS(ima);
 #endif
 	return false;
 }
@@ -2841,6 +2843,8 @@ bool BKE_image_save_openexr_multiview(Image *ima, ImBuf *ibuf, const char *filep
 }
 
 /**************************** multiview load openexr *********************************/
+
+#ifdef WITH_OPENEXR
 static void image_add_view_cb(void *base, const char *str)
 {
 	Image *ima = base;
@@ -2894,6 +2898,7 @@ static void image_add_buffer_cb(void *base, const char *str, ImBuf *ibuf, const
 	image_assign_ibuf(ima, ibuf, id, frame);
 	IMB_freeImBuf(ibuf);
 }
+#endif  /* WITH_OPENEXR */
 
 static void image_update_multiview_flags(Image *ima)
 {
diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h
index 689138d..45ab0ed 100644
--- a/source/blender/imbuf/intern/openexr/openexr_multi.h
+++ b/source/blender/imbuf/intern/openexr/openexr_multi.h
@@ -65,20 +65,23 @@ void    IMB_exrtile_write_channels(void *handle, int partx, int party, int level
 void    IMB_exrmultiview_write_channels(void *handle, const char *viewname);
 void    IMB_exr_clear_channels(void *handle);
 
-void    IMB_exr_multilayer_convert(void *handle, void *base,
-                                   void * (*addview)(void *base, const char *str),
-                                   void * (*addlayer)(void *base, const char *str),
-                                   void (*addpass)(void *base, void *lay, const char *str, float *rect, int totchan,
-                                                   const char *chan_id, const char *view));
-
-void    IMB_exr_multiview_convert(void *handle, void *base,
-                                  void (*addview)(void *base, const char *str),
-                                  void (*addbuffer)(void *base, const char *str, struct ImBuf *ibuf, const int frame),
-                                  const int frame);
-
-bool    IMB_exr_multiview_save (struct ImBuf *ibuf, const char *name, const int flags, const size_t totviews,
-                                const char * (*getview)(void *base, size_t view_id),
-                                struct ImBuf * (*getbuffer)(void *base, const size_t view_id));
+void    IMB_exr_multilayer_convert(
+        void *handle, void *base,
+        void * (*addview)(void *base, const char *str),
+        void * (*addlayer)(void *base, const char *str),
+        void (*addpass)(void *base, void *lay, const char *str, float *rect, int totchan,
+                        const char *chan_id, const char *view));
+
+void    IMB_exr_multiview_convert(
+        void *handle, void *base,
+        void (*addview)(void *base, const char *str),
+        void (*addbuffer)(void *base, const char *str, struct ImBuf *ibuf, const int frame),
+        const int frame);
+
+bool    IMB_exr_multiview_save(
+        struct ImBuf *ibuf, const char *name, const int flags, const size_t totviews,
+        const char * (*getview)(void *base, size_t view_id),
+        struct ImBuf * (*getbuffer)(void *base, const size_t view_id));
 
 void    IMB_exr_close(void *handle);
 
diff --git a/source/blender/imbuf/intern/openexr/openexr_stub.cpp b/source/blender/imbuf/intern/openexr/openexr_stub.cpp
index 178aa9e..d45bfec 100644
--- a/source/blender/imbuf/intern/openexr/openexr_stub.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_stub.cpp
@@ -31,7 +31,7 @@
 
 #include "openexr_api.h"
 #include "openexr_multi.h"
-
+#include "BLI_utildefines.h"  /* UNUSED_VARS */
 
 void   *IMB_exr_get_handle          (void) {return NULL;}
 void   *IMB_exr_get_handle_name     (const char *name) {(void)name; return NULL;}
@@ -42,36 +42,40 @@ int     IMB_exr_begin_write         (void *handle, const char *filename, int wid
 void    IMB_exrtile_begin_write     (void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley) { (void)handle; (void)filename; (void)mipmap; (void)width; (void)height; (void)tilex; (void)tiley; }
 
 void    IMB_exr_set_channel         (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)passname; (void)xstride; (void)ystride; (void)rect; }
-float  *IMB_exr_channel_rect        (void *handle, const char *layname, const char *passname, const char *view) { (void)handle; (void)layname; (void)passname; (void)view; }
+float  *IMB_exr_channel_rect        (void *handle, const char *layname, const char *passname, const char *view) { (void)handle; (void)layname; (void)passname; (void)view; return NULL; }
 
 void    IMB_exr_read_channels       (void *handle) { (void)handle; }
 void    IMB_exr_write_channels      (void *handle) { (void)handle; }
-void    IMB_exrtile_write_channels  (void *handle, int partx, int party, int level, int view) { (void)handle; (void)partx; (void)party; (void)level; (void)view; }
-void    IMB_exrmultiview_write_channels  (void *handle) { (void)handle; }
+void    IMB_exrtile_write_channels  (void *handle, int partx, int party, int level, const char *viewname) { UNUSED_VARS((void)handle, partx, party, level, viewname); }
+void    IMB_exrmultiview_write_channels(void *handle, const char *viewname) { UNUSED_VARS(handle, viewname); }
 void    IMB_exr_clear_channels  (void *handle) { (void)handle; }
 
-void    IMB_exr_multilayer_convert  (void *handle, void *base,
-                                     void * (*addlayer)(void *base, const char *str),
-                                     void (*addpass)(void *base, void *lay, const char *str, float *rect, int totchan, const char *chan_id, const char *view))
+void    IMB_exr_multilayer_convert(
+        void *handle, void *base,
+        void * (*addview)(void *base, const char *str),
+        void * (*addlayer)(void *base, const char *str),
+        void (*addpass)(void *base, void *lay, const char *str, float *rect, int totchan,
+                        const char *chan_id, const char *view))
 {
-	(void)handle; (void)base; (void)addlayer; (void)addpass;
+	UNUSED_VARS(handle, base, addview, addlayer, addpass);
 }
 
 void    IMB_exr_multiview_convert(void *handle, void *base,
                                   void (*addview)(void *base, const char *str),
                                   void (*addbuffer)(void *base, const char *str, struct ImBuf *ibuf, const int frame), const int frame)
 {
-	(void)handle; (void)base; (void)addview; (void)addbuffer; (void)frame;
+	UNUSED_VARS(handle, base, addview, addbuffer, frame);
 }
 
 bool    IMB_exr_multiview_save (struct ImBuf *ibuf, const char *name, const int flags, const size_t totviews,
                                 const char * (*getview)(void *base, size_t view_id),
                                 struct ImBuf * (*getbuffer)(void *base, const size_t view_id))
 {
-	(void)ibuf; (void)name; (void)flags; (void)depth; (void)totviews; (void)getview; (void)getbuffer;
+	UNUSED_VARS(ibuf, name, flags, totviews, getview, getbuffer);
+	return false;
 }
 
 void    IMB_exr_close               (void *handle) { (void)handle; }
 
-bool IMB_exr_has_multilayer         (void *handle) { (void)handle; }
-bool IMB_exr_has_singlelayer_multiview  (void *handle) { (void)handle; }
+bool IMB_exr_has_multilayer(void *handle) { UNUSED_VARS(handle); return false; }
+bool IMB_exr_has_singlelayer_multiview(void *handle) { UNUSED_VARS(handle); return false; }




More information about the Bf-blender-cvs mailing list