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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2016-06-11 22:56:47 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-06-12 00:50:11 +0300
commitebdd2e0b6d4cc8c2427070811a293a7e35a880c6 (patch)
tree353a26a6856194c2c9bad3cfd96d2a851475b59a /intern
parentb8112a896003d34ce1099c3cc8f4fee6bd3520cc (diff)
Cycles: make shader node enums consistently lower case, update OSL shaders accordingly.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_environment_texture.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_glass_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_glossy_bsdf.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_gradient_texture.osl16
-rw-r--r--intern/cycles/kernel/shaders/node_hair_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_image_texture.osl10
-rw-r--r--intern/cycles/kernel/shaders/node_math.osl40
-rw-r--r--intern/cycles/kernel/shaders/node_mix.osl38
-rw-r--r--intern/cycles/kernel/shaders/node_musgrave_texture.osl8
-rw-r--r--intern/cycles/kernel/shaders/node_normal_map.osl12
-rw-r--r--intern/cycles/kernel/shaders/node_refraction_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_sky_texture.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_subsurface_scattering.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_tangent.osl12
-rw-r--r--intern/cycles/kernel/shaders/node_toon_bsdf.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_uv_map.osl6
-rw-r--r--intern/cycles/kernel/shaders/node_vector_math.osl14
-rw-r--r--intern/cycles/kernel/shaders/node_vector_transform.osl8
-rw-r--r--intern/cycles/kernel/shaders/node_voronoi_texture.osl4
-rw-r--r--intern/cycles/kernel/shaders/node_wave_texture.osl10
-rw-r--r--intern/cycles/render/nodes.cpp226
22 files changed, 225 insertions, 225 deletions
diff --git a/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl b/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
index 281ed4e8726..f7f89543aa9 100644
--- a/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_anisotropic_bsdf.osl
@@ -45,9 +45,9 @@ shader node_anisotropic_bsdf(
RoughnessV = Roughness / (1.0 - aniso);
}
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * reflection(Normal);
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * microfacet_beckmann_aniso(Normal, T, RoughnessU, RoughnessV);
else if (distribution == "GGX")
BSDF = Color * microfacet_ggx_aniso(Normal, T, RoughnessU, RoughnessV);
diff --git a/intern/cycles/kernel/shaders/node_environment_texture.osl b/intern/cycles/kernel/shaders/node_environment_texture.osl
index 3a0b782c98e..0a7f602226d 100644
--- a/intern/cycles/kernel/shaders/node_environment_texture.osl
+++ b/intern/cycles/kernel/shaders/node_environment_texture.osl
@@ -44,7 +44,7 @@ shader node_environment_texture(
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
vector Vector = P,
string filename = "",
- string projection = "Equirectangular",
+ string projection = "equirectangular",
string interpolation = "linear",
string color_space = "sRGB",
int is_float = 1,
@@ -59,7 +59,7 @@ shader node_environment_texture(
p = normalize(p);
- if (projection == "Equirectangular")
+ if (projection == "equirectangular")
p = environment_texture_direction_to_equirectangular(p);
else
p = environment_texture_direction_to_mirrorball(p);
diff --git a/intern/cycles/kernel/shaders/node_glass_bsdf.osl b/intern/cycles/kernel/shaders/node_glass_bsdf.osl
index 68bc107cc5e..8fd0a2fd714 100644
--- a/intern/cycles/kernel/shaders/node_glass_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_glass_bsdf.osl
@@ -19,7 +19,7 @@
shader node_glass_bsdf(
color Color = 0.8,
- string distribution = "Sharp",
+ string distribution = "sharp",
float Roughness = 0.2,
float IOR = 1.45,
normal Normal = N,
@@ -30,9 +30,9 @@ shader node_glass_bsdf(
float cosi = dot(I, Normal);
float Fr = fresnel_dielectric_cos(cosi, eta);
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * (Fr * reflection(Normal) + (1.0 - Fr) * refraction(Normal, eta));
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * (Fr * microfacet_beckmann(Normal, Roughness) +
(1.0 - Fr) * microfacet_beckmann_refraction(Normal, Roughness, eta));
else if (distribution == "GGX")
diff --git a/intern/cycles/kernel/shaders/node_glossy_bsdf.osl b/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
index d3250b32d0b..cc2a66fd46a 100644
--- a/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_glossy_bsdf.osl
@@ -24,9 +24,9 @@ shader node_glossy_bsdf(
normal Normal = N,
output closure color BSDF = 0)
{
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * reflection(Normal);
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * microfacet_beckmann(Normal, Roughness);
else if (distribution == "GGX")
BSDF = Color * microfacet_ggx(Normal, Roughness);
diff --git a/intern/cycles/kernel/shaders/node_gradient_texture.osl b/intern/cycles/kernel/shaders/node_gradient_texture.osl
index 69e2ee54bdf..f458937a18f 100644
--- a/intern/cycles/kernel/shaders/node_gradient_texture.osl
+++ b/intern/cycles/kernel/shaders/node_gradient_texture.osl
@@ -29,31 +29,31 @@ float gradient(point p, string type)
float result = 0.0;
- if (type == "Linear") {
+ if (type == "linear") {
result = x;
}
- else if (type == "Quadratic") {
+ else if (type == "quadratic") {
float r = max(x, 0.0);
result = r * r;
}
- else if (type == "Easing") {
+ else if (type == "easing") {
float r = min(max(x, 0.0), 1.0);
float t = r * r;
result = (3.0 * t - 2.0 * t * r);
}
- else if (type == "Diagonal") {
+ else if (type == "diagonal") {
result = (x + y) * 0.5;
}
- else if (type == "Radial") {
+ else if (type == "radial") {
result = atan2(y, x) / M_2PI + 0.5;
}
else {
float r = max(1.0 - sqrt(x * x + y * y + z * z), 0.0);
- if (type == "Quadratic Sphere")
+ if (type == "quadratic_sphere")
result = r * r;
- else if (type == "Spherical")
+ else if (type == "spherical")
result = r;
}
@@ -63,7 +63,7 @@ float gradient(point p, string type)
shader node_gradient_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- string type = "Linear",
+ string type = "linear",
point Vector = P,
output float Fac = 0.0,
output color Color = 0.0)
diff --git a/intern/cycles/kernel/shaders/node_hair_bsdf.osl b/intern/cycles/kernel/shaders/node_hair_bsdf.osl
index 54d4cb67c3b..c8cb88f0c0b 100644
--- a/intern/cycles/kernel/shaders/node_hair_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_hair_bsdf.osl
@@ -20,7 +20,7 @@
shader node_hair_bsdf(
color Color = 0.8,
- string component = "Reflection",
+ string component = "reflection",
float Offset = 0.0,
float RoughnessU = 0.1,
float RoughnessV = 1.0,
@@ -37,7 +37,7 @@ shader node_hair_bsdf(
BSDF = transparent();
}
else {
- if (component == "Reflection")
+ if (component == "reflection")
BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
else
BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, normalize(dPdv), 0.0);
@@ -48,7 +48,7 @@ shader node_hair_bsdf(
BSDF = transparent();
}
else {
- if (component == "Reflection")
+ if (component == "reflection")
BSDF = Color * hair_reflection(Normal, roughnessh, roughnessv, dPdu, -Offset);
else
BSDF = Color * hair_transmission(Normal, roughnessh, roughnessv, dPdu, -Offset);
diff --git a/intern/cycles/kernel/shaders/node_image_texture.osl b/intern/cycles/kernel/shaders/node_image_texture.osl
index d09174ff5d3..a00401845c8 100644
--- a/intern/cycles/kernel/shaders/node_image_texture.osl
+++ b/intern/cycles/kernel/shaders/node_image_texture.osl
@@ -86,7 +86,7 @@ shader node_image_texture(
point Vector = P,
string filename = "",
string color_space = "sRGB",
- string projection = "Flat",
+ string projection = "flat",
string interpolation = "smartcubic",
string wrap = "periodic",
float projection_blend = 0.0,
@@ -100,7 +100,7 @@ shader node_image_texture(
if (use_mapping)
p = transform(mapping, p);
- if (projection == "Flat") {
+ if (projection == "flat") {
Color = image_texture_lookup(filename,
color_space,
p[0], p[1],
@@ -110,7 +110,7 @@ shader node_image_texture(
interpolation,
wrap);
}
- else if (projection == "Box") {
+ else if (projection == "box") {
/* object space normal */
vector Nob = transform("world", "object", N);
@@ -210,7 +210,7 @@ shader node_image_texture(
Alpha += weight[2] * tmp_alpha;
}
}
- else if (projection == "Sphere") {
+ else if (projection == "sphere") {
point projected = map_to_sphere(texco_remap_square(p));
Color = image_texture_lookup(filename,
color_space,
@@ -221,7 +221,7 @@ shader node_image_texture(
interpolation,
wrap);
}
- else if (projection == "Tube") {
+ else if (projection == "tube") {
point projected = map_to_tube(texco_remap_square(p));
Color = image_texture_lookup(filename,
color_space,
diff --git a/intern/cycles/kernel/shaders/node_math.osl b/intern/cycles/kernel/shaders/node_math.osl
index 85eac0b97a6..f309ef7c6f3 100644
--- a/intern/cycles/kernel/shaders/node_math.osl
+++ b/intern/cycles/kernel/shaders/node_math.osl
@@ -49,7 +49,7 @@ float safe_log(float a, float b)
}
shader node_math(
- string type = "Add",
+ string type = "add",
int use_clamp = 0,
float Value1 = 0.0,
float Value2 = 0.0,
@@ -57,43 +57,43 @@ shader node_math(
{
/* OSL asin, acos, pow check for values that could give rise to nan */
- if (type == "Add")
+ if (type == "add")
Value = Value1 + Value2;
- else if (type == "Subtract")
+ else if (type == "subtract")
Value = Value1 - Value2;
- else if (type == "Multiply")
+ else if (type == "multiply")
Value = Value1 * Value2;
- else if (type == "Divide")
+ else if (type == "divide")
Value = safe_divide(Value1, Value2);
- else if (type == "Sine")
+ else if (type == "sine")
Value = sin(Value1);
- else if (type == "Cosine")
+ else if (type == "cosine")
Value = cos(Value1);
- else if (type == "Tangent")
+ else if (type == "tangent")
Value = tan(Value1);
- else if (type == "Arcsine")
+ else if (type == "arcsine")
Value = asin(Value1);
- else if (type == "Arccosine")
+ else if (type == "arccosine")
Value = acos(Value1);
- else if (type == "Arctangent")
+ else if (type == "arctangent")
Value = atan(Value1);
- else if (type == "Power")
+ else if (type == "power")
Value = pow(Value1, Value2);
- else if (type == "Logarithm")
+ else if (type == "logarithm")
Value = safe_log(Value1, Value2);
- else if (type == "Minimum")
+ else if (type == "minimum")
Value = min(Value1, Value2);
- else if (type == "Maximum")
+ else if (type == "maximum")
Value = max(Value1, Value2);
- else if (type == "Round")
+ else if (type == "round")
Value = floor(Value1 + 0.5);
- else if (type == "Less Than")
+ else if (type == "less_than")
Value = Value1 < Value2;
- else if (type == "Greater Than")
+ else if (type == "greater_than")
Value = Value1 > Value2;
- else if (type == "Modulo")
+ else if (type == "modulo")
Value = safe_modulo(Value1, Value2);
- else if (type == "Absolute")
+ else if (type == "absolute")
Value = fabs(Value1);
if (use_clamp)
diff --git a/intern/cycles/kernel/shaders/node_mix.osl b/intern/cycles/kernel/shaders/node_mix.osl
index 4a66748ed6a..0862c34b6e1 100644
--- a/intern/cycles/kernel/shaders/node_mix.osl
+++ b/intern/cycles/kernel/shaders/node_mix.osl
@@ -277,7 +277,7 @@ color node_mix_clamp(color col)
}
shader node_mix(
- string type = "Mix",
+ string type = "mix",
int use_clamp = 0,
float Fac = 0.5,
color Color1 = 0.0,
@@ -286,41 +286,41 @@ shader node_mix(
{
float t = clamp(Fac, 0.0, 1.0);
- if (type == "Mix")
+ if (type == "mix")
Color = node_mix_blend(t, Color1, Color2);
- if (type == "Add")
+ if (type == "add")
Color = node_mix_add(t, Color1, Color2);
- if (type == "Multiply")
+ if (type == "multiply")
Color = node_mix_mul(t, Color1, Color2);
- if (type == "Screen")
+ if (type == "screen")
Color = node_mix_screen(t, Color1, Color2);
- if (type == "Overlay")
+ if (type == "overlay")
Color = node_mix_overlay(t, Color1, Color2);
- if (type == "Subtract")
+ if (type == "subtract")
Color = node_mix_sub(t, Color1, Color2);
- if (type == "Divide")
+ if (type == "divide")
Color = node_mix_div(t, Color1, Color2);
- if (type == "Difference")
+ if (type == "difference")
Color = node_mix_diff(t, Color1, Color2);
- if (type == "Darken")
+ if (type == "darken")
Color = node_mix_dark(t, Color1, Color2);
- if (type == "Lighten")
+ if (type == "lighten")
Color = node_mix_light(t, Color1, Color2);
- if (type == "Dodge")
+ if (type == "dodge")
Color = node_mix_dodge(t, Color1, Color2);
- if (type == "Burn")
+ if (type == "burn")
Color = node_mix_burn(t, Color1, Color2);
- if (type == "Hue")
+ if (type == "hue")
Color = node_mix_hue(t, Color1, Color2);
- if (type == "Saturation")
+ if (type == "saturation")
Color = node_mix_sat(t, Color1, Color2);
- if (type == "Value")
+ if (type == "value")
Color = node_mix_val (t, Color1, Color2);
- if (type == "Color")
+ if (type == "color")
Color = node_mix_color(t, Color1, Color2);
- if (type == "Soft Light")
+ if (type == "soft_light")
Color = node_mix_soft(t, Color1, Color2);
- if (type == "Linear Light")
+ if (type == "linear_light")
Color = node_mix_linear(t, Color1, Color2);
if (use_clamp)
diff --git a/intern/cycles/kernel/shaders/node_musgrave_texture.osl b/intern/cycles/kernel/shaders/node_musgrave_texture.osl
index 2f9f62bcfe8..91f4fba5898 100644
--- a/intern/cycles/kernel/shaders/node_musgrave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_musgrave_texture.osl
@@ -210,15 +210,15 @@ shader node_musgrave_texture(
p = p * Scale;
- if (type == "Multifractal")
+ if (type == "multifractal")
Fac = intensity * noise_musgrave_multi_fractal(p, dimension, lacunarity, octaves);
else if (type == "fBM")
Fac = intensity * noise_musgrave_fBm(p, dimension, lacunarity, octaves);
- else if (type == "Hybrid Multifractal")
+ else if (type == "hybrid_multifractal")
Fac = intensity * noise_musgrave_hybrid_multi_fractal(p, dimension, lacunarity, octaves, Offset, Gain);
- else if (type == "Ridged Multifractal")
+ else if (type == "ridged_multifractal")
Fac = intensity * noise_musgrave_ridged_multi_fractal(p, dimension, lacunarity, octaves, Offset, Gain);
- else if (type == "Hetero Terrain")
+ else if (type == "hetero_terrain")
Fac = intensity * noise_musgrave_hetero_terrain(p, dimension, lacunarity, octaves, Offset);
Color = color(Fac, Fac, Fac);
diff --git a/intern/cycles/kernel/shaders/node_normal_map.osl b/intern/cycles/kernel/shaders/node_normal_map.osl
index 01be566fb20..f95e9fcfe3c 100644
--- a/intern/cycles/kernel/shaders/node_normal_map.osl
+++ b/intern/cycles/kernel/shaders/node_normal_map.osl
@@ -20,14 +20,14 @@ shader node_normal_map(
normal NormalIn = N,
float Strength = 1.0,
color Color = color(0.5, 0.5, 1.0),
- string space = "Tangent",
+ string space = "tangent",
string attr_name = "geom:tangent",
string attr_sign_name = "geom:tangent_sign",
output normal Normal = NormalIn)
{
color mcolor = 2.0 * color(Color[0] - 0.5, Color[1] - 0.5, Color[2] - 0.5);
- if (space == "Tangent") {
+ if (space == "tangent") {
vector tangent;
vector ninterp;
float tangent_sign;
@@ -53,20 +53,20 @@ shader node_normal_map(
Normal = normal(0, 0, 0);
}
}
- else if (space == "Object") {
+ else if (space == "object") {
Normal = normalize(transform("object", "world", vector(mcolor)));
}
- else if (space == "World") {
+ else if (space == "world") {
Normal = normalize(vector(mcolor));
}
- else if (space == "Blender Object") {
+ else if (space == "blender_object") {
/* strange blender convention */
mcolor[1] = -mcolor[1];
mcolor[2] = -mcolor[2];
Normal = normalize(transform("object", "world", vector(mcolor)));
}
- else if (space == "Blender World") {
+ else if (space == "blender_world") {
/* strange blender convention */
mcolor[1] = -mcolor[1];
mcolor[2] = -mcolor[2];
diff --git a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
index d458ca730a4..828becf1818 100644
--- a/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_refraction_bsdf.osl
@@ -18,7 +18,7 @@
shader node_refraction_bsdf(
color Color = 0.8,
- string distribution = "Sharp",
+ string distribution = "sharp",
float Roughness = 0.2,
float IOR = 1.45,
normal Normal = N,
@@ -27,9 +27,9 @@ shader node_refraction_bsdf(
float f = max(IOR, 1e-5);
float eta = backfacing() ? 1.0 / f : f;
- if (distribution == "Sharp")
+ if (distribution == "sharp")
BSDF = Color * refraction(Normal, eta);
- else if (distribution == "Beckmann")
+ else if (distribution == "beckmann")
BSDF = Color * microfacet_beckmann_refraction(Normal, Roughness, eta);
else if (distribution == "GGX")
BSDF = Color * microfacet_ggx_refraction(Normal, Roughness, eta);
diff --git a/intern/cycles/kernel/shaders/node_sky_texture.osl b/intern/cycles/kernel/shaders/node_sky_texture.osl
index 05eed23bea8..a6c187d15f2 100644
--- a/intern/cycles/kernel/shaders/node_sky_texture.osl
+++ b/intern/cycles/kernel/shaders/node_sky_texture.osl
@@ -111,7 +111,7 @@ shader node_sky_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
vector Vector = P,
- string sky_model = "Hosek / Wilkie",
+ string type = "hosek_wilkie",
float theta = 0.0,
float phi = 0.0,
color radiance = color(0.0, 0.0, 0.0),
@@ -125,7 +125,7 @@ shader node_sky_texture(
if (use_mapping)
p = transform(mapping, p);
- if (sky_model == "Hosek / Wilkie")
+ if (type == "hosek_wilkie")
Color = sky_radiance_new(p, phi, theta, radiance, config_x, config_y, config_z);
else
Color = sky_radiance_old(p, phi, theta, radiance, config_x, config_y, config_z);
diff --git a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
index 1877c7e595f..5ba8f34021d 100644
--- a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
+++ b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl
@@ -22,13 +22,13 @@ shader node_subsurface_scattering(
vector Radius = vector(0.1, 0.1, 0.1),
float TextureBlur = 0.0,
float Sharpness = 0.0,
- string falloff = "Cubic",
+ string falloff = "cubic",
normal Normal = N,
output closure color BSSRDF = 0)
{
- if (falloff == "Gaussian")
+ if (falloff == "gaussian")
BSSRDF = Color * bssrdf_gaussian(Normal, Scale * Radius, TextureBlur);
- else if (falloff == "Cubic")
+ else if (falloff == "cubic")
BSSRDF = Color * bssrdf_cubic(Normal, Scale * Radius, TextureBlur, Sharpness);
else
BSSRDF = Color * bssrdf_burley(Normal, Scale * Radius, TextureBlur, Color);
diff --git a/intern/cycles/kernel/shaders/node_tangent.osl b/intern/cycles/kernel/shaders/node_tangent.osl
index 53a47396f9f..c527070a2c8 100644
--- a/intern/cycles/kernel/shaders/node_tangent.osl
+++ b/intern/cycles/kernel/shaders/node_tangent.osl
@@ -19,24 +19,24 @@
shader node_tangent(
normal NormalIn = N,
string attr_name = "geom:tangent",
- string direction_type = "Radial",
- string axis = "Z",
+ string direction_type = "radial",
+ string axis = "z",
output normal Tangent = normalize(dPdu))
{
vector T;
- if (direction_type == "UV Map") {
+ if (direction_type == "uv_map") {
getattribute(attr_name, T);
}
- else if (direction_type == "Radial") {
+ else if (direction_type == "radial") {
point generated;
if (!getattribute("geom:generated", generated))
generated = P;
- if (axis == "X")
+ if (axis == "x")
T = vector(0.0, -(generated[2] - 0.5), (generated[1] - 0.5));
- else if (axis == "Y")
+ else if (axis == "y")
T = vector(-(generated[2] - 0.5), 0.0, (generated[0] - 0.5));
else
T = vector(-(generated[1] - 0.5), (generated[0] - 0.5), 0.0);
diff --git a/intern/cycles/kernel/shaders/node_toon_bsdf.osl b/intern/cycles/kernel/shaders/node_toon_bsdf.osl
index 75c5d06f847..ae68a463e46 100644
--- a/intern/cycles/kernel/shaders/node_toon_bsdf.osl
+++ b/intern/cycles/kernel/shaders/node_toon_bsdf.osl
@@ -18,15 +18,15 @@
shader node_toon_bsdf(
color Color = 0.8,
- string component = "Diffuse",
+ string component = "diffuse",
float Size = 0.5,
float Smooth = 0.0,
normal Normal = N,
output closure color BSDF = 0)
{
- if (component == "Diffuse")
+ if (component == "diffuse")
BSDF = Color * diffuse_toon(Normal, Size, Smooth);
- else if (component == "Glossy")
+ else if (component == "glossy")
BSDF = Color * glossy_toon(Normal, Size, Smooth);
}
diff --git a/intern/cycles/kernel/shaders/node_uv_map.osl b/intern/cycles/kernel/shaders/node_uv_map.osl
index 77e2e8d12d7..b46b2e73457 100644
--- a/intern/cycles/kernel/shaders/node_uv_map.osl
+++ b/intern/cycles/kernel/shaders/node_uv_map.osl
@@ -18,7 +18,7 @@
shader node_uv_map(
int from_dupli = 0,
- string name = "",
+ string attribute = "",
string bump_offset = "center",
output point UV = point(0.0, 0.0, 0.0))
{
@@ -26,10 +26,10 @@ shader node_uv_map(
getattribute("geom:dupli_uv", UV);
}
else {
- if (name == "")
+ if (attribute == "")
getattribute("geom:uv", UV);
else
- getattribute(name, UV);
+ getattribute(attribute, UV);
}
if (bump_offset == "dx") {
diff --git a/intern/cycles/kernel/shaders/node_vector_math.osl b/intern/cycles/kernel/shaders/node_vector_math.osl
index f83412dc0f7..a7e3637402e 100644
--- a/intern/cycles/kernel/shaders/node_vector_math.osl
+++ b/intern/cycles/kernel/shaders/node_vector_math.osl
@@ -17,33 +17,33 @@
#include "stdosl.h"
shader node_vector_math(
- string type = "Add",
+ string type = "add",
vector Vector1 = vector(0.0, 0.0, 0.0),
vector Vector2 = vector(0.0, 0.0, 0.0),
output float Value = 0.0,
output vector Vector = vector(0.0, 0.0, 0.0))
{
- if (type == "Add") {
+ if (type == "add") {
Vector = Vector1 + Vector2;
Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2])) / 3.0;
}
- else if (type == "Subtract") {
+ else if (type == "subtract") {
Vector = Vector1 - Vector2;
Value = (abs(Vector[0]) + abs(Vector[1]) + abs(Vector[2])) / 3.0;
}
- else if (type == "Average") {
+ else if (type == "average") {
Value = length(Vector1 + Vector2);
Vector = normalize(Vector1 + Vector2);
}
- else if (type == "Dot Product") {
+ else if (type == "dot_product") {
Value = dot(Vector1, Vector2);
}
- else if (type == "Cross Product") {
+ else if (type == "cross_product") {
vector c = cross(Vector1, Vector2);
Value = length(c);
Vector = normalize(c);
}
- else if (type == "Normalize") {
+ else if (type == "normalize") {
Value = length(Vector1);
Vector = normalize(Vector1);
}
diff --git a/intern/cycles/kernel/shaders/node_vector_transform.osl b/intern/cycles/kernel/shaders/node_vector_transform.osl
index 8ebaa31ab25..afb95b340d1 100644
--- a/intern/cycles/kernel/shaders/node_vector_transform.osl
+++ b/intern/cycles/kernel/shaders/node_vector_transform.osl
@@ -17,18 +17,18 @@
#include "stdosl.h"
shader node_vector_transform(
- string type = "Vector",
+ string type = "vector",
string convert_from = "world",
string convert_to = "object",
vector VectorIn = vector(0.0, 0.0, 0.0),
output vector VectorOut = vector(0.0, 0.0, 0.0))
{
- if (type == "Vector" || type == "Normal") {
+ if (type == "vector" || type == "normal") {
VectorOut = transform(convert_from, convert_to, VectorIn);
- if (type == "Normal")
+ if (type == "normal")
VectorOut = normalize(VectorOut);
}
- else if (type == "Point") {
+ else if (type == "point") {
point Point = (point)VectorIn;
VectorOut = transform(convert_from, convert_to, Point);
}
diff --git a/intern/cycles/kernel/shaders/node_voronoi_texture.osl b/intern/cycles/kernel/shaders/node_voronoi_texture.osl
index bacdd593c7c..0c3b95ae4d0 100644
--- a/intern/cycles/kernel/shaders/node_voronoi_texture.osl
+++ b/intern/cycles/kernel/shaders/node_voronoi_texture.osl
@@ -22,7 +22,7 @@
shader node_voronoi_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- string coloring = "Intensity",
+ string coloring = "intensity",
float Scale = 5.0,
point Vector = P,
output float Fac = 0.0,
@@ -40,7 +40,7 @@ shader node_voronoi_texture(
voronoi(p * Scale, 1.0, da, pa);
/* Colored output */
- if (coloring == "Intensity") {
+ if (coloring == "intensity") {
Fac = fabs(da[0]);
Color = color(Fac);
}
diff --git a/intern/cycles/kernel/shaders/node_wave_texture.osl b/intern/cycles/kernel/shaders/node_wave_texture.osl
index a07742faefc..71bc9324705 100644
--- a/intern/cycles/kernel/shaders/node_wave_texture.osl
+++ b/intern/cycles/kernel/shaders/node_wave_texture.osl
@@ -23,10 +23,10 @@ float wave(point p, string type, string profile, float detail, float distortion,
{
float n = 0.0;
- if (type == "Bands") {
+ if (type == "bands") {
n = (p[0] + p[1] + p[2]) * 10.0;
}
- else if (type == "Rings") {
+ else if (type == "rings") {
n = length(p) * 20.0;
}
@@ -34,7 +34,7 @@ float wave(point p, string type, string profile, float detail, float distortion,
n = n + (distortion * noise_turbulence(p * dscale, detail, 0));
}
- if (profile == "Sine") {
+ if (profile == "sine") {
return 0.5 + 0.5 * sin(n);
}
else {
@@ -48,8 +48,8 @@ float wave(point p, string type, string profile, float detail, float distortion,
shader node_wave_texture(
int use_mapping = 0,
matrix mapping = matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
- string type = "Bands",
- string profile = "Sine",
+ string type = "bands",
+ string profile = "sine",
float Scale = 5.0,
float Distortion = 0.0,
float Detail = 2.0,
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 41f405c781b..c5fd09470bf 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -41,12 +41,12 @@ CCL_NAMESPACE_BEGIN
\
static NodeEnum mapping_axis_enum; \
mapping_axis_enum.insert("none", TextureMapping::NONE); \
- mapping_axis_enum.insert("X", TextureMapping::X); \
- mapping_axis_enum.insert("Y", TextureMapping::Y); \
- mapping_axis_enum.insert("Z", TextureMapping::Z); \
- SOCKET_ENUM(tex_mapping.x_mapping, "X Mapping", mapping_axis_enum, TextureMapping::X); \
- SOCKET_ENUM(tex_mapping.y_mapping, "Y Mapping", mapping_axis_enum, TextureMapping::Y); \
- SOCKET_ENUM(tex_mapping.z_mapping, "z mapping", mapping_axis_enum, TextureMapping::Z); \
+ mapping_axis_enum.insert("x", TextureMapping::X); \
+ mapping_axis_enum.insert("y", TextureMapping::Y); \
+ mapping_axis_enum.insert("z", TextureMapping::Z); \
+ SOCKET_ENUM(tex_mapping.x_mapping, "x_mapping", mapping_axis_enum, TextureMapping::X); \
+ SOCKET_ENUM(tex_mapping.y_mapping, "y_mapping", mapping_axis_enum, TextureMapping::Y); \
+ SOCKET_ENUM(tex_mapping.z_mapping, "z_mapping", mapping_axis_enum, TextureMapping::Z); \
\
static NodeEnum mapping_type_enum; \
mapping_type_enum.insert("point", TextureMapping::POINT); \
@@ -207,8 +207,8 @@ NODE_DEFINE(ImageTextureNode)
SOCKET_STRING(filename, "Filename", ustring(""));
static NodeEnum color_space_enum;
- color_space_enum.insert("None", NODE_COLOR_SPACE_NONE);
- color_space_enum.insert("Color", NODE_COLOR_SPACE_COLOR);
+ color_space_enum.insert("none", NODE_COLOR_SPACE_NONE);
+ color_space_enum.insert("color", NODE_COLOR_SPACE_COLOR);
SOCKET_ENUM(color_space, "Color Space", color_space_enum, NODE_COLOR_SPACE_COLOR);
SOCKET_BOOLEAN(use_alpha, "Use Alpha", true);
@@ -227,10 +227,10 @@ NODE_DEFINE(ImageTextureNode)
SOCKET_ENUM(extension, "Extension", extension_enum, EXTENSION_REPEAT);
static NodeEnum projection_enum;
- projection_enum.insert("Flat", NODE_IMAGE_PROJ_FLAT);
- projection_enum.insert("Box", NODE_IMAGE_PROJ_BOX);
- projection_enum.insert("Sphere", NODE_IMAGE_PROJ_SPHERE);
- projection_enum.insert("Tube", NODE_IMAGE_PROJ_TUBE);
+ projection_enum.insert("flat", NODE_IMAGE_PROJ_FLAT);
+ projection_enum.insert("box", NODE_IMAGE_PROJ_BOX);
+ projection_enum.insert("sphere", NODE_IMAGE_PROJ_SPHERE);
+ projection_enum.insert("tube", NODE_IMAGE_PROJ_TUBE);
SOCKET_ENUM(projection, "Projection", projection_enum, NODE_IMAGE_PROJ_FLAT);
SOCKET_FLOAT(projection_blend, "Projection Blend", 0.0f);
@@ -392,7 +392,7 @@ void ImageTextureNode::compile(OSLCompiler& compiler)
compiler.parameter("filename", string_printf("@%d", slot).c_str());
}
if(is_linear || color_space != NODE_COLOR_SPACE_COLOR)
- compiler.parameter("color_space", "Linear");
+ compiler.parameter("color_space", "linear");
else
compiler.parameter("color_space", "sRGB");
compiler.parameter(this, "projection");
@@ -416,8 +416,8 @@ NODE_DEFINE(EnvironmentTextureNode)
SOCKET_STRING(filename, "Filename", ustring(""));
static NodeEnum color_space_enum;
- color_space_enum.insert("None", NODE_COLOR_SPACE_NONE);
- color_space_enum.insert("Color", NODE_COLOR_SPACE_COLOR);
+ color_space_enum.insert("none", NODE_COLOR_SPACE_NONE);
+ color_space_enum.insert("color", NODE_COLOR_SPACE_COLOR);
SOCKET_ENUM(color_space, "Color Space", color_space_enum, NODE_COLOR_SPACE_COLOR);
SOCKET_BOOLEAN(use_alpha, "Use Alpha", true);
@@ -430,8 +430,8 @@ NODE_DEFINE(EnvironmentTextureNode)
SOCKET_ENUM(interpolation, "Interpolation", interpolation_enum, INTERPOLATION_LINEAR);
static NodeEnum projection_enum;
- projection_enum.insert("Equirectangular", NODE_ENVIRONMENT_EQUIRECTANGULAR);
- projection_enum.insert("Mirror Ball", NODE_ENVIRONMENT_MIRROR_BALL);
+ projection_enum.insert("equirectangular", NODE_ENVIRONMENT_EQUIRECTANGULAR);
+ projection_enum.insert("mirror_ball", NODE_ENVIRONMENT_MIRROR_BALL);
SOCKET_ENUM(projection, "Projection", projection_enum, NODE_ENVIRONMENT_EQUIRECTANGULAR);
SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_POSITION);
@@ -575,7 +575,7 @@ void EnvironmentTextureNode::compile(OSLCompiler& compiler)
}
compiler.parameter(this, "projection");
if(is_linear || color_space != NODE_COLOR_SPACE_COLOR)
- compiler.parameter("color_space", "Linear");
+ compiler.parameter("color_space", "linear");
else
compiler.parameter("color_space", "sRGB");
@@ -715,8 +715,8 @@ NODE_DEFINE(SkyTextureNode)
TEXTURE_MAPPING_DEFINE(SkyTextureNode);
static NodeEnum type_enum;
- type_enum.insert("Preetham", NODE_SKY_OLD);
- type_enum.insert("Hosek / Wilkie", NODE_SKY_NEW);
+ type_enum.insert("preetham", NODE_SKY_OLD);
+ type_enum.insert("hosek_wilkie", NODE_SKY_NEW);
SOCKET_ENUM(type, "Type", type_enum, NODE_SKY_NEW);
SOCKET_VECTOR(sun_direction, "Sun Direction", make_float3(0.0f, 0.0f, 1.0f));
@@ -778,7 +778,7 @@ void SkyTextureNode::compile(OSLCompiler& compiler)
else
assert(false);
- compiler.parameter("sky_model", type);
+ compiler.parameter(this, "type");
compiler.parameter("theta", sunsky.theta);
compiler.parameter("phi", sunsky.phi);
compiler.parameter_color("radiance", make_float3(sunsky.radiance_x, sunsky.radiance_y, sunsky.radiance_z));
@@ -797,13 +797,13 @@ NODE_DEFINE(GradientTextureNode)
TEXTURE_MAPPING_DEFINE(GradientTextureNode);
static NodeEnum type_enum;
- type_enum.insert("Linear", NODE_BLEND_LINEAR);
- type_enum.insert("Quadratic", NODE_BLEND_QUADRATIC);
- type_enum.insert("Easing", NODE_BLEND_EASING);
- type_enum.insert("Diagonal", NODE_BLEND_DIAGONAL);
- type_enum.insert("Radial", NODE_BLEND_RADIAL);
- type_enum.insert("Quadratic Sphere", NODE_BLEND_QUADRATIC_SPHERE);
- type_enum.insert("Spherical", NODE_BLEND_SPHERICAL);
+ type_enum.insert("linear", NODE_BLEND_LINEAR);
+ type_enum.insert("quadratic", NODE_BLEND_QUADRATIC);
+ type_enum.insert("easing", NODE_BLEND_EASING);
+ type_enum.insert("diagonal", NODE_BLEND_DIAGONAL);
+ type_enum.insert("radial", NODE_BLEND_RADIAL);
+ type_enum.insert("quadratic_sphere", NODE_BLEND_QUADRATIC_SPHERE);
+ type_enum.insert("spherical", NODE_BLEND_SPHERICAL);
SOCKET_ENUM(type, "Type", type_enum, NODE_BLEND_LINEAR);
SOCKET_IN_POINT(vector, "Vector", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TEXTURE_GENERATED);
@@ -913,8 +913,8 @@ NODE_DEFINE(VoronoiTextureNode)
TEXTURE_MAPPING_DEFINE(VoronoiTextureNode);
static NodeEnum coloring_enum;
- coloring_enum.insert("Intensity", NODE_VORONOI_INTENSITY);
- coloring_enum.insert("Cells", NODE_VORONOI_CELLS);
+ coloring_enum.insert("intensity", NODE_VORONOI_INTENSITY);
+ coloring_enum.insert("cells", NODE_VORONOI_CELLS);
SOCKET_ENUM(coloring, "Coloring", coloring_enum, NODE_VORONOI_INTENSITY);
SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
@@ -969,11 +969,11 @@ NODE_DEFINE(MusgraveTextureNode)
TEXTURE_MAPPING_DEFINE(MusgraveTextureNode);
static NodeEnum type_enum;
- type_enum.insert("Multifractal", NODE_MUSGRAVE_MULTIFRACTAL);
+ type_enum.insert("multifractal", NODE_MUSGRAVE_MULTIFRACTAL);
type_enum.insert("fBM", NODE_MUSGRAVE_FBM);
- type_enum.insert("Hybrid Multifractal", NODE_MUSGRAVE_HYBRID_MULTIFRACTAL);
- type_enum.insert("Ridged Multifractal", NODE_MUSGRAVE_RIDGED_MULTIFRACTAL);
- type_enum.insert("Hetero Terrain", NODE_MUSGRAVE_HETERO_TERRAIN);
+ type_enum.insert("hybrid_multifractal", NODE_MUSGRAVE_HYBRID_MULTIFRACTAL);
+ type_enum.insert("ridged_multifractal", NODE_MUSGRAVE_RIDGED_MULTIFRACTAL);
+ type_enum.insert("hetero_terrain", NODE_MUSGRAVE_HETERO_TERRAIN);
SOCKET_ENUM(type, "Type", type_enum, NODE_MUSGRAVE_FBM);
SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
@@ -1050,13 +1050,13 @@ NODE_DEFINE(WaveTextureNode)
TEXTURE_MAPPING_DEFINE(WaveTextureNode);
static NodeEnum type_enum;
- type_enum.insert("Bands", NODE_WAVE_BANDS);
- type_enum.insert("Rings", NODE_WAVE_RINGS);
+ type_enum.insert("bands", NODE_WAVE_BANDS);
+ type_enum.insert("rings", NODE_WAVE_RINGS);
SOCKET_ENUM(type, "Type", type_enum, NODE_WAVE_BANDS);
static NodeEnum profile_enum;
- profile_enum.insert("Sine", NODE_WAVE_PROFILE_SIN);
- profile_enum.insert("Saw", NODE_WAVE_PROFILE_SAW);
+ profile_enum.insert("sine", NODE_WAVE_PROFILE_SIN);
+ profile_enum.insert("saw", NODE_WAVE_PROFILE_SAW);
SOCKET_ENUM(profile, "Profile", profile_enum, NODE_WAVE_PROFILE_SIN);
SOCKET_IN_FLOAT(scale, "Scale", 1.0f);
@@ -1337,8 +1337,8 @@ NODE_DEFINE(PointDensityTextureNode)
SOCKET_STRING(filename, "Filename", ustring(""));
static NodeEnum space_enum;
- space_enum.insert("Object", NODE_TEX_VOXEL_SPACE_OBJECT);
- space_enum.insert("World", NODE_TEX_VOXEL_SPACE_WORLD);
+ space_enum.insert("object", NODE_TEX_VOXEL_SPACE_OBJECT);
+ space_enum.insert("world", NODE_TEX_VOXEL_SPACE_WORLD);
SOCKET_ENUM(space, "Space", space_enum, NODE_TEX_VOXEL_SPACE_OBJECT);
static NodeEnum interpolation_enum;
@@ -1829,9 +1829,9 @@ NODE_DEFINE(AnisotropicBsdfNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum distribution_enum;
- distribution_enum.insert("Beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_ANISO_ID);
+ distribution_enum.insert("beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_ANISO_ID);
distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_ANISO_ID);
- distribution_enum.insert("Ashikhmin-Shirley", CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID);
+ distribution_enum.insert("ashikhmin_shirley", CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID);
SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_ANISO_ID);
SOCKET_IN_VECTOR(tangent, "Tangent", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TANGENT);
@@ -1887,10 +1887,10 @@ NODE_DEFINE(GlossyBsdfNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum distribution_enum;
- distribution_enum.insert("Sharp", CLOSURE_BSDF_REFLECTION_ID);
- distribution_enum.insert("Beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_ID);
+ distribution_enum.insert("sharp", CLOSURE_BSDF_REFLECTION_ID);
+ distribution_enum.insert("beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_ID);
distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_ID);
- distribution_enum.insert("Ashikhmin-Shirley", CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID);
+ distribution_enum.insert("ashikhmin_shirley", CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID);
SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_ID);
SOCKET_IN_FLOAT(roughness, "Roughness", 0.2f);
@@ -1961,8 +1961,8 @@ NODE_DEFINE(GlassBsdfNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum distribution_enum;
- distribution_enum.insert("Sharp", CLOSURE_BSDF_SHARP_GLASS_ID);
- distribution_enum.insert("Beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID);
+ distribution_enum.insert("sharp", CLOSURE_BSDF_SHARP_GLASS_ID);
+ distribution_enum.insert("beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID);
distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID);
SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID);
SOCKET_IN_FLOAT(roughness, "Roughness", 0.0f);
@@ -2035,8 +2035,8 @@ NODE_DEFINE(RefractionBsdfNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum distribution_enum;
- distribution_enum.insert("Sharp", CLOSURE_BSDF_REFRACTION_ID);
- distribution_enum.insert("Beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID);
+ distribution_enum.insert("sharp", CLOSURE_BSDF_REFRACTION_ID);
+ distribution_enum.insert("beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID);
distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID);
SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID);
@@ -2110,8 +2110,8 @@ NODE_DEFINE(ToonBsdfNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum component_enum;
- component_enum.insert("Diffuse", CLOSURE_BSDF_DIFFUSE_TOON_ID);
- component_enum.insert("Glossy", CLOSURE_BSDF_GLOSSY_TOON_ID);
+ component_enum.insert("diffuse", CLOSURE_BSDF_DIFFUSE_TOON_ID);
+ component_enum.insert("glossy", CLOSURE_BSDF_GLOSSY_TOON_ID);
SOCKET_ENUM(component, "Component", component_enum, CLOSURE_BSDF_DIFFUSE_TOON_ID);
SOCKET_IN_FLOAT(size, "Size", 0.5f);
SOCKET_IN_FLOAT(smooth, "Smooth", 0.0f);
@@ -2276,9 +2276,9 @@ NODE_DEFINE(SubsurfaceScatteringNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum falloff_enum;
- falloff_enum.insert("Cubic", CLOSURE_BSSRDF_CUBIC_ID);
- falloff_enum.insert("Gaussian", CLOSURE_BSSRDF_GAUSSIAN_ID);
- falloff_enum.insert("Burley", CLOSURE_BSSRDF_BURLEY_ID);
+ falloff_enum.insert("cubic", CLOSURE_BSSRDF_CUBIC_ID);
+ falloff_enum.insert("gaussian", CLOSURE_BSSRDF_GAUSSIAN_ID);
+ falloff_enum.insert("burley", CLOSURE_BSSRDF_BURLEY_ID);
SOCKET_ENUM(falloff, "Falloff", falloff_enum, CLOSURE_BSSRDF_BURLEY_ID);
SOCKET_IN_FLOAT(scale, "Scale", 0.01f);
SOCKET_IN_VECTOR(radius, "Radius", make_float3(0.1f, 0.1f, 0.1f));
@@ -2593,8 +2593,8 @@ NODE_DEFINE(HairBsdfNode)
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum component_enum;
- component_enum.insert("Reflection", CLOSURE_BSDF_HAIR_REFLECTION_ID);
- component_enum.insert("Transmission", CLOSURE_BSDF_HAIR_TRANSMISSION_ID);
+ component_enum.insert("reflection", CLOSURE_BSDF_HAIR_REFLECTION_ID);
+ component_enum.insert("transmission", CLOSURE_BSDF_HAIR_TRANSMISSION_ID);
SOCKET_ENUM(component, "Component", component_enum, CLOSURE_BSDF_HAIR_REFLECTION_ID);
SOCKET_IN_FLOAT(offset, "Offset", 0.0f);
SOCKET_IN_FLOAT(roughness_u, "RoughnessU", 0.2f);
@@ -2975,7 +2975,7 @@ void UVMapNode::compile(OSLCompiler& compiler)
compiler.parameter("bump_offset", "center");
compiler.parameter(this, "from_dupli");
- compiler.parameter("name", attribute.c_str());
+ compiler.parameter(this, "attribute");
compiler.add(this, "node_uv_map");
}
@@ -3606,24 +3606,24 @@ NODE_DEFINE(MixNode)
NodeType* type = NodeType::add("mix", create, NodeType::SHADER);
static NodeEnum type_enum;
- type_enum.insert("Mix", NODE_MIX_BLEND);
- type_enum.insert("Add", NODE_MIX_ADD);
- type_enum.insert("Multiply", NODE_MIX_MUL);
- type_enum.insert("Screen", NODE_MIX_SCREEN);
- type_enum.insert("Overlay", NODE_MIX_OVERLAY);
- type_enum.insert("Subtract", NODE_MIX_SUB);
- type_enum.insert("Divide", NODE_MIX_DIV);
- type_enum.insert("Difference", NODE_MIX_DIFF);
- type_enum.insert("Darken", NODE_MIX_DARK);
- type_enum.insert("Lighten", NODE_MIX_LIGHT);
- type_enum.insert("Dodge", NODE_MIX_DODGE);
- type_enum.insert("Burn", NODE_MIX_BURN);
- type_enum.insert("Hue", NODE_MIX_HUE);
- type_enum.insert("Saturation", NODE_MIX_SAT);
- type_enum.insert("Value", NODE_MIX_VAL);
- type_enum.insert("Color", NODE_MIX_COLOR);
- type_enum.insert("Soft Light", NODE_MIX_SOFT);
- type_enum.insert("Linear Light", NODE_MIX_LINEAR);
+ type_enum.insert("mix", NODE_MIX_BLEND);
+ type_enum.insert("add", NODE_MIX_ADD);
+ type_enum.insert("multiply", NODE_MIX_MUL);
+ type_enum.insert("screen", NODE_MIX_SCREEN);
+ type_enum.insert("overlay", NODE_MIX_OVERLAY);
+ type_enum.insert("subtract", NODE_MIX_SUB);
+ type_enum.insert("divide", NODE_MIX_DIV);
+ type_enum.insert("difference", NODE_MIX_DIFF);
+ type_enum.insert("darken", NODE_MIX_DARK);
+ type_enum.insert("lighten", NODE_MIX_LIGHT);
+ type_enum.insert("dodge", NODE_MIX_DODGE);
+ type_enum.insert("burn", NODE_MIX_BURN);
+ type_enum.insert("hue", NODE_MIX_HUE);
+ type_enum.insert("saturation", NODE_MIX_SAT);
+ type_enum.insert("value", NODE_MIX_VAL);
+ type_enum.insert("color", NODE_MIX_COLOR);
+ type_enum.insert("soft_light", NODE_MIX_SOFT);
+ type_enum.insert("linear_light", NODE_MIX_LINEAR);
SOCKET_ENUM(type, "Type", type_enum, NODE_MIX_BLEND);
SOCKET_BOOLEAN(use_clamp, "Use Clamp", false);
@@ -4494,25 +4494,25 @@ NODE_DEFINE(MathNode)
NodeType* type = NodeType::add("math", create, NodeType::SHADER);
static NodeEnum type_enum;
- type_enum.insert("Add", NODE_MATH_ADD);
- type_enum.insert("Subtract", NODE_MATH_SUBTRACT);
- type_enum.insert("Multiply", NODE_MATH_MULTIPLY);
- type_enum.insert("Divide", NODE_MATH_DIVIDE);
- type_enum.insert("Sine", NODE_MATH_SINE);
- type_enum.insert("Cosine", NODE_MATH_COSINE);
- type_enum.insert("Tangent", NODE_MATH_TANGENT);
- type_enum.insert("Arcsine", NODE_MATH_ARCSINE);
- type_enum.insert("Arccosine", NODE_MATH_ARCCOSINE);
- type_enum.insert("Arctangent", NODE_MATH_ARCTANGENT);
- type_enum.insert("Power", NODE_MATH_POWER);
- type_enum.insert("Logarithm", NODE_MATH_LOGARITHM);
- type_enum.insert("Minimum", NODE_MATH_MINIMUM);
- type_enum.insert("Maximum", NODE_MATH_MAXIMUM);
- type_enum.insert("Round", NODE_MATH_ROUND);
- type_enum.insert("Less Than", NODE_MATH_LESS_THAN);
- type_enum.insert("Greater Than", NODE_MATH_GREATER_THAN);
- type_enum.insert("Modulo", NODE_MATH_MODULO);
- type_enum.insert("Absolute", NODE_MATH_ABSOLUTE);
+ type_enum.insert("add", NODE_MATH_ADD);
+ type_enum.insert("subtract", NODE_MATH_SUBTRACT);
+ type_enum.insert("multiply", NODE_MATH_MULTIPLY);
+ type_enum.insert("divide", NODE_MATH_DIVIDE);
+ type_enum.insert("sine", NODE_MATH_SINE);
+ type_enum.insert("cosine", NODE_MATH_COSINE);
+ type_enum.insert("tangent", NODE_MATH_TANGENT);
+ type_enum.insert("arcsine", NODE_MATH_ARCSINE);
+ type_enum.insert("arccosine", NODE_MATH_ARCCOSINE);
+ type_enum.insert("arctangent", NODE_MATH_ARCTANGENT);
+ type_enum.insert("power", NODE_MATH_POWER);
+ type_enum.insert("logarithm", NODE_MATH_LOGARITHM);
+ type_enum.insert("minimum", NODE_MATH_MINIMUM);
+ type_enum.insert("maximum", NODE_MATH_MAXIMUM);
+ type_enum.insert("round", NODE_MATH_ROUND);
+ type_enum.insert("less_than", NODE_MATH_LESS_THAN);
+ type_enum.insert("greater_than", NODE_MATH_GREATER_THAN);
+ type_enum.insert("modulo", NODE_MATH_MODULO);
+ type_enum.insert("absolute", NODE_MATH_ABSOLUTE);
SOCKET_ENUM(type, "Type", type_enum, NODE_MATH_ADD);
SOCKET_BOOLEAN(use_clamp, "Use Clamp", false);
@@ -4579,12 +4579,12 @@ NODE_DEFINE(VectorMathNode)
NodeType* type = NodeType::add("vector_math", create, NodeType::SHADER);
static NodeEnum type_enum;
- type_enum.insert("Add", NODE_VECTOR_MATH_ADD);
- type_enum.insert("Subtract", NODE_VECTOR_MATH_SUBTRACT);
- type_enum.insert("Average", NODE_VECTOR_MATH_AVERAGE);
- type_enum.insert("Dot Product", NODE_VECTOR_MATH_DOT_PRODUCT);
- type_enum.insert("Cross Product", NODE_VECTOR_MATH_CROSS_PRODUCT);
- type_enum.insert("Normalize", NODE_VECTOR_MATH_NORMALIZE);
+ type_enum.insert("add", NODE_VECTOR_MATH_ADD);
+ type_enum.insert("subtract", NODE_VECTOR_MATH_SUBTRACT);
+ type_enum.insert("average", NODE_VECTOR_MATH_AVERAGE);
+ type_enum.insert("dot_product", NODE_VECTOR_MATH_DOT_PRODUCT);
+ type_enum.insert("cross_product", NODE_VECTOR_MATH_CROSS_PRODUCT);
+ type_enum.insert("normalize", NODE_VECTOR_MATH_NORMALIZE);
SOCKET_ENUM(type, "Type", type_enum, NODE_VECTOR_MATH_ADD);
SOCKET_IN_VECTOR(vector1, "Vector1", make_float3(0.0f, 0.0f, 0.0f));
@@ -4658,9 +4658,9 @@ NODE_DEFINE(VectorTransformNode)
NodeType* type = NodeType::add("vector_transform", create, NodeType::SHADER);
static NodeEnum type_enum;
- type_enum.insert("Vector", NODE_VECTOR_TRANSFORM_TYPE_VECTOR);
- type_enum.insert("Point", NODE_VECTOR_TRANSFORM_TYPE_POINT);
- type_enum.insert("Normal", NODE_VECTOR_TRANSFORM_TYPE_NORMAL);
+ type_enum.insert("vector", NODE_VECTOR_TRANSFORM_TYPE_VECTOR);
+ type_enum.insert("point", NODE_VECTOR_TRANSFORM_TYPE_POINT);
+ type_enum.insert("normal", NODE_VECTOR_TRANSFORM_TYPE_NORMAL);
SOCKET_ENUM(type, "Type", type_enum, NODE_VECTOR_TRANSFORM_TYPE_VECTOR);
static NodeEnum space_enum;
@@ -5046,11 +5046,11 @@ NODE_DEFINE(NormalMapNode)
NodeType* type = NodeType::add("normal_map", create, NodeType::SHADER);
static NodeEnum space_enum;
- space_enum.insert("Tangent", NODE_NORMAL_MAP_TANGENT);
- space_enum.insert("Object", NODE_NORMAL_MAP_OBJECT);
- space_enum.insert("World", NODE_NORMAL_MAP_WORLD);
- space_enum.insert("Blender Object", NODE_NORMAL_MAP_BLENDER_OBJECT);
- space_enum.insert("Blender World", NODE_NORMAL_MAP_BLENDER_WORLD);
+ space_enum.insert("tangent", NODE_NORMAL_MAP_TANGENT);
+ space_enum.insert("object", NODE_NORMAL_MAP_OBJECT);
+ space_enum.insert("world", NODE_NORMAL_MAP_WORLD);
+ space_enum.insert("blender_object", NODE_NORMAL_MAP_BLENDER_OBJECT);
+ space_enum.insert("blender_world", NODE_NORMAL_MAP_BLENDER_WORLD);
SOCKET_ENUM(space, "Space", space_enum, NODE_TANGENT_RADIAL);
SOCKET_STRING(attribute, "Attribute", ustring(""));
@@ -5138,14 +5138,14 @@ NODE_DEFINE(TangentNode)
NodeType* type = NodeType::add("tangent", create, NodeType::SHADER);
static NodeEnum direction_type_enum;
- direction_type_enum.insert("Radial", NODE_TANGENT_RADIAL);
- direction_type_enum.insert("UV Map", NODE_TANGENT_UVMAP);
+ direction_type_enum.insert("radial", NODE_TANGENT_RADIAL);
+ direction_type_enum.insert("uv_map", NODE_TANGENT_UVMAP);
SOCKET_ENUM(direction_type, "Direction Type", direction_type_enum, NODE_TANGENT_RADIAL);
static NodeEnum axis_enum;
- axis_enum.insert("X", NODE_TANGENT_AXIS_X);
- axis_enum.insert("Y", NODE_TANGENT_AXIS_Y);
- axis_enum.insert("Z", NODE_TANGENT_AXIS_Z);
+ axis_enum.insert("x", NODE_TANGENT_AXIS_X);
+ axis_enum.insert("y", NODE_TANGENT_AXIS_Y);
+ axis_enum.insert("z", NODE_TANGENT_AXIS_Z);
SOCKET_ENUM(axis, "Axis", axis_enum, NODE_TANGENT_AXIS_X);
SOCKET_STRING(attribute, "Attribute", ustring(""));