diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-21 22:58:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-21 22:58:19 +0300 |
commit | f2c54df625d65c40f6070294a5f66de3f2d18c10 (patch) | |
tree | 1f5b12ba40e6e9b563d84c9df5ebe47b24ead20e /intern/cycles/blender/blender_shader.cpp | |
parent | dc3563ff4801907ec8cd21a1589f0cb56d021a8f (diff) |
Cycles: Expose image image extension mapping to the image manager
Currently only two mappings are supported by API, which is Repeat (old behavior)
and new Clip behavior. Internally this extension is being converted to periodic
flag which was already supported but wasn't exposed.
There's no support for OpenCL yet because of the way how we pack images into a
single texture.
Those settings are not exposed to UI or anywhere else and there should be no
functional changes so far.
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 6c54149164d..fe7bd76d6b4 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -590,14 +590,17 @@ static ShaderNode *add_node(Scene *scene, /* TODO(sergey): Does not work properly when we change builtin type. */ if(b_image.is_updated()) { - scene->image_manager->tag_reload_image(image->filename, - image->builtin_data, - (InterpolationType)b_image_node.interpolation()); + scene->image_manager->tag_reload_image( + image->filename, + image->builtin_data, + (InterpolationType)b_image_node.interpolation(), + EXTENSION_REPEAT); } } image->color_space = ImageTextureNode::color_space_enum[(int)b_image_node.color_space()]; image->projection = ImageTextureNode::projection_enum[(int)b_image_node.projection()]; image->interpolation = (InterpolationType)b_image_node.interpolation(); + image->extension = EXTENSION_REPEAT; image->projection_blend = b_image_node.projection_blend(); get_tex_mapping(&image->tex_mapping, b_image_node.texture_mapping()); node = image; @@ -630,7 +633,8 @@ static ShaderNode *add_node(Scene *scene, if(b_image.is_updated()) { scene->image_manager->tag_reload_image(env->filename, env->builtin_data, - INTERPOLATION_LINEAR); + INTERPOLATION_LINEAR, + EXTENSION_REPEAT); } } env->color_space = EnvironmentTextureNode::color_space_enum[(int)b_env_node.color_space()]; @@ -759,9 +763,11 @@ static ShaderNode *add_node(Scene *scene, /* TODO(sergey): Use more proper update flag. */ if(true) { - scene->image_manager->tag_reload_image(point_density->filename, - point_density->builtin_data, - point_density->interpolation); + scene->image_manager->tag_reload_image( + point_density->filename, + point_density->builtin_data, + point_density->interpolation, + EXTENSION_CLIP); } node = point_density; } |