Commit: 36279afbd356364b4b6e059d675ba0515b6b7a44
Author: Thomas Dinges
Date:   Sat Mar 8 00:23:45 2014 +0100
https://developer.blender.org/rB36279afbd356364b4b6e059d675ba0515b6b7a44

Cycles: Compile fix and some cleanup for the Image interpolation commit.

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

M       intern/cycles/render/image.cpp
M       intern/cycles/render/nodes.cpp
M       source/blender/makesdna/DNA_node_types.h
M       source/blender/makesrna/intern/rna_nodetree.c

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

diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index b2559c8..ecccaf5 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -661,7 +661,7 @@ void ImageManager::device_pack_images(Device *device, 
DeviceScene *dscene, Progr
                /* The image options are packed
                   bit 0 -> periodic
                   bit 1 + 2 -> interpolation type */
-               u_int8_t interpolation = (images[slot]->interpolation << 1) + 1;
+               uint8_t interpolation = (images[slot]->interpolation << 1) + 1;
                info[slot] = make_uint4(tex_img.data_width, 
tex_img.data_height, offset, interpolation);
 
                memcpy(pixels+offset, (void*)tex_img.data_pointer, 
tex_img.memory_size());
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index e2ee3a9..d5e358b 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -318,9 +318,6 @@ void ImageTextureNode::compile(OSLCompiler& compiler)
        compiler.parameter("use_alpha", !alpha_out->links.empty());
 
        switch (interpolation){
-               case INTERPOLATION_LINEAR:
-                       compiler.parameter("interpolation", "linear");
-                       break;
                case INTERPOLATION_CLOSEST:
                        compiler.parameter("interpolation", "closest");
                        break;
@@ -330,6 +327,7 @@ void ImageTextureNode::compile(OSLCompiler& compiler)
                case INTERPOLATION_SMART:
                        compiler.parameter("interpolation", "smart");
                        break;
+               case INTERPOLATION_LINEAR:
                default:
                        compiler.parameter("interpolation", "linear");
                        break;
diff --git a/source/blender/makesdna/DNA_node_types.h 
b/source/blender/makesdna/DNA_node_types.h
index 1ad713e..2d3a0fa 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -952,10 +952,10 @@ typedef struct NodeShaderNormalMap {
 #define SHD_PROJ_BOX                           1
 
 /* image texture interpolation */
-#define SHD_INTER_LINEAR               0
-#define SHD_INTER_CLOSEST              1
-#define SHD_INTER_CUBIC                        2
-#define SHD_INTER_SMART                        3
+#define SHD_INTERP_LINEAR              0
+#define SHD_INTERP_CLOSEST             1
+#define SHD_INTERP_CUBIC                       2
+#define SHD_INTERP_SMART                       3
 
 /* tangent */
 #define SHD_TANGENT_RADIAL                     0
diff --git a/source/blender/makesrna/intern/rna_nodetree.c 
b/source/blender/makesrna/intern/rna_nodetree.c
index ae7dcda..080652f 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3429,13 +3429,13 @@ static void def_sh_tex_image(StructRNA *srna)
        };
 
        static const EnumPropertyItem prop_interpolation_items[] = {
-               {SHD_INTER_LINEAR,  "Linear", 0, "Linear",
+               {SHD_INTERP_LINEAR,  "Linear", 0, "Linear",
                                                "Linear interpolation"},
-               {SHD_INTER_CLOSEST, "Closest", 0, "Closest",
+               {SHD_INTERP_CLOSEST, "Closest", 0, "Closest",
                                                "No interpolation (sample 
closest texel"},
-               {SHD_INTER_CUBIC, "Cubic", 0, "Cubic",
+               {SHD_INTERP_CUBIC, "Cubic", 0, "Cubic",
                                                "Cubic interpolation (OSL 
only)"},
-               {SHD_INTER_SMART, "Smart", 0, "Smart",
+               {SHD_INTERP_SMART, "Smart", 0, "Smart",
                                                "Bicubic when maxifying, else 
bilinear (OSL only)"},
                {0, NULL, 0, NULL, NULL}
        };

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

Reply via email to