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:
authorThomas Dinges <blender@dingto.org>2016-04-03 00:36:14 +0300
committerThomas Dinges <blender@dingto.org>2016-04-03 00:36:14 +0300
commitd91316dc672dc1ee69fbd24d2f00124a24b75c6b (patch)
treebcaa68dc4059f4a8d42f0a4157b05c671e39093c /source/blender
parent74e40663da696ac965349204ef4aa4a47271c431 (diff)
Cycles: Remove the Preetham Sky model.
The improved Hosek / Wilkie model was added during my GSoC 2013 and the default since then. The older model was kinda kept for compatibility, but after more than 2 years it's time to remove it. The Hosek / Wilkie model is more realistic anyway, and people who really want a day / night transition can mix the Sky Shader with another one (e.g. color) and fade between the two.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_node/drawnode.c5
-rw-r--r--source/blender/makesdna/DNA_node_types.h6
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c19
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_sky.c1
4 files changed, 6 insertions, 25 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index b2f3306fb62..259b6f982a5 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -910,12 +910,9 @@ static void node_shader_buts_tex_environment_ex(uiLayout *layout, bContext *C, P
static void node_shader_buts_tex_sky(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
- uiItemR(layout, ptr, "sky_type", 0, "", ICON_NONE);
uiItemR(layout, ptr, "sun_direction", 0, "", ICON_NONE);
uiItemR(layout, ptr, "turbidity", 0, NULL, ICON_NONE);
-
- if (RNA_enum_get(ptr, "sky_type") == SHD_SKY_NEW)
- uiItemR(layout, ptr, "ground_albedo", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "ground_albedo", 0, NULL, ICON_NONE);
}
static void node_shader_buts_tex_gradient(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index c75a019a28e..dbb49d1429d 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -718,10 +718,10 @@ typedef struct NodeTexBase {
typedef struct NodeTexSky {
NodeTexBase base;
- int sky_model;
float sun_direction[3];
float turbidity;
float ground_albedo;
+ int pad;
} NodeTexSky;
typedef struct NodeTexImage {
@@ -977,10 +977,6 @@ typedef struct NodeSunBeams {
#define SHD_WAVE_PROFILE_SIN 0
#define SHD_WAVE_PROFILE_SAW 1
-/* sky texture */
-#define SHD_SKY_OLD 0
-#define SHD_SKY_NEW 1
-
/* image/environment texture */
#define SHD_COLORSPACE_NONE 0
#define SHD_COLORSPACE_COLOR 1
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index ccbabb2b238..f519caeef83 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3599,36 +3599,25 @@ static void def_sh_tex(StructRNA *srna)
static void def_sh_tex_sky(StructRNA *srna)
{
- static EnumPropertyItem prop_sky_type[] = {
- {SHD_SKY_OLD, "PREETHAM", 0, "Preetham", ""},
- {SHD_SKY_NEW, "HOSEK_WILKIE", 0, "Hosek / Wilkie", ""},
- {0, NULL, 0, NULL, NULL}
- };
static float default_dir[3] = {0.0f, 0.0f, 1.0f};
-
+
PropertyRNA *prop;
-
+
RNA_def_struct_sdna_from(srna, "NodeTexSky", "storage");
def_sh_tex(srna);
- prop = RNA_def_property(srna, "sky_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "sky_model");
- RNA_def_property_enum_items(prop, prop_sky_type);
- RNA_def_property_ui_text(prop, "Sky Type", "");
- RNA_def_property_update(prop, 0, "rna_Node_update");
-
prop = RNA_def_property(srna, "sun_direction", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_ui_text(prop, "Sun Direction", "Direction from where the sun is shining");
RNA_def_property_array(prop, 3);
RNA_def_property_float_array_default(prop, default_dir);
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
+
prop = RNA_def_property(srna, "turbidity", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 10.0f);
RNA_def_property_ui_range(prop, 1.0f, 10.0f, 10, 3);
RNA_def_property_ui_text(prop, "Turbidity", "Atmospheric turbidity");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
+
prop = RNA_def_property(srna, "ground_albedo", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Ground Albedo", "Ground color that is subtly reflected in the sky");
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
index 495c78ca929..1be9819a61e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
@@ -49,7 +49,6 @@ static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node)
tex->sun_direction[2] = 1.0f;
tex->turbidity = 2.2f;
tex->ground_albedo = 0.3f;
- tex->sky_model = SHD_SKY_NEW;
node->storage = tex;
}