[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46506] trunk/blender/intern/cycles/render /image.cpp: Fix #31379: cycles not recognizing 16 bit tiff as float image.

Brecht Van Lommel brechtvanlommel at pandora.be
Thu May 10 19:09:37 CEST 2012


Revision: 46506
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46506
Author:   blendix
Date:     2012-05-10 17:09:36 +0000 (Thu, 10 May 2012)
Log Message:
-----------
Fix #31379: cycles not recognizing 16 bit tiff as float image.

Modified Paths:
--------------
    trunk/blender/intern/cycles/render/image.cpp

Modified: trunk/blender/intern/cycles/render/image.cpp
===================================================================
--- trunk/blender/intern/cycles/render/image.cpp	2012-05-10 15:34:23 UTC (rev 46505)
+++ trunk/blender/intern/cycles/render/image.cpp	2012-05-10 17:09:36 UTC (rev 46506)
@@ -60,19 +60,13 @@
 
 		if(in->open(filename, spec)) {
 			/* check the main format, and channel formats;
-			   if any are non-integer, we'll need a float texture slot */
-			if(spec.format == TypeDesc::HALF ||
-			   spec.format == TypeDesc::FLOAT ||
-			   spec.format == TypeDesc::DOUBLE) {
+			   if any take up more than one byte, we'll need a float texture slot */
+			if(spec.format.basesize() > 1)
 				is_float = true;
-			}
 
 			for(size_t channel = 0; channel < spec.channelformats.size(); channel++) {
-				if(spec.channelformats[channel] == TypeDesc::HALF ||
-				   spec.channelformats[channel] == TypeDesc::FLOAT ||
-				   spec.channelformats[channel] == TypeDesc::DOUBLE) {
+				if(spec.channelformats[channel].basesize() > 1)
 					is_float = true;
-				}
 			}
 
 			in->close();




More information about the Bf-blender-cvs mailing list