Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-01-23 21:38:48 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-01-23 21:49:10 +0400
commit9f903208e800d4580314dc03d31e8ae5fea73cdb (patch)
treead84fc8ce83be760934732066f4d891c26521cf6 /source/blender/makesrna/intern/rna_texture.c
parentb119f471f4c5bd20975091259a0da6ce155180e6 (diff)
Fix T36165: blender internal HDR textures with negative values got clamped.
For example for vector displacement, you may have an EXR texture that has negative colors values. Blender clamps these by default, now the Colors panel for textures has a Clamp option to disable this clamping. This option affects all texture types and is enabled by default, you need to disable it if you want negative values to have an influence. Patch by Fredrik Hansson with modifications by me.
Diffstat (limited to 'source/blender/makesrna/intern/rna_texture.c')
-rw-r--r--source/blender/makesrna/intern/rna_texture.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index b453965d21f..37a0ee0da8e 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -2010,6 +2010,11 @@ static void rna_def_texture(BlenderRNA *brna)
RNA_def_property_enum_funcs(prop, NULL, "rna_Texture_type_set", NULL);
RNA_def_property_ui_text(prop, "Type", "");
RNA_def_property_update(prop, 0, "rna_Texture_update");
+
+ prop = RNA_def_property(srna, "use_clamp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TEX_NO_CLAMP);
+ RNA_def_property_ui_text(prop, "Clamp", "Set negative texture RGB and intensity values to zero, for some uses like displacement this option can be disabled to get the full range");
+ RNA_def_property_update(prop, 0, "rna_Texture_update");
prop = RNA_def_property(srna, "use_color_ramp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_COLORBAND);