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.
This commit is contained in:
Sergey Sharybin
2015-07-28 13:21:13 +02:00
parent c6396d9204
commit 038d6ce2cc
5 changed files with 8 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -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);
}

View File

@@ -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 */

View File

@@ -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

View File

@@ -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}
};