[Bf-blender-cvs] [038d6ce] master: Cycles: Correction to image extension setting commit

Sergey Sharybin noreply at git.blender.org
Tue Jul 28 13:44:12 CEST 2015


Commit: 038d6ce2cce5aaabfbba90d934b235601fcb561f
Author: Sergey Sharybin
Date:   Tue Jul 28 13:21:13 2015 +0200
Branches: master
https://developer.blender.org/rB038d6ce2cce5aaabfbba90d934b235601fcb561f

Cycles: Correction to image extension setting commit

Technically it was all wrong and it should have been called Extend instead
of Clip. Got confused by the naming in different libraries.

More options are still to come.

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

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

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

diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 2942471..0f0be78 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -767,7 +767,7 @@ static ShaderNode *add_node(Scene *scene,
 			        point_density->filename,
 			        point_density->builtin_data,
 			        point_density->interpolation,
-			        EXTENSION_CLIP);
+			        EXTENSION_REPEAT);
 		}
 		node = point_density;
 	}
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 1150c63..e766c0c 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -1375,7 +1375,7 @@ PointDensityTextureNode::~PointDensityTextureNode()
 		image_manager->remove_image(filename,
 		                            builtin_data,
 		                            interpolation,
-		                            EXTENSION_CLIP);
+		                            EXTENSION_REPEAT);
 	}
 }
 
@@ -1419,7 +1419,7 @@ void PointDensityTextureNode::compile(SVMCompiler& compiler)
 			                                false, 0,
 			                                is_float, is_linear,
 			                                interpolation,
-			                                EXTENSION_CLIP,
+			                                EXTENSION_REPEAT,
 			                                true);
 		}
 
@@ -1467,7 +1467,7 @@ void PointDensityTextureNode::compile(OSLCompiler& compiler)
 			                                false, 0,
 			                                is_float, is_linear,
 			                                interpolation,
-			                                EXTENSION_CLIP,
+			                                EXTENSION_REPEAT,
 			                                true);
 		}
 
diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h
index 411f2d8..5198194 100644
--- a/intern/cycles/util/util_types.h
+++ b/intern/cycles/util/util_types.h
@@ -477,8 +477,8 @@ enum InterpolationType {
 enum ExtensionType {
 	/* Cause the image to repeat horizontally and vertically. */
 	EXTENSION_REPEAT = 0,
-	/* Clip to image size and set exterior pixels as transparent. */
-	EXTENSION_CLIP = 1,
+	/* Extend by repeating edge pixels of the image. */
+	EXTENSION_EXTEND = 1,
 };
 
 /* macros */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index f6875e8..45407d1 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -978,7 +978,7 @@ typedef struct NodeSunBeams {
 #define SHD_PROJ_MIRROR_BALL		1
 
 #define SHD_IMAGE_EXTENSION_REPEAT	0
-#define SHD_IMAGE_EXTENSION_CLIP	1
+#define SHD_IMAGE_EXTENSION_EXTEND	1
 
 /* image texture */
 #define SHD_PROJ_FLAT				0
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 168b2ce..2c86799 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3625,7 +3625,7 @@ static void def_sh_tex_image(StructRNA *srna)
 
 	static EnumPropertyItem prop_image_extension[] = {
 		{SHD_IMAGE_EXTENSION_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"},
-		{SHD_IMAGE_EXTENSION_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"},
+		{SHD_IMAGE_EXTENSION_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"},
 		{0, NULL, 0, NULL, NULL}
 	};




More information about the Bf-blender-cvs mailing list