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:
authorTon Roosendaal <ton@blender.org>2018-04-19 18:34:44 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-19 18:35:25 +0300
commit51b796ff1528c52cc8b4079fab1003671652a4d9 (patch)
tree0dfc2d2dabe5e77959264f5b6667897569290a41 /source/blender/makesrna/intern
parent785e8a636a293941a4295e669cb5aeecfafae039 (diff)
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually do it. Here it goes; Blender Internal. Bye bye, you did great! * Point density, voxel data, ocean, environment map textures were removed, as these only worked within BI rendering. Note that the ocean modifier and the Cycles point density shader node continue to work. * Dynamic paint using material shading was removed, as this only worked with BI. If we ever wanted to support this again probably it should go through the baking API. * GPU shader export through the Python API was removed. This only worked for the old BI GLSL shaders, which no longer exists. Doing something similar for Eevee would be significantly more complicated because it uses a lot of multiplass rendering and logic outside the shader, it's probably impractical. * Collada material import / export code is mostly gone, as it only worked for BI materials. We need to add Cycles / Eevee material support at some point. * The mesh noise operator was removed since it only worked with BI material texture slots. A displacement modifier can be used instead. * The delete texture paint slot operator was removed since it only worked for BI material texture slots. Could be added back with node support. * Not all legacy viewport features are supported in the new viewport, but their code was removed. If we need to bring anything back we can look at older git revisions. * There is some legacy viewport code that I could not remove yet, and some that I probably missed. * Shader node execution code was left mostly intact, even though it is not used anywhere now. We may eventually use this to replace the texture nodes with Cycles / Eevee shader nodes. * The Cycles Bake panel now includes settings for baking multires normal and displacement maps. The underlying code needs to be merged properly, and we plan to add back support for multires AO baking and add support to Cycles baking for features like vertex color, displacement, and other missing baking features. * This commit removes DNA and the Python API for BI material, lamp, world and scene settings. This breaks a lot of addons. * There is more DNA that can be removed or renamed, where Cycles or Eevee are reusing some old BI properties but the names are not really correct anymore. * Texture slots for materials, lamps and world were removed. They remain for brushes, particles and freestyle linestyles. * 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and other renderers use this to find all panels to show, minus a few panels that they have their own replacement for.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_color.c27
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c12
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c446
-rw-r--r--source/blender/makesrna/intern/rna_material.c1666
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c5
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c76
-rw-r--r--source/blender/makesrna/intern/rna_scene.c350
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c5
-rw-r--r--source/blender/makesrna/intern/rna_space.c68
-rw-r--r--source/blender/makesrna/intern/rna_texture.c611
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c51
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c1
-rw-r--r--source/blender/makesrna/intern/rna_world.c296
13 files changed, 17 insertions, 3597 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index d9b7a58de04..f895cfbbf0c 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -160,17 +160,6 @@ static char *rna_ColorRamp_path(PointerRNA *ptr)
ID *id = ptr->id.data;
switch (GS(id->name)) {
- case ID_MA: /* material has 2 cases - diffuse and specular */
- {
- Material *ma = (Material *)id;
-
- if (ptr->data == ma->ramp_col)
- path = BLI_strdup("diffuse_ramp");
- else if (ptr->data == ma->ramp_spec)
- path = BLI_strdup("specular_ramp");
- break;
- }
-
case ID_NT:
{
bNodeTree *ntree = (bNodeTree *)id;
@@ -245,22 +234,6 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
ID *id = ptr->id.data;
switch (GS(id->name)) {
- case ID_MA: /* 2 cases for material - diffuse and spec */
- {
- Material *ma = (Material *)id;
-
- /* try diffuse first */
- if (ma->ramp_col) {
- RNA_pointer_create(id, &RNA_ColorRamp, ma->ramp_col, &ramp_ptr);
- COLRAMP_GETPATH;
- }
- /* try specular if not diffuse */
- if (!path && ma->ramp_spec) {
- RNA_pointer_create(id, &RNA_ColorRamp, ma->ramp_spec, &ramp_ptr);
- COLRAMP_GETPATH;
- }
- break;
- }
case ID_NT:
{
bNodeTree *ntree = (bNodeTree *)id;
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index 466a01a7271..aeb845ddcf7 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -825,18 +825,6 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Paint Alpha", "Paint alpha");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
- prop = RNA_def_property(srna, "use_material", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_USE_MATERIAL);
- RNA_def_property_ui_text(prop, "Use object material", "Use object material to define color and influence");
- RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
-
- prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "mat");
- RNA_def_property_ui_text(prop, "Material",
- "Material to use (if not defined, material linked to the mesh is used)");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaint_redoModifier");
-
prop = RNA_def_property(srna, "use_absolute_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ABS_ALPHA);
RNA_def_property_ui_text(prop, "Absolute Alpha",
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 9e28e31057d..7e437a8a51f 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -63,33 +63,6 @@ static void rna_Lamp_buffer_size_set(PointerRNA *ptr, int value)
la->bufsize &= (~15); /* round to multiple of 16 */
}
-static PointerRNA rna_Lamp_sky_settings_get(PointerRNA *ptr)
-{
- return rna_pointer_inherit_refine(ptr, &RNA_LampSkySettings, ptr->id.data);
-}
-
-static void rna_Lamp_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- Lamp *la = (Lamp *)ptr->data;
- rna_iterator_array_begin(iter, (void *)la->mtex, sizeof(MTex *), MAX_MTEX, 0, NULL);
-}
-
-static PointerRNA rna_Lamp_active_texture_get(PointerRNA *ptr)
-{
- Lamp *la = (Lamp *)ptr->data;
- Tex *tex;
-
- tex = give_current_lamp_texture(la);
- return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
-}
-
-static void rna_Lamp_active_texture_set(PointerRNA *ptr, PointerRNA value)
-{
- Lamp *la = (Lamp *)ptr->data;
-
- set_current_lamp_texture(la, value.data);
-}
-
static int rna_use_shadow_get(PointerRNA *ptr)
{
Lamp *la = (Lamp *)ptr->data;
@@ -147,14 +120,6 @@ static void rna_Lamp_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Poin
WM_main_add_notifier(NC_LAMP | ND_LIGHTING_DRAW, la);
}
-static void rna_Lamp_sky_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
-{
- Lamp *la = ptr->id.data;
-
- DEG_id_tag_update(&la->id, 0);
- WM_main_add_notifier(NC_LAMP | ND_SKY, la);
-}
-
static void rna_Lamp_use_nodes_update(bContext *C, PointerRNA *ptr)
{
Lamp *la = (Lamp *)ptr->data;
@@ -176,167 +141,6 @@ const EnumPropertyItem rna_enum_lamp_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static void rna_def_lamp_mtex(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_texture_coordinates_items[] = {
- {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
- {TEXCO_VIEW, "VIEW", 0, "View", "Use view coordinates for the texture coordinates"},
- {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "LampTextureSlot", "TextureSlot");
- RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "Lamp Texture Slot", "Texture slot for textures in a Lamp data-block");
-
- prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "texco");
- RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
- RNA_def_property_ui_text(prop, "Texture Coordinates", "");
-
- prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
-
- prop = RNA_def_property(srna, "use_map_color", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_COL);
- RNA_def_property_ui_text(prop, "Color", "Let the texture affect the basic color of the lamp");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_map_shadow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", LAMAP_SHAD);
- RNA_def_property_ui_text(prop, "Shadow", "Let the texture affect the shadow color of the lamp");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "shadowfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-}
-
-static void rna_def_lamp_sky_settings(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_skycolorspace_items[] = {
- {0, "SMPTE", 0, "SMPTE", ""},
- {1, "REC709", 0, "REC709", ""},
- {2, "CIE", 0, "CIE", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "LampSkySettings", NULL);
- RNA_def_struct_sdna(srna, "Lamp");
- RNA_def_struct_nested(brna, srna, "SunLamp");
- RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp");
-
- prop = RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace");
- RNA_def_property_enum_items(prop, prop_skycolorspace_items);
- RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
- RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items);
- RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- /* Number values */
-
- prop = RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Size", "Sun size");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
- RNA_def_property_range(prop, 1.0f, 30.0f);
- RNA_def_property_ui_range(prop, 2.0f, 10.0f, 1, 2);
- RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor");
- RNA_def_property_range(prop, 0.0f, 500.0f);
- RNA_def_property_ui_text(prop, "Atmosphere Distance Factor",
- "Multiplier to convert blender units to physical distance");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
- RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 20.0f);
- RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- /* boolean */
-
- prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
- RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-
- prop = RNA_def_property(srna, "use_atmosphere", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
- RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere");
- RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
-}
-
static void rna_def_lamp(BlenderRNA *brna)
{
StructRNA *srna;
@@ -372,26 +176,6 @@ static void rna_def_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Color", "Light color");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop = RNA_def_property(srna, "use_own_layer", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER);
- RNA_def_property_ui_text(prop, "Layer", "Illuminate objects only on the same layers the lamp is on");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_negative", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_NEG);
- RNA_def_property_ui_text(prop, "Negative", "Cast negative light");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_specular", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_SPEC);
- RNA_def_property_ui_text(prop, "Specular", "Create specular highlights");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
- RNA_def_property_ui_text(prop, "Diffuse", "Do diffuse shading");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
/* nodes */
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
@@ -406,11 +190,6 @@ static void rna_def_lamp(BlenderRNA *brna)
/* common */
rna_def_animdata_common(srna);
-
- /* textures */
- rna_def_mtex_common(brna, srna, "rna_Lamp_mtex_begin", "rna_Lamp_active_texture_get",
- "rna_Lamp_active_texture_set", NULL, "LampTextureSlot", "LampTextureSlots",
- "rna_Lamp_draw_update", "rna_Lamp_draw_update");
}
static void rna_def_lamp_falloff(StructRNA *srna)
@@ -437,11 +216,6 @@ static void rna_def_lamp_falloff(StructRNA *srna)
RNA_def_property_ui_text(prop, "Falloff Curve", "Custom Lamp Falloff Curve");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "use_sphere", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SPHERE);
- RNA_def_property_ui_text(prop, "Sphere", "Set light intensity to zero beyond lamp distance");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
prop = RNA_def_property(srna, "linear_attenuation", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "att1");
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -476,79 +250,14 @@ static void rna_def_lamp_falloff(StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
-static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
+static void rna_def_lamp_shadow(StructRNA *srna, int sun)
{
PropertyRNA *prop;
- static const EnumPropertyItem prop_shadow_items[] = {
- {0, "NOSHADOW", 0, "No Shadow", ""},
- {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_spot_shadow_items[] = {
- {0, "NOSHADOW", 0, "No Shadow", ""},
- {LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Let spotlight produce shadows using shadow buffer"},
- {LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_ray_sampling_method_items[] = {
- {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
- {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_spot_ray_sampling_method_items[] = {
- {LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
- {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
- {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_shadbuftype_items[] = {
- {LA_SHADBUF_REGULAR, "REGULAR", 0, "Classical", "Classic shadow buffer"},
- {LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway",
- "Regular buffer, averaging the closest and 2nd closest Z value to reducing "
- "bias artifacts"},
- {LA_SHADBUF_IRREGULAR, "IRREGULAR", 0, "Irregular",
- "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing"},
- {LA_SHADBUF_DEEP, "DEEP", 0, "Deep",
- "Deep shadow buffer supports transparency and better filtering, at the cost of "
- "more memory usage and processing time"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_shadbuffiltertype_items[] = {
- {LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
- {LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
- {LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_numbuffer_items[] = {
- {1, "BUFFERS_1", 0, "1", "Only one buffer rendered"},
- {4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"},
- {9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"},
- {0, NULL, 0, NULL, NULL}
- };
-
- /* GE only */
- static const EnumPropertyItem prop_ge_shadowbuffer_type_items[] = {
- {LA_SHADMAP_SIMPLE, "SIMPLE", 0, "Simple", "Simple shadow maps"},
- {LA_SHADMAP_VARIANCE, "VARIANCE", 0, "Variance", "Variance shadow maps"},
- {0, NULL, 0, NULL, NULL}
- };
-
prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_use_shadow_get", "rna_use_shadow_set");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop = RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, (spot) ? prop_spot_shadow_items : prop_shadow_items);
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
prop = RNA_def_property(srna, "shadow_buffer_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "bufsize");
RNA_def_property_range(prop, 128, 10240);
@@ -558,19 +267,6 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
RNA_def_property_int_funcs(prop, NULL, "rna_Lamp_buffer_size_set", NULL);
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "shadow_filter_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "filtertype");
- RNA_def_property_enum_items(prop, prop_shadbuffiltertype_items);
- RNA_def_property_ui_text(prop, "Shadow Filter Type", "Type of shadow filter (Buffer Shadows)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_sample_buffers", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buffers");
- RNA_def_property_enum_items(prop, prop_numbuffer_items);
- RNA_def_property_ui_text(prop, "Shadow Sample Buffers",
- "Number of shadow buffers to render for better AA, this increases memory usage");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 9999.0f);
@@ -616,77 +312,12 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
RNA_def_property_ui_text(prop, "Samples", "Number of shadow buffer samples");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "shadow_buffer_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "buftype");
- RNA_def_property_enum_items(prop, prop_shadbuftype_items);
- RNA_def_property_ui_text(prop, "Shadow Buffer Type", "Type of shadow buffer");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "ge_shadow_buffer_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "shadowmap_type");
- RNA_def_property_enum_items(prop, prop_ge_shadowbuffer_type_items);
- RNA_def_property_ui_text(prop, "Shadow Map Type", "The shadow mapping algorithm used");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
-
- prop = RNA_def_property(srna, "use_auto_clip_start", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_START);
- RNA_def_property_ui_text(prop, "Autoclip Start",
- "Automatic calculation of clipping-start, based on visible vertices");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "use_auto_clip_end", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bufflag", LA_SHADBUF_AUTO_END);
- RNA_def_property_ui_text(prop, "Autoclip End", "Automatic calculation of clipping-end, based on visible vertices");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "compression_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "compressthresh");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Compress", "Deep shadow map compression threshold");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_ONLYSHADOW);
- RNA_def_property_ui_text(prop, "Only Shadow", "Cast shadows only, without illuminating objects");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "shadow_ray_sample_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method");
- RNA_def_property_enum_items(prop, (area) ? prop_spot_ray_sampling_method_items : prop_ray_sampling_method_items);
- RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method",
- "Method for generating shadow samples: Adaptive QMC is fastest, "
- "Constant QMC is less noisy but slower");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, (area) ? "shadow_ray_samples_x" : "shadow_ray_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ray_samp");
- RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, (area) ? "Shadow Ray Samples" : "Shadow Ray Samples X",
- "Number of samples taken extra (samples x samples)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- if (area) {
- prop = RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
- RNA_def_property_range(prop, 1, 64);
- RNA_def_property_ui_text(prop, "Shadow Ray Samples Y",
- "Number of samples taken extra (samples x samples)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
- }
-
- prop = RNA_def_property(srna, "shadow_adaptive_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "adapt_thresh");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
@@ -694,11 +325,6 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)");
RNA_def_property_update(prop, 0, "rna_Lamp_update");
- prop = RNA_def_property(srna, "use_shadow_layer", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_LAYER_SHADOW);
- RNA_def_property_ui_text(prop, "Shadow Layer", "Objects on the same layers only cast shadows");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
/* Eevee */
prop = RNA_def_property(srna, "use_contact_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHAD_CONTACT);
@@ -771,7 +397,7 @@ static void rna_def_point_lamp(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_LAMP_POINT);
rna_def_lamp_falloff(srna);
- rna_def_lamp_shadow(srna, 0, 0, 0);
+ rna_def_lamp_shadow(srna, 0);
}
static void rna_def_area_lamp(BlenderRNA *brna)
@@ -790,24 +416,9 @@ static void rna_def_area_lamp(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Area Lamp", "Directional area lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_AREA);
- rna_def_lamp_shadow(srna, 0, 1, 0);
+ rna_def_lamp_shadow(srna, 0);
rna_def_lamp_falloff(srna);
- prop = RNA_def_property(srna, "use_umbra", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_UMBRA);
- RNA_def_property_ui_text(prop, "Umbra", "Emphasize parts that are fully shadowed (Constant Jittered sampling)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_dither", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_DITHER);
- RNA_def_property_ui_text(prop, "Dither", "Use 2x2 dithering for sampling (Constant Jittered sampling)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "use_jitter", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "ray_samp_type", LA_SAMP_JITTER);
- RNA_def_property_ui_text(prop, "Jitter", "Use noise for sampling (Constant Jittered sampling)");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "area_shape");
RNA_def_property_enum_items(prop, prop_areashape_items);
@@ -828,12 +439,6 @@ static void rna_def_area_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Size Y",
"Size of the area of the area Lamp in the Y direction for Rectangle shapes");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "k");
- RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
}
static void rna_def_spot_lamp(BlenderRNA *brna)
@@ -847,30 +452,13 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_LAMP_SPOT);
rna_def_lamp_falloff(srna);
- rna_def_lamp_shadow(srna, 1, 0, 0);
+ rna_def_lamp_shadow(srna, 0);
prop = RNA_def_property(srna, "use_square", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SQUARE);
RNA_def_property_ui_text(prop, "Square", "Cast a square spot light shape");
RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
- prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_HALO);
- RNA_def_property_ui_text(prop, "Halo", "Render spotlight with a volumetric halo");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "haint");
- RNA_def_property_ui_range(prop, 0, 5.0, 0.1, 3);
- RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
- prop = RNA_def_property(srna, "halo_step", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "shadhalostep");
- RNA_def_property_range(prop, 0, 12);
- RNA_def_property_ui_text(prop, "Halo Step", "Volumetric halo sampling frequency");
- RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
prop = RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spotblend");
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -893,36 +481,13 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
static void rna_def_sun_lamp(BlenderRNA *brna)
{
StructRNA *srna;
- PropertyRNA *prop;
srna = RNA_def_struct(brna, "SunLamp", "Lamp");
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_ui_text(srna, "Sun Lamp", "Constant direction parallel ray lamp");
RNA_def_struct_ui_icon(srna, ICON_LAMP_SUN);
- rna_def_lamp_shadow(srna, 0, 0, 1);
-
- /* sky */
- prop = RNA_def_property(srna, "sky", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "LampSkySettings");
- RNA_def_property_pointer_funcs(prop, "rna_Lamp_sky_settings_get", NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Sky Settings", "Sky related settings for sun lamps");
-
- rna_def_lamp_sky_settings(brna);
-
- /* BGE Only */
- prop = RNA_def_property(srna, "shadow_frustum_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "shadow_frustum_size");
- RNA_def_property_ui_range(prop, 0.001, 100.0, 2, 1);
- RNA_def_property_ui_text(prop, "Frustum Size", "Size of the frustum used for creating the shadow map");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
-
- prop = RNA_def_property(srna, "show_shadow_box", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHOW_SHADOW_BOX);
- RNA_def_property_ui_text(prop, "Show Shadow Box",
- "Draw a box in 3D view to visualize which objects are contained in it");
- RNA_def_property_update(prop, 0, "rna_Lamp_draw_update");
+ rna_def_lamp_shadow(srna, 1);
}
static void rna_def_hemi_lamp(BlenderRNA *brna)
@@ -943,7 +508,6 @@ void RNA_def_lamp(BlenderRNA *brna)
rna_def_spot_lamp(brna);
rna_def_sun_lamp(brna);
rna_def_hemi_lamp(brna);
- rna_def_lamp_mtex(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index d800022ec82..0621c1e1ad6 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -38,22 +38,6 @@
#include "WM_api.h"
#include "WM_types.h"
-static const EnumPropertyItem prop_texture_coordinates_items[] = {
- {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
- {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
- {TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"},
- {TEXCO_ORCO, "ORCO", 0, "Generated", "Use the original undeformed coordinates of the object"},
- {TEXCO_STRAND, "STRAND", 0, "Strand / Particle",
- "Use normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
- {TEXCO_WINDOW, "WINDOW", 0, "Window", "Use screen coordinates as texture coordinates"},
- {TEXCO_NORM, "NORMAL", 0, "Normal", "Use normal vector as texture coordinates"},
- {TEXCO_REFL, "REFLECTION", 0, "Reflection", "Use reflection vector as texture coordinates"},
- {TEXCO_STRESS, "STRESS", 0, "Stress",
- "Use the difference of edge lengths compared to original coordinates of the mesh"},
- {TEXCO_TANGENT, "TANGENT", 0, "Tangent", "Use the optional tangent vector as texture coordinates"},
- {0, NULL, 0, NULL, NULL}
-};
-
const EnumPropertyItem rna_enum_ramp_blend_items[] = {
{MA_RAMP_BLEND, "MIX", 0, "Mix", ""},
{MA_RAMP_ADD, "ADD", 0, "Add", ""},
@@ -133,42 +117,6 @@ static PointerRNA rna_Material_mirror_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_MaterialRaytraceMirror, ptr->id.data);
}
-static PointerRNA rna_Material_transp_get(PointerRNA *ptr)
-{
- return rna_pointer_inherit_refine(ptr, &RNA_MaterialRaytraceTransparency, ptr->id.data);
-}
-
-static PointerRNA rna_Material_halo_get(PointerRNA *ptr)
-{
- return rna_pointer_inherit_refine(ptr, &RNA_MaterialHalo, ptr->id.data);
-}
-
-static PointerRNA rna_Material_sss_get(PointerRNA *ptr)
-{
- return rna_pointer_inherit_refine(ptr, &RNA_MaterialSubsurfaceScattering, ptr->id.data);
-}
-
-static PointerRNA rna_Material_strand_get(PointerRNA *ptr)
-{
- return rna_pointer_inherit_refine(ptr, &RNA_MaterialStrand, ptr->id.data);
-}
-
-static void rna_Material_type_set(PointerRNA *ptr, int value)
-{
- Material *ma = (Material *)ptr->data;
-
- if (ma->material_type == MA_TYPE_HALO && value != MA_TYPE_HALO)
- ma->mode &= ~(MA_STAR | MA_HALO_XALPHA | MA_ZINV | MA_ENV);
-
- ma->material_type = value;
-}
-
-static void rna_Material_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- Material *ma = (Material *)ptr->data;
- rna_iterator_array_begin(iter, (void *)ma->mtex, sizeof(MTex *), MAX_MTEX, 0, NULL);
-}
-
static void rna_Material_texpaint_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Material *ma = (Material *)ptr->data;
@@ -229,124 +177,6 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s
WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma);
}
-static PointerRNA rna_Material_active_texture_get(PointerRNA *ptr)
-{
- Material *ma = (Material *)ptr->data;
- Tex *tex;
-
- tex = give_current_material_texture(ma);
- return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
-}
-
-static void rna_Material_active_texture_set(PointerRNA *ptr, PointerRNA value)
-{
- Material *ma = (Material *)ptr->data;
-
- set_current_material_texture(ma, value.data);
-}
-
-static int rna_Material_active_texture_editable(PointerRNA *ptr, const char **UNUSED(r_info))
-{
- Material *ma = (Material *)ptr->id.data;
-
- return has_current_material_texture(ma) ? PROP_EDITABLE : 0;
-}
-
-static PointerRNA rna_Material_active_node_material_get(PointerRNA *ptr)
-{
- Material *ma = give_node_material((Material *)ptr->data);
- return rna_pointer_inherit_refine(ptr, &RNA_Material, ma);
-}
-
-static void rna_Material_active_node_material_set(PointerRNA *ptr, PointerRNA value)
-{
- Material *ma = (Material *)ptr->data;
- Material *ma_act = value.data;
-
- nodeSetActiveID(ma->nodetree, ID_MA, &ma_act->id);
-}
-
-static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max,
- float *UNUSED(softmin), float *UNUSED(softmax))
-{
- Material *ma = (Material *)ptr->id.data;
-
- if (ma->mode & MA_STR_B_UNITS) {
- *min = 0.0001f;
- *max = 2.0f;
- }
- else {
- *min = 0.25f;
- *max = 20.0f;
- }
-}
-
-static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max,
- float *UNUSED(softmin), float *UNUSED(softmax))
-{
- Material *ma = (Material *)ptr->id.data;
-
- if (ma->mode & MA_STR_B_UNITS) {
- *min = 0.0001f;
- *max = 1.0f;
- }
- else {
- *min = 0.25f;
- *max = 10.0f;
- }
-}
-
-static int rna_MaterialTextureSlot_use_get(PointerRNA *ptr)
-{
- Material *ma = (Material *)ptr->id.data;
- MTex *mtex = (MTex *)ptr->data;
- int a;
-
- for (a = 0; a < MAX_MTEX; a++)
- if (ma->mtex[a] == mtex)
- return (ma->septex & (1 << a)) == 0;
-
- return 0;
-}
-
-static void rna_MaterialTextureSlot_use_set(PointerRNA *ptr, int value)
-{
- Material *ma = (Material *)ptr->id.data;
- MTex *mtex = (MTex *)ptr->data;
- int a;
-
- for (a = 0; a < MAX_MTEX; a++) {
- if (ma->mtex[a] == mtex) {
- if (value)
- ma->septex &= ~(1 << a);
- else
- ma->septex |= (1 << a);
- }
- }
-}
-
-static void rna_Material_use_diffuse_ramp_set(PointerRNA *ptr, int value)
-{
- Material *ma = (Material *)ptr->data;
-
- if (value) ma->mode |= MA_RAMP_COL;
- else ma->mode &= ~MA_RAMP_COL;
-
- if ((ma->mode & MA_RAMP_COL) && ma->ramp_col == NULL)
- ma->ramp_col = BKE_colorband_add(false);
-}
-
-static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, int value)
-{
- Material *ma = (Material *)ptr->data;
-
- if (value) ma->mode |= MA_RAMP_SPEC;
- else ma->mode &= ~MA_RAMP_SPEC;
-
- if ((ma->mode & MA_RAMP_SPEC) && ma->ramp_spec == NULL)
- ma->ramp_spec = BKE_colorband_add(false);
-}
-
static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr)
{
Material *ma = (Material *)ptr->data;
@@ -359,36 +189,6 @@ static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr)
rna_Material_draw_update(bmain, CTX_data_scene(C), ptr);
}
-static const EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), bool *r_free)
-{
- Material *ma = (Material *)ptr->id.data;
- EnumPropertyItem *item = NULL;
- int totitem = 0;
-
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_GLOB);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_OBJECT);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_ORCO);
-
- if (ma->material_type == MA_TYPE_VOLUME) {
- /* pass */
- }
- else if (ELEM(ma->material_type, MA_TYPE_SURFACE, MA_TYPE_HALO, MA_TYPE_WIRE)) {
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_UV);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STRAND);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_WINDOW);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_NORM);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_REFL);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_STRESS);
- RNA_enum_items_add_value(&item, &totitem, prop_texture_coordinates_items, TEXCO_TANGENT);
- }
-
- RNA_enum_item_end(&item, &totitem);
- *r_free = true;
-
- return item;
-}
-
MTex *rna_mtex_texture_slots_add(ID *self_id, struct bContext *C, ReportList *reports)
{
MTex *mtex = BKE_texture_mtex_add_id(self_id, -1);
@@ -450,406 +250,10 @@ void rna_mtex_texture_slots_clear(ID *self_id, struct bContext *C, ReportList *r
#else
-static void rna_def_material_mtex(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_mapping_items[] = {
- {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
- {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
- {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
- {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Map with Z as central axis"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_x_mapping_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "X", 0, "X", ""},
- {2, "Y", 0, "Y", ""},
- {3, "Z", 0, "Z", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_y_mapping_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "X", 0, "X", ""},
- {2, "Y", 0, "Y", ""},
- {3, "Z", 0, "Z", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_z_mapping_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "X", 0, "X", ""},
- {2, "Y", 0, "Y", ""},
- {3, "Z", 0, "Z", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_normal_map_space_items[] = {
- {MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""},
- {MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""},
- {MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""},
- {MTEX_NSPACE_TANGENT, "TANGENT", 0, "Tangent", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_bump_method_items[] = {
- {0, "BUMP_ORIGINAL", 0, "Original", ""},
- {MTEX_COMPAT_BUMP, "BUMP_COMPATIBLE", 0, "Compatible", ""},
- {MTEX_3TAP_BUMP, "BUMP_LOW_QUALITY", 0, "Low Quality", "Use 3 tap filtering"},
- {MTEX_5TAP_BUMP, "BUMP_MEDIUM_QUALITY", 0, "Medium Quality", "Use 5 tap filtering"},
- {MTEX_BICUBIC_BUMP, "BUMP_BEST_QUALITY", 0,
- "Best Quality", "Use bicubic filtering (requires OpenGL 3.0+, it will fall back on "
- "medium setting for other systems)"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_bump_space_items[] = {
- {0, "BUMP_VIEWSPACE", 0, "ViewSpace", ""},
- {MTEX_BUMP_OBJECTSPACE, "BUMP_OBJECTSPACE", 0, "ObjectSpace", ""},
- {MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, "TextureSpace", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "MaterialTextureSlot", "TextureSlot");
- RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "Material Texture Slot", "Texture slot for textures in a Material data-block");
-
- prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "texco");
- RNA_def_property_enum_items(prop, prop_texture_coordinates_items);
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Material_texture_coordinates_itemf");
- RNA_def_property_ui_text(prop, "Texture Coordinates", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "uvname");
- RNA_def_property_ui_text(prop, "UV Map", "UV map to use for mapping with UV texture coordinates");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_from_dupli", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO);
- RNA_def_property_ui_text(prop, "From Dupli",
- "Dupli's instanced from verts, faces or particles, inherit texture coordinate "
- "from their parent");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_to_bounds", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_MAPTO_BOUNDS);
- RNA_def_property_ui_text(prop, "Map to Bounds",
- "Map coordinates in object bounds");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_from_original", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG);
- RNA_def_property_ui_text(prop, "From Original",
- "Dupli's derive their object coordinates from the original object's transformation");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COL);
- RNA_def_property_ui_text(prop, "Diffuse Color", "The texture affects basic color of the material");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_normal", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_NORM);
- RNA_def_property_ui_text(prop, "Normal", "The texture affects the rendered normal");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_color_spec", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLSPEC);
- RNA_def_property_ui_text(prop, "Specular Color", "The texture affects the specularity color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_mirror", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_COLMIR);
- RNA_def_property_ui_text(prop, "Mirror", "The texture affects the mirror color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REF);
- RNA_def_property_ui_text(prop, "Diffuse", "The texture affects the value of diffuse reflectivity");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_specular", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SPEC);
- RNA_def_property_ui_text(prop, "Specular", "The texture affects the value of specular reflectivity");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_ambient", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_AMB);
- RNA_def_property_ui_text(prop, "Ambient", "The texture affects the value of ambient");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_hardness", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_HAR);
- RNA_def_property_ui_text(prop, "Hardness", "The texture affects the hardness value");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_raymir", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_RAYMIRR);
- RNA_def_property_ui_text(prop, "Ray-Mirror", "The texture affects the ray-mirror value");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_alpha", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_ALPHA);
- RNA_def_property_ui_text(prop, "Alpha", "The texture affects the alpha value");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_emit", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMIT);
- RNA_def_property_ui_text(prop, "Emit", "The texture affects the emit value");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_translucency", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSLU);
- RNA_def_property_ui_text(prop, "Translucency", "The texture affects the translucency value");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_displacement", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DISPLACE);
- RNA_def_property_ui_text(prop, "Displacement", "Let the texture displace the surface");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_warp", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_WARP);
- RNA_def_property_ui_text(prop, "Warp", "Let the texture warp texture coordinates of next channels");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "mapping_x", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "projx");
- RNA_def_property_enum_items(prop, prop_x_mapping_items);
- RNA_def_property_ui_text(prop, "X Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "mapping_y", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "projy");
- RNA_def_property_enum_items(prop, prop_y_mapping_items);
- RNA_def_property_ui_text(prop, "Y Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "mapping_z", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "projz");
- RNA_def_property_enum_items(prop, prop_z_mapping_items);
- RNA_def_property_ui_text(prop, "Z Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_mapping_items);
- RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "normapspace");
- RNA_def_property_enum_items(prop, prop_normal_map_space_items);
- RNA_def_property_ui_text(prop, "Normal Map Space", "Set space of normal map image");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "norfac");
- RNA_def_property_ui_range(prop, -5, 5, 10, 3);
- RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "displacement_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "dispfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Displacement Factor", "Amount texture displaces the surface");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "warp_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "warpfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Warp Factor", "Amount texture affects texture coordinates of next channels");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_color_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colspecfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_color_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Diffuse Color Factor", "Amount texture affects diffuse color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "mirror_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "mirrfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Mirror Factor", "Amount texture affects mirror color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "alpha_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "alphafac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Alpha Factor", "Amount texture affects alpha");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "difffac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Diffuse Factor", "Amount texture affects diffuse reflectivity");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "specfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Specular Factor", "Amount texture affects specular reflectivity");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "emit_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "emitfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emit Factor", "Amount texture affects emission");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "hardness_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "hardfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Hardness Factor", "Amount texture affects hardness");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "raymir_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "raymirrfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Ray Mirror Factor", "Amount texture affects ray mirror");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "translucency_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "translfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Translucency Factor", "Amount texture affects translucency");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "ambient_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ambfac");
- RNA_def_property_ui_range(prop, -1, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Ambient Factor", "Amount texture affects ambient");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- /* volume material */
- prop = RNA_def_property(srna, "use_map_color_emission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION_COL);
- RNA_def_property_ui_text(prop, "Emission Color", "The texture affects the color of emission");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_color_reflection", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION_COL);
- RNA_def_property_ui_text(prop, "Reflection Color", "The texture affects the color of scattered light");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_color_transmission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSMISSION_COL);
- RNA_def_property_ui_text(prop, "Transmission Color",
- "The texture affects the result color after other light has been scattered/absorbed");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop = RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_DENSITY);
- RNA_def_property_ui_text(prop, "Density", "The texture affects the volume's density");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_emission", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_EMISSION);
- RNA_def_property_ui_text(prop, "Emission", "The texture affects the volume's emission");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_scatter", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_SCATTERING);
- RNA_def_property_ui_text(prop, "Scattering", "The texture affects the volume's scattering");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_map_reflect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_REFLECTION);
- RNA_def_property_ui_text(prop, "Reflection", "The texture affects the reflected light's brightness");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop = RNA_def_property(srna, "emission_color_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colemitfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emission Color Factor", "Amount texture affects emission color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "reflection_color_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colreflfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Reflection Color Factor", "Amount texture affects color of out-scattered light");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "transmission_color_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "coltransfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Transmission Color Factor",
- "Amount texture affects result color after light has been scattered/absorbed");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop = RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "densfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Density Factor", "Amount texture affects density");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "emission_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "emitfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Emission Factor", "Amount texture affects emission");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "scattering_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "scatterfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Scattering Factor", "Amount texture affects scattering");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "reflection_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "reflfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Reflection Factor", "Amount texture affects brightness of out-scattered light");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- /* end volume material */
-
- prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_MaterialTextureSlot_use_get", "rna_MaterialTextureSlot_use_set");
- RNA_def_property_ui_text(prop, "Enabled", "Enable this material texture slot");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "bump_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag");
- RNA_def_property_enum_items(prop, prop_bump_method_items);
- RNA_def_property_ui_text(prop, "Bump Method", "Method to use for bump mapping");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "bump_objectspace", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "texflag");
- RNA_def_property_enum_items(prop, prop_bump_space_items);
- RNA_def_property_ui_text(prop, "Bump Space", "Space to apply bump mapping in");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
static void rna_def_material_colors(StructRNA *srna)
{
PropertyRNA *prop;
- static const EnumPropertyItem prop_ramp_input_items[] = {
- {MA_RAMP_IN_SHADER, "SHADER", 0, "Shader", ""},
- {MA_RAMP_IN_ENERGY, "ENERGY", 0, "Energy", ""},
- {MA_RAMP_IN_NOR, "NORMAL", 0, "Normal", ""},
- {MA_RAMP_IN_RESULT, "RESULT", 0, "Result", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
prop = RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
@@ -862,84 +266,17 @@ static void rna_def_material_colors(StructRNA *srna)
RNA_def_property_ui_text(prop, "Specular Color", "Specular color of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop = RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "mirr");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
+ prop = RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "spec");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Specular Intensity", "How intense (bright) the specular reflection is");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
prop = RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
- prop = RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "spectra");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- /* Color bands */
- prop = RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_COL);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_diffuse_ramp_set");
- RNA_def_property_ui_text(prop, "Use Diffuse Ramp", "Toggle diffuse ramp operations");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_ramp", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "ramp_col");
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Diffuse Ramp", "Color ramp used to affect diffuse shading");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_specular_ramp", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAMP_SPEC);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_specular_ramp_set");
- RNA_def_property_ui_text(prop, "Use Specular Ramp", "Toggle specular ramp operations");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_ramp", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "ramp_spec");
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Specular Ramp", "Color ramp used to affect specular shading");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_ramp_blend", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "rampblend_col");
- RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items);
- RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "Blending method of the ramp and the diffuse color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "rampblend_spec");
- RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items);
- RNA_def_property_ui_text(prop, "Specular Ramp Blend", "Blending method of the ramp and the specular color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_ramp_input", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "rampin_col");
- RNA_def_property_enum_items(prop, prop_ramp_input_items);
- RNA_def_property_ui_text(prop, "Diffuse Ramp Input", "How the ramp maps on the surface");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_ramp_input", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "rampin_spec");
- RNA_def_property_enum_items(prop, prop_ramp_input_items);
- RNA_def_property_ui_text(prop, "Specular Ramp Input", "How the ramp maps on the surface");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_ramp_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "rampfac_col");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Ramp Factor", "Blending factor (also uses alpha in Colorband)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_ramp_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "rampfac_spec");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Ramp Factor", "Blending factor (also uses alpha in Colorband)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
/* Freestyle line color */
prop = RNA_def_property(srna, "line_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "line_col");
@@ -955,724 +292,28 @@ static void rna_def_material_colors(StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Material_update");
}
-static void rna_def_material_diffuse(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_diff_shader_items[] = {
- {MA_DIFF_LAMBERT, "LAMBERT", 0, "Lambert", "Use a Lambertian shader"},
- {MA_DIFF_ORENNAYAR, "OREN_NAYAR", 0, "Oren-Nayar", "Use an Oren-Nayar shader"},
- {MA_DIFF_TOON, "TOON", 0, "Toon", "Use a toon shader"},
- {MA_DIFF_MINNAERT, "MINNAERT", 0, "Minnaert", "Use a Minnaert shader"},
- {MA_DIFF_FRESNEL, "FRESNEL", 0, "Fresnel", "Use a Fresnel shader"},
- {0, NULL, 0, NULL, NULL}
- };
-
- prop = RNA_def_property(srna, "diffuse_shader", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "diff_shader");
- RNA_def_property_enum_items(prop, prop_diff_shader_items);
- RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_intensity", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "ref");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Intensity", "Amount of diffuse reflection");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "roughness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 3.14f);
- RNA_def_property_ui_text(prop, "Roughness", "Oren-Nayar Roughness");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_toon_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "param[0]");
- RNA_def_property_range(prop, 0.0f, 3.14f);
- RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "param[1]");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_fresnel", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "param[1]");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Diffuse Fresnel", "Power of Fresnel");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "diffuse_fresnel_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "param[0]");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Diffuse Fresnel Factor", "Blending factor of Fresnel");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "darkness", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0.0f, 2.0f);
- RNA_def_property_ui_text(prop, "Darkness", "Minnaert darkness");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
static void rna_def_material_raymirror(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem prop_fadeto_mir_items[] = {
- {MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""},
- {MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
srna = RNA_def_struct(brna, "MaterialRaytraceMirror", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Raytrace Mirror", "Raytraced reflection settings for a Material data-block");
- prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYMIRROR); /* use bitflags */
- RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
prop = RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Reflectivity", "Amount of mirror reflection for raytrace");
RNA_def_property_update(prop, 0, "rna_Material_update");
- prop = RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fresnel_mir");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
prop = RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Amount",
"The shininess of the reflection (values < 1.0 give diffuse, blurry reflections)");
RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Anisotropy",
- "The shape of the reflection, from 0.0 (circular) to 1.0 "
- "(fully stretched along the tangent");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "samp_gloss_mir");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Threshold",
- "Threshold for adaptive sampling (if a sample contributes less than "
- "this amount [as a percentage], sampling is stopped)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "ray_depth");
- RNA_def_property_ui_range(prop, 0, 100, 1, 3);
- RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "dist_mir");
- RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Maximum Distance",
- "Maximum distance of reflected rays (reflections further than this "
- "range fade to sky color or material color)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
- RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
- RNA_def_property_ui_text(prop, "Fade-out Color",
- "The color that rays with no intersection within the Max Distance take "
- "(material color can be best for indoor scenes, sky color for outdoor)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
-static void rna_def_material_raytra(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "MaterialRaytraceTransparency", NULL);
- RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Raytrace Transparency",
- "Raytraced refraction settings for a Material data-block");
-
- prop = RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ang");
- RNA_def_property_range(prop, 0.25f, 4.0f);
- RNA_def_property_ui_text(prop, "IOR", "Angular index of refraction for raytraced refraction");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "fresnel_tra");
- RNA_def_property_range(prop, 0.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
- RNA_def_property_range(prop, 1.0f, 5.0f);
- RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Amount",
- "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "samp_gloss_tra");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Threshold",
- "Threshold for adaptive sampling. If a sample contributes less than "
- "this amount (as a percentage), sampling is stopped");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "ray_depth_tra");
- RNA_def_property_ui_range(prop, 0, 100, 1, 3);
- RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "filter");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Filter",
- "Amount to blend in the material's diffuse color in raytraced "
- "transparency (simulating absorption)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "depth_max", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "tx_limit");
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Limit",
- "Maximum depth for light to travel through the transparent material "
- "before becoming fully filtered (0.0 is disabled)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "tx_falloff");
- RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
-static void rna_def_material_volume(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_lighting_items[] = {
- {MA_VOL_SHADE_SHADELESS, "SHADELESS", 0, "Shadeless", "Do not calculate lighting and shadows"},
- {MA_VOL_SHADE_SHADOWED, "SHADOWED", 0, "Shadowed", ""},
- {MA_VOL_SHADE_SHADED, "SHADED", 0, "Shaded", ""},
- {MA_VOL_SHADE_MULTIPLE, "MULTIPLE_SCATTERING", 0, "Multiple Scattering", ""},
- {MA_VOL_SHADE_SHADEDPLUSMULTIPLE, "SHADED_PLUS_MULTIPLE_SCATTERING", 0, "Shaded + Multiple Scattering", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_stepsize_items[] = {
- {MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""},
- {MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""},
- /*{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""}, */
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "MaterialVolume", NULL);
- RNA_def_struct_sdna(srna, "VolumeSettings");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Volume", "Volume rendering settings for a Material data-block");
-
- prop = RNA_def_property(srna, "step_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "stepsize_type");
- RNA_def_property_enum_items(prop, prop_stepsize_items);
- RNA_def_property_ui_text(prop, "Step Calculation", "Method of calculating the steps through the volume");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "step_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "stepsize");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.001f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Step Size", "Distance between subsequent volume depth samples");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "light_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "shade_type");
- RNA_def_property_enum_items(prop, prop_lighting_items);
- RNA_def_property_ui_text(prop, "Lighting Mode",
- "Method of shading, attenuating, and scattering light through the volume");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_external_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_RECV_EXT_SHADOW); /* use bitflags */
- RNA_def_property_ui_text(prop, "External Shadows", "Receive shadows from sources outside the volume (temporary)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_light_cache", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_PRECACHESHADING); /* use bitflags */
- RNA_def_property_ui_text(prop, "Light Cache",
- "Pre-calculate the shading information into a voxel grid, "
- "speeds up shading at slightly less accuracy");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "precache_resolution");
- RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_ui_text(prop, "Resolution",
- "Resolution of the voxel grid, low resolutions are faster, "
- "high resolutions use more memory");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_diff");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Diffusion", "Diffusion factor, the strength of the blurring effect");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "ms_spread", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_spread");
- RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Spread", "Proportional distance over which the light is diffused");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "ms_intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ms_intensity");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Intensity", "Multiplier for multiple scattered light energy");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "depth_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "depth_cutoff");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Depth Cutoff",
- "Stop ray marching early if transmission drops below this luminance - "
- "higher values give speedups in dense volumes at the expense of accuracy");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "density");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Density", "The base density of the volume");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "density_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "density_scale");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Density Scale", "Multiplier for the material's density");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "scattering", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "scattering");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Scattering",
- "Amount of light that gets scattered out by the volume - "
- "the more out-scattering, the shallower the light will penetrate");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "transmission_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Transmission Color",
- "Result color of the volume, after other light has been scattered/absorbed");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "reflection_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Reflection Color",
- "Color of light scattered out of the volume (does not affect transmission)");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "reflection", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "reflection");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Reflection",
- "Multiplier to make out-scattered light brighter or darker (non-physically correct)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "emission_col");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Emission Color", "Color of emitted light");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "emission", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "emission");
- RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
- RNA_def_property_ui_text(prop, "Emission", "Amount of light that gets emitted by the volume");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "asymmetry", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "asymmetry");
- RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Asymmetry",
- "Back scattering (-1.0) to Forward scattering (1.0) and the range in between");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
-
-static void rna_def_material_halo(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "MaterialHalo", NULL);
- RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Halo", "Halo particle effect settings for a Material data-block");
-
- prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "hasize");
- RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Size", "Dimension of the halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "har");
- RNA_def_property_range(prop, 0, 127);
- RNA_def_property_ui_text(prop, "Hardness", "Hardness of the halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "add");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Add", "Strength of the add effect");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "ring_count", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ringc");
- RNA_def_property_range(prop, 0, 24);
- RNA_def_property_ui_text(prop, "Rings", "Number of rings rendered over the halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "line_count", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "linec");
- RNA_def_property_range(prop, 0, 250);
- RNA_def_property_ui_text(prop, "Line Number", "Number of star shaped lines rendered over the halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "star_tip_count", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "starc");
- RNA_def_property_range(prop, 3, 50);
- RNA_def_property_ui_text(prop, "Star Tips", "Number of points on the star shaped halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "seed1");
- RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Seed", "Randomize ring dimension and line location");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_flare_mode", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
- RNA_def_property_ui_text(prop, "Flare", "Render halo as a lens flare");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "flaresize");
- RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Flare Size", "Factor by which the flare is larger than the halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "flare_subflare_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "subsize");
- RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Flare Subsize", "Dimension of the sub-flares, dots and circles");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "flareboost");
- RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Flare Boost", "Give the flare extra strength");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "seed2");
- RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Flare Seed", "Offset in the flare seed table");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "flare_subflare_count", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "flarec");
- RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "Flares Sub", "Number of sub-flares");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_ring", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS);
- RNA_def_property_ui_text(prop, "Rings", "Render rings over halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_lines", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES);
- RNA_def_property_ui_text(prop, "Lines", "Render star shaped lines over halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_star", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR);
- RNA_def_property_ui_text(prop, "Star", "Render halo as a star");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX);
- RNA_def_property_ui_text(prop, "Texture", "Give halo a texture");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO);
- RNA_def_property_ui_text(prop, "Vertex Normal", "Use the vertex normal to specify the dimension of the halo");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_extreme_alpha", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA);
- RNA_def_property_ui_text(prop, "Extreme Alpha", "Use extreme alpha");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_shaded", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE);
- RNA_def_property_ui_text(prop, "Shaded", "Let halo receive light and shadows from external objects");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_soft", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT);
- RNA_def_property_ui_text(prop, "Soft", "Soften the edges of halos at intersections with other geometry");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
-static void rna_def_material_sss(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL);
- RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Subsurface Scattering",
- "Diffuse subsurface scattering settings for a Material data-block");
-
- prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR | PROP_UNIT_LENGTH);
- RNA_def_property_float_sdna(prop, NULL, "sss_radius");
- RNA_def_property_range(prop, 0.001, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
- RNA_def_property_ui_text(prop, "Radius", "Mean red/green/blue scattering path length");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "sss_col");
- RNA_def_property_ui_text(prop, "Color", "Scattering color");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sss_error");
- RNA_def_property_ui_range(prop, 0.0001, 10, 1, 3);
- RNA_def_property_ui_text(prop, "Error Tolerance", "Error tolerance (low values are slower and higher quality)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sss_scale");
- RNA_def_property_ui_range(prop, 0.001, 1000, 1, 3);
- RNA_def_property_ui_text(prop, "Scale", "Object scale factor");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sss_ior");
- RNA_def_property_ui_range(prop, 0.1, 2, 1, 3);
- RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Texture Factor", "Texture scattering blend factor");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sss_front");
- RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "Front", "Front scattering weight");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sss_back");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Back", "Back scattering weight");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "sss_flag", MA_DIFF_SSS);
- RNA_def_property_ui_text(prop, "Enabled", "Enable diffuse subsurface scattering effects in a material");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
-static void rna_def_material_specularity(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_specular_shader_items[] = {
- {MA_SPEC_COOKTORR, "COOKTORR", 0, "CookTorr", "Use a Cook-Torrance shader"},
- {MA_SPEC_PHONG, "PHONG", 0, "Phong", "Use a Phong shader"},
- {MA_SPEC_BLINN, "BLINN", 0, "Blinn", "Use a Blinn shader"},
- {MA_SPEC_TOON, "TOON", 0, "Toon", "Use a toon shader"},
- {MA_SPEC_WARDISO, "WARDISO", 0, "WardIso", "Use a Ward anisotropic shader"},
- {0, NULL, 0, NULL, NULL}
- };
-
- prop = RNA_def_property(srna, "specular_shader", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "spec_shader");
- RNA_def_property_enum_items(prop, prop_specular_shader_items);
- RNA_def_property_ui_text(prop, "Specular Shader Model", "");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "spec");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Specular Intensity", "How intense (bright) the specular reflection is");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- /* NOTE: "har", "param", etc are used for multiple purposes depending on
- * settings. This should be fixed in DNA once, for RNA we just expose them
- * multiple times, which may give somewhat strange changes in the outliner,
- * but in the UI they are never visible at the same time. */
-
- prop = RNA_def_property(srna, "specular_hardness", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "har");
- RNA_def_property_range(prop, 1, 511);
- RNA_def_property_ui_text(prop, "Specular Hardness", "How hard (sharp) the specular reflection is");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "specular_ior", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "refrac");
- RNA_def_property_range(prop, 1, 10);
- RNA_def_property_ui_text(prop, "Specular IOR", "Specular index of refraction");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_toon_size", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "param[2]");
- RNA_def_property_range(prop, 0.0f, 1.53f);
- RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "param[3]");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Smoothness of specular toon area");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "specular_slope", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "rms");
- RNA_def_property_range(prop, 0, 0.4);
- RNA_def_property_ui_text(prop, "Specular Slope", "The standard deviation of surface slope");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-}
-
-static void rna_def_material_strand(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "MaterialStrand", NULL);
- RNA_def_struct_sdna(srna, "Material");
- RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Strand", "Strand settings for a Material data-block");
-
- prop = RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_STR);
- RNA_def_property_ui_text(prop, "Tangent Shading", "Use direction of strands as normal for tangent-shading");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- /* this flag is only set when rendering, not to be edited manually */
- prop = RNA_def_property(srna, "use_surface_diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_SURFDIFF);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE);
- RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_blender_units", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STR_B_UNITS);
- RNA_def_property_ui_text(prop, "Blender Units", "Use Blender units for widths instead of pixels");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "root_size", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_sdna(prop, NULL, "strand_sta");
- RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_start_size_range");
- RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5);
- RNA_def_property_ui_text(prop, "Root Size", "Start size of strands in pixels or Blender units");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "tip_size", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_sdna(prop, NULL, "strand_end");
- RNA_def_property_ui_range(prop, 0, 10.0f, 10, 5);
- RNA_def_property_float_funcs(prop, NULL, NULL, "rna_MaterialStrand_end_size_range");
- RNA_def_property_ui_text(prop, "Tip Size", "End size of strands in pixels or Blender units");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "size_min", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_sdna(prop, NULL, "strand_min");
- RNA_def_property_range(prop, 0.001, 10);
- RNA_def_property_ui_text(prop, "Minimum Size", "Minimum size of strands in pixels");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "strand_ease");
- RNA_def_property_range(prop, -0.9, 0.9);
- RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative ones make strands spiky");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "strand_widthfade");
- RNA_def_property_range(prop, 0, 2);
- RNA_def_property_ui_text(prop, "Width Fade", "Transparency along the width of the strand");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "strand_uvname");
- RNA_def_property_ui_text(prop, "UV Map", "Name of UV map to override");
- RNA_def_property_update(prop, 0, "rna_Material_update");
}
void RNA_def_material(BlenderRNA *brna)
@@ -1680,20 +321,6 @@ void RNA_def_material(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem prop_type_items[] = {
- {MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface"},
- {MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in raytracing)"},
- {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume"},
- {MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles"},
- {0, NULL, 0, NULL, NULL}
- };
- static const EnumPropertyItem transparency_items[] = {
- {0, "MASK", 0, "Mask", "Mask the background"},
- {MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces"},
- {MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering"},
- {0, NULL, 0, NULL, NULL}
- };
-
/* Render Preview Types */
static const EnumPropertyItem preview_type_items[] = {
{MA_FLAT, "FLAT", ICON_MATPLANE, "Flat", "Flat XY plane"},
@@ -1705,14 +332,6 @@ void RNA_def_material(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem prop_shadows_only_items[] = {
- {MA_SO_OLD, "SHADOW_ONLY_OLD", 0, "Shadow and Distance", "Old shadow only method"},
- {MA_SO_SHADOW, "SHADOW_ONLY", 0, "Shadow Only", "Improved shadow only method"},
- {MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, "Shadow and Shading",
- "Improved shadow only method which also renders lightless areas as shadows"},
- {0, NULL, 0, NULL, NULL}
- };
-
static EnumPropertyItem prop_eevee_blend_items[] = {
{MA_BM_SOLID, "OPAQUE", 0, "Opaque", "Render surface without transparency"},
{MA_BM_ADD, "ADD", 0, "Additive", "Render surface and blend the result with additive blending"},
@@ -1736,24 +355,6 @@ void RNA_def_material(BlenderRNA *brna)
"Material data-block to define the appearance of geometric objects for rendering");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
- prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "material_type");
- RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered");
- RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL);
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "use_transparency", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP);
- RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, transparency_items);
- RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
/* Blending (only Eevee for now) */
prop = RNA_def_property(srna, "blend_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_eevee_blend_items);
@@ -1806,203 +407,11 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Preview render type", "Type of preview render");
RNA_def_property_update(prop, 0, "rna_Material_update_previews");
- prop = RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "amb");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0, FLT_MAX);
- RNA_def_property_ui_range(prop, 0, 2.0f, 1, 2);
- RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_cubic", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC);
- RNA_def_property_ui_text(prop, "Cubic Interpolation",
- "Use cubic interpolation for diffuse values, for smoother transitions");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_OBCOLOR);
- RNA_def_property_ui_text(prop, "Object Color", "Modulate the result with a per-object color");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sbias");
- RNA_def_property_range(prop, 0, 0.25);
- RNA_def_property_ui_text(prop, "Shadow Ray Bias",
- "Shadow raytracing bias to prevent terminator problems on shadow boundary");
-
- prop = RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "lbias");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Factor to multiply shadow buffer bias with (0 is ignore)");
-
- prop = RNA_def_property(srna, "shadow_cast_alpha", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
- RNA_def_property_range(prop, 0.001, 1);
- RNA_def_property_ui_text(prop, "Shadow Casting Alpha",
- "Shadow casting alpha, in use for Irregular and Deep shadow buffer");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "group");
- RNA_def_property_struct_type(prop, "Group");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Light Group", "Limit lighting to lamps in this Group");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "edit_image", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "edit_image");
- RNA_def_property_struct_type(prop, "Image");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Edit Image", "Image to use for UV-mapping");
-
prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "index");
RNA_def_property_ui_text(prop, "Pass Index", "Index number for the \"Material Index\" render pass");
RNA_def_property_update(prop, NC_OBJECT, "rna_Material_update");
- /* flags */
-
- prop = RNA_def_property(srna, "use_light_group_exclusive", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_GROUP_NOLAY);
- RNA_def_property_ui_text(prop, "Light Group Exclusive",
- "Material uses the light group exclusively - these lamps are excluded "
- "from other scene lighting");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_light_group_local", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_GROUP_LOCAL);
- RNA_def_property_ui_text(prop, "Light Group Local", "When linked in, material uses local light group with the same name");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE);
- RNA_def_property_ui_text(prop, "Traceable",
- "Include this material and geometry that uses it in raytracing calculations");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW);
- RNA_def_property_ui_text(prop, "Shadows", "Allow this material to receive shadows");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_shadeless", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHLESS);
- RNA_def_property_ui_text(prop, "Shadeless", "Make this material insensitive to light or shadow");
- RNA_def_property_update(prop, 0, "rna_Material_draw_update");
-
- prop = RNA_def_property(srna, "use_vertex_color_light", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOL);
- RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP);
- RNA_def_property_ui_text(prop, "Vertex Color Paint",
- "Replace object base color with vertex colors (multiply with "
- "'texture face' face assigned textures)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZINV);
- RNA_def_property_ui_text(prop, "Invert Z Depth",
- "Render material's faces with an inverted Z buffer (scanline only)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "offset_z", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "zoffs");
- RNA_def_property_ui_text(prop, "Z Offset", "Give faces an artificial offset in the Z buffer for Z transparency");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV);
- RNA_def_property_ui_text(prop, "Sky",
- "Render this material with zero alpha, with sky background in place (scanline only)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW);
- RNA_def_property_ui_text(prop, "Only Shadow",
- "Render shadows as the material's alpha value, making the material "
- "transparent except for shadowed areas");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "shadow_only_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "shadowonly_flag");
- RNA_def_property_enum_items(prop, prop_shadows_only_items);
- RNA_def_property_ui_text(prop, "Shadow Type", "How to draw shadows");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_cast_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode2", MA_CASTSHADOW);
- RNA_def_property_ui_text(prop, "Cast Shadows",
- "Allow this material to cast shadows");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST);
- RNA_def_property_ui_text(prop, "Cast Shadows Only",
- "Make objects with this material appear invisible (not rendered), only casting shadows");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", MA_NOMIST);
- RNA_def_property_ui_text(prop, "Use Mist", "Use mist with this material (in world settings)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA);
- RNA_def_property_ui_text(prop, "Receive Transparent Shadows",
- "Allow this object to receive transparent shadows cast through other objects");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYBIAS);
- RNA_def_property_ui_text(prop, "Ray Shadow Bias",
- "Prevent raytraced shadow errors on surfaces with smooth shaded normals "
- "(terminator problem)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_full_oversampling", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FULL_OSA);
- RNA_def_property_ui_text(prop, "Full Oversampling",
- "Force this material to render full shading/textures for all anti-aliasing samples");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF);
- RNA_def_property_ui_text(prop, "Cast Buffer Shadows",
- "Allow this material to cast shadows from shadow buffer lamps");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_APPROX_OCCLUSION);
- RNA_def_property_ui_text(prop, "Cast Approximate",
- "Allow this material to cast shadows when using approximate ambient occlusion");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_V);
- RNA_def_property_ui_text(prop, "Tangent Shading",
- "Use the material's tangent vector instead of the normal for shading "
- "- for anisotropic shading effects");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
- prop = RNA_def_property(srna, "use_uv_project", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapflag", MA_MAPFLAG_UVPROJECT);
- RNA_def_property_ui_text(prop, "UV Project",
- "Use to ensure UV interpolation is correct for camera projections (use with UV project modifier)");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
/* nested structs */
prop = RNA_def_property(srna, "raytrace_mirror", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -2010,36 +419,6 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Material_mirror_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Raytrace Mirror", "Raytraced reflection settings for the material");
- prop = RNA_def_property(srna, "raytrace_transparency", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "MaterialRaytraceTransparency");
- RNA_def_property_pointer_funcs(prop, "rna_Material_transp_get", NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Raytrace Transparency", "Raytraced transparency settings for the material");
-
- prop = RNA_def_property(srna, "volume", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "vol");
- RNA_def_property_struct_type(prop, "MaterialVolume");
- RNA_def_property_ui_text(prop, "Volume", "Volume settings for the material");
-
- prop = RNA_def_property(srna, "halo", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "MaterialHalo");
- RNA_def_property_pointer_funcs(prop, "rna_Material_halo_get", NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Halo", "Halo settings for the material");
-
- prop = RNA_def_property(srna, "subsurface_scattering", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "MaterialSubsurfaceScattering");
- RNA_def_property_pointer_funcs(prop, "rna_Material_sss_get", NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Subsurface Scattering", "Subsurface scattering settings for the material");
-
- prop = RNA_def_property(srna, "strand", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "MaterialStrand");
- RNA_def_property_pointer_funcs(prop, "rna_Material_strand_get", NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material");
-
/* nodetree */
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
@@ -2052,41 +431,12 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material");
RNA_def_property_update(prop, 0, "rna_Material_use_nodes_update");
- prop = RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Material");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get",
- "rna_Material_active_node_material_set", NULL, NULL);
- RNA_def_property_ui_text(prop, "Material", "Active node material");
- RNA_def_property_update(prop, NC_MATERIAL, NULL);
-
/* common */
rna_def_animdata_common(srna);
- rna_def_mtex_common(brna, srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get",
- "rna_Material_active_texture_set", "rna_Material_active_texture_editable",
- "MaterialTextureSlot", "MaterialTextureSlots", "rna_Material_update", "rna_Material_update");
-
rna_def_texpaint_slots(brna, srna);
- /* only material has this one */
- prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "septex", 1);
- RNA_def_property_array(prop, 18);
- RNA_def_property_ui_text(prop, "Use Textures", "Enable/Disable each texture");
- RNA_def_property_update(prop, 0, "rna_Material_update");
-
rna_def_material_colors(srna);
- rna_def_material_diffuse(srna);
- rna_def_material_specularity(srna);
-
- /* nested structs */
rna_def_material_raymirror(brna);
- rna_def_material_raytra(brna);
- rna_def_material_volume(brna);
- rna_def_material_halo(brna);
- rna_def_material_sss(brna);
- rna_def_material_mtex(brna);
- rna_def_material_strand(brna);
RNA_api_material(srna);
}
@@ -2169,9 +519,9 @@ static void rna_def_tex_slot(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "UV Map", "Name of UV map");
RNA_def_property_update(prop, NC_GEOM | ND_DATA, "rna_Material_update");
- prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Index", "Index of MTex slot in the material");
+ RNA_def_property_ui_text(prop, "Valid", "Slot has a valid image and UV map");
}
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 86f69606bb1..94e3359737b 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -2284,11 +2284,6 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
"rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Projectors", "");
- prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
prop = RNA_def_property(srna, "aspect_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "aspectx");
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 40c36b9bd44..79a1ce73071 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2339,14 +2339,6 @@ static void rna_NodeSocketStandard_value_update(struct bContext *C, PointerRNA *
/* fall back to searching node in the tree */
nodeFindNode(ntree, sock, &node, NULL);
}
-
- if (node) {
- nodeSynchronizeID(node, true);
-
- /* extra update for sockets that get synced to material */
- if (node->id && ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT))
- WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, node->id);
- }
}
@@ -2502,17 +2494,6 @@ static void rna_Node_tex_image_update(Main *bmain, Scene *UNUSED(scene), Pointer
WM_main_add_notifier(NC_IMAGE, NULL);
}
-static void rna_Node_material_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
-{
- bNodeTree *ntree = (bNodeTree *)ptr->id.data;
- bNode *node = (bNode *)ptr->data;
-
- if (node->id)
- nodeSetActive(ntree, node);
-
- ED_node_tag_update_nodetree(bmain, ntree, node);
-}
-
static void rna_NodeGroup_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
bNodeTree *ntree = (bNodeTree *)ptr->id.data;
@@ -3548,33 +3529,6 @@ static void def_sh_output_linestyle(StructRNA *srna)
def_mix_rgb(srna);
}
-static void def_sh_material(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- prop = RNA_def_property(srna, "material", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "id");
- RNA_def_property_struct_type(prop, "Material");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Material", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_material_update");
-
- prop = RNA_def_property(srna, "use_diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_DIFF);
- RNA_def_property_ui_text(prop, "Diffuse", "Material Node outputs Diffuse");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "use_specular", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_SPEC);
- RNA_def_property_ui_text(prop, "Specular", "Material Node outputs Specular");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "invert_normal", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "custom1", SH_NODE_MAT_NEG);
- RNA_def_property_ui_text(prop, "Invert Normal", "Material Node uses inverted normal");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
static void def_sh_mapping(StructRNA *srna)
{
static const EnumPropertyItem prop_vect_type_items[] = {
@@ -3637,36 +3591,6 @@ static void def_sh_mapping(StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Mapping_Node_update");
}
-static void def_sh_geometry(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- RNA_def_struct_sdna_from(srna, "NodeGeometry", "storage");
-
- prop = RNA_def_property(srna, "uv_layer", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "uvname");
- RNA_def_property_ui_text(prop, "UV Map", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "color_layer", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "colname");
- RNA_def_property_ui_text(prop, "Vertex Color Layer", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
-static void def_sh_lamp(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- prop = RNA_def_property(srna, "lamp_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "id");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
- RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Lamp_object_poll");
- RNA_def_property_ui_text(prop, "Lamp Object", "");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-}
-
static void def_sh_attribute(StructRNA *srna)
{
PropertyRNA *prop;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 339465d1ac0..069e103c5e4 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1046,17 +1046,6 @@ static int rna_RenderSettings_is_movie_format_get(PointerRNA *ptr)
return BKE_imtype_is_movie(rd->im_format.imtype);
}
-static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
-{
- RenderData *rd = (RenderData *)ptr->data;
- Scene *scene = (Scene *)ptr->id.data;
-
- if (!BKE_scene_use_new_shading_nodes(scene))
- return (rd->scemode & (R_EXR_TILE_FILE | R_FULL_SAMPLE)) != 0;
- else
- return (rd->scemode & R_EXR_TILE_FILE) != 0;
-}
-
static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -1448,12 +1437,6 @@ static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr))
return (BLI_listbase_count(&R_engines) > 1);
}
-static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr)
-{
- Scene *scene = (Scene *)ptr->id.data;
- return BKE_scene_use_new_shading_nodes(scene);
-}
-
static int rna_RenderSettings_use_spherical_stereo_get(PointerRNA *ptr)
{
Scene *scene = (Scene *)ptr->id.data;
@@ -3462,18 +3445,6 @@ void rna_def_view_layer_common(StructRNA *srna, int scene)
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
- RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
- RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass");
@@ -3492,18 +3463,6 @@ void rna_def_view_layer_common(StructRNA *srna, int scene)
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
- RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
- RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass");
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT);
RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass");
@@ -3522,62 +3481,6 @@ void rna_def_view_layer_common(StructRNA *srna, int scene)
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
- RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
- RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
- RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
- RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
- RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT);
- RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT);
- RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT);
- RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined");
- RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
- if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
- else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT);
RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass");
@@ -4993,17 +4896,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem pixel_filter_items[] = {
- {R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"},
- {R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"},
- {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"},
- {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", "Use a cubic filter for anti-aliasing"},
- {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", "Use a Catmull-Rom filter for anti-aliasing"},
- {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", "Use a Gaussian filter for anti-aliasing"},
- {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mitchell-Netravali filter for anti-aliasing"},
- {0, NULL, 0, NULL, NULL}
- };
-
static const EnumPropertyItem alpha_mode_items[] = {
{R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
{R_ALPHAPREMUL, "TRANSPARENT", 0, "Transparent", "World background is transparent with premultiplied alpha"},
@@ -5017,41 +4909,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_OUTPUT_NONE, "NONE", 0, "Keep UI", "Images are rendered without forcing UI changes"},
{0, NULL, 0, NULL, NULL}
};
-
+
/* Bake */
static const EnumPropertyItem bake_mode_items[] = {
- {RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"},
- {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"},
- {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"},
+ //{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"},
{RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"},
- {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", "Bake textures"},
{RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"},
- {RE_BAKE_DERIVATIVE, "DERIVATIVE", 0, "Derivative", "Bake derivative map"},
- {RE_BAKE_VERTEX_COLORS, "VERTEX_COLORS", 0, "Vertex Colors", "Bake vertex colors"},
- {RE_BAKE_EMIT, "EMIT", 0, "Emission", "Bake Emit values (glow)"},
- {RE_BAKE_ALPHA, "ALPHA", 0, "Alpha", "Bake Alpha values (transparency)"},
- {RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, "Mirror Intensity", "Bake Mirror values"},
- {RE_BAKE_MIRROR_COLOR, "MIRROR_COLOR", 0, "Mirror Colors", "Bake Mirror colors"},
- {RE_BAKE_SPEC_INTENSITY, "SPEC_INTENSITY", 0, "Specular Intensity", "Bake Specular values"},
- {RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, "Specular Colors", "Bake Specular colors"},
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem bake_normal_space_items[] = {
- {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"},
- {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"},
- {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
- {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem bake_qyad_split_items[] = {
- {0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"},
- {1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"},
- {2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"},
- {0, NULL, 0, NULL, NULL}
- };
-
static const EnumPropertyItem pixel_size_items[] = {
{0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the UI scale"},
{1, "1", 0, "1x", "Render at full resolution"},
@@ -5061,23 +4927,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static const EnumPropertyItem octree_resolution_items[] = {
- {64, "64", 0, "64", ""},
- {128, "128", 0, "128", ""},
- {256, "256", 0, "256", ""},
- {512, "512", 0, "512", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem raytrace_structure_items[] = {
- {R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select acceleration structure"},
- {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure"},
- {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", "Use vBVH"},
- {R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", "Use SIMD SVBVH"},
- {R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", "Use SIMD QBVH"},
- {0, NULL, 0, NULL, NULL}
- };
-
static const EnumPropertyItem fixed_oversample_items[] = {
{5, "5", 0, "5", ""},
{8, "8", 0, "8", ""},
@@ -5085,13 +4934,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{16, "16", 0, "16", ""},
{0, NULL, 0, NULL, NULL}
};
-
- static const EnumPropertyItem field_order_items[] = {
- {0, "EVEN_FIRST", 0, "Upper First", "Upper field first"},
- {R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"},
- {0, NULL, 0, NULL, NULL}
- };
-
+
static const EnumPropertyItem threads_mode_items[] = {
{0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
{R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
@@ -5250,50 +5093,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"Amount of dithering noise added to the rendered image to break up banding");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "filtertype");
- RNA_def_property_enum_items(prop, pixel_filter_items);
- RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_PIXEL);
- RNA_def_property_float_sdna(prop, NULL, "gauss");
- RNA_def_property_range(prop, 0.0f, 500.0f);
- RNA_def_property_ui_range(prop, 0.01f, 10.0f, 1, 2);
- RNA_def_property_ui_text(prop, "Filter Size", "Width over which the reconstruction filter combines samples");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "alphamode");
RNA_def_property_enum_items(prop, alpha_mode_items);
RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ocres");
- RNA_def_property_enum_items(prop, octree_resolution_items);
- RNA_def_property_ui_text(prop, "Octree Resolution",
- "Resolution of raytrace accelerator, use higher resolutions for larger scenes");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
- RNA_def_property_enum_items(prop, raytrace_structure_items);
- RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
- RNA_def_property_ui_text(prop, "Use Instances",
- "Instance support leads to effective memory reduction when using duplicates");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
- RNA_def_property_ui_text(prop, "Use Local Coords",
- "Vertex coordinates are stored locally on each primitive "
- "(increases memory usage, but may have impact on speed)");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
@@ -5306,73 +5110,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_enum_items(prop, fixed_oversample_items);
RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
- RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
- RNA_def_property_enum_items(prop, field_order_items);
- RNA_def_property_ui_text(prop, "Field Order",
- "Order of video fields (select which lines get rendered first, "
- "to create smooth motion for TV output)");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
- RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- /* rendering features */
- prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
- RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
- RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
- RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
- prop = RNA_def_property(srna, "use_world_space_shading", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_USE_WS_SHADING);
- RNA_def_property_ui_text(prop, "World Space Shading", "Use world space interpretation of lighting data for node materials");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
- RNA_def_property_ui_text(prop, "Raytracing",
- "Pre-calculate the raytrace accelerator and render raytracing effects");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
- RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
- RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "edgeint");
- RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
- prop = RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "edgeR");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Edge Color", "Edge color");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
@@ -5404,13 +5142,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
- prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
- RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
-
prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "blurfac");
RNA_def_property_ui_range(prop, 0.01f, 2.0f, 1, 2);
@@ -5427,12 +5158,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Border",
- "Render a user-defined border region, within the frame size "
- "(note that this disables save_buffers and full_sample)");
+ RNA_def_property_ui_text(prop, "Border", "Render a user-defined border region, within the frame size ");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
-
prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "border.xmin");
@@ -5520,15 +5247,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Movie Format", "When true the format is a movie");
- prop = RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
- RNA_def_property_ui_text(prop, "Free Image Textures",
- "Free all image textures from memory after render, to save memory before compositing");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
- RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL);
RNA_def_property_ui_text(prop, "Save Buffers",
"Save tiles for all RenderLayers and SceneNodes to files in the temp directory "
"(saves memory, required for Full Sample)");
@@ -5576,46 +5296,17 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Bake Mode", "Choose shading information to bake into the image");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
- RNA_def_property_enum_items(prop, bake_normal_space_items);
- RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, bake_qyad_split_items);
- RNA_def_property_ui_text(prop, "Quad Split", "Choose the method used to split a quad into 2 triangles for baking");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
- prop = RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
- RNA_def_property_enum_items(prop, fixed_oversample_items);
- RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
RNA_def_property_ui_text(prop, "Selected to Active",
"Bake shading on the surface of selected objects to the active object");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
- RNA_def_property_ui_text(prop, "Normalized",
- "With displacement normalize to the distance, with ambient occlusion "
- "normalize without using material settings");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
- RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "bake_filter");
RNA_def_property_range(prop, 0, 64);
@@ -5623,13 +5314,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"Extends the baked result as a post process filter");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
- RNA_def_property_range(prop, 0.0, 1000.0);
- RNA_def_property_ui_text(prop, "Distance",
- "Maximum distance from active object to other object (in blender units)");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
RNA_def_property_range(prop, 0.0, 1000.0);
@@ -5654,12 +5338,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Samples", "Number of samples used for ambient occlusion baking from multires");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
- prop = RNA_def_property(srna, "use_bake_to_vertex_color", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_VCOL);
- RNA_def_property_ui_text(prop, "Bake to Vertex Color",
- "Bake to vertex colors instead of to a UV-mapped image");
- RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-
prop = RNA_def_property(srna, "use_bake_user_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_USERSCALE);
RNA_def_property_ui_text(prop, "User scale", "Use a user scale for the derivative map");
@@ -5858,11 +5536,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available");
- prop = RNA_def_property(srna, "use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_shading_nodes_get", NULL);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Use Shading Nodes", "Active render engine uses new shading nodes system");
-
prop = RNA_def_property(srna, "use_spherical_stereo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_spherical_stereo_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -5896,21 +5569,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage during rendering");
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
- prop = RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples");
- RNA_def_property_ui_range(prop, 1, 16, 1, -1);
- RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximum shadow samples");
- RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
-
- prop = RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "simplify_aosss");
- RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AO and SSS quality factor");
- RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
-
- prop = RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_TRIANGULATE);
- RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disable non-planar quads being triangulated");
-
/* persistent data */
prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PERSISTENT_DATA);
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 49edc742a4b..03a728120eb 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -111,8 +111,6 @@ const EnumPropertyItem rna_enum_symmetrize_direction_items[] = {
#include "DEG_depsgraph.h"
-#include "GPU_buffers.h"
-
#include "ED_particle.h"
static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
@@ -371,7 +369,6 @@ static void rna_ImaPaint_mode_update(bContext *C, PointerRNA *UNUSED(ptr))
BKE_texpaint_slots_refresh_object(scene, ob);
/* we assume that changing the current mode will invalidate the uv layers so we need to refresh display */
- GPU_drawobject_free(ob->derivedFinal);
BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
@@ -384,7 +381,6 @@ static void rna_ImaPaint_stencil_update(bContext *C, PointerRNA *UNUSED(ptr))
Object *ob = OBACT(view_layer);
if (ob && ob->type == OB_MESH) {
- GPU_drawobject_free(ob->derivedFinal);
BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
@@ -416,7 +412,6 @@ static void rna_ImaPaint_canvas_update(bContext *C, PointerRNA *UNUSED(ptr))
}
if (ob && ob->type == OB_MESH) {
- GPU_drawobject_free(ob->derivedFinal);
BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL);
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 7d121f76016..01d7ba4d0a3 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -216,17 +216,6 @@ static const EnumPropertyItem buttons_context_items[] = {
{0, NULL, 0, NULL, NULL}
};
-/* Actually populated dynamically trough a function, but helps for context-less access (e.g. doc, i18n...). */
-static const EnumPropertyItem buttons_texture_context_items[] = {
- {SB_TEXC_MATERIAL, "MATERIAL", ICON_MATERIAL, "", "Show material textures"},
- {SB_TEXC_WORLD, "WORLD", ICON_WORLD, "", "Show world textures"},
- {SB_TEXC_LAMP, "LAMP", ICON_LAMP, "", "Show lamp textures"},
- {SB_TEXC_PARTICLES, "PARTICLES", ICON_PARTICLES, "", "Show particles textures"},
- {SB_TEXC_LINESTYLE, "LINESTYLE", ICON_LINE_DATA, "", "Show linestyle textures"},
- {SB_TEXC_OTHER, "OTHER", ICON_TEXTURE, "", "Show other data textures"},
- {0, NULL, 0, NULL, NULL}
-};
-
static const EnumPropertyItem buttons_collection_context_items[] = {
{SB_COLLECTION_CTX_VIEW_LAYER, "VIEW_LAYER", ICON_RENDERLAYERS, "", "Show material textures"},
{SB_COLLECTION_CTX_GROUP, "GROUP", ICON_GROUP, "", "Show world textures"},
@@ -1147,50 +1136,6 @@ static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
sbuts->re_align = 1;
}
-static const EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(
- bContext *C, PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop), bool *r_free)
-{
- EnumPropertyItem *item = NULL;
- int totitem = 0;
-
- if (ED_texture_context_check_world(C)) {
- RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_WORLD);
- }
-
- if (ED_texture_context_check_lamp(C)) {
- RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_LAMP);
- }
- else if (ED_texture_context_check_material(C)) {
- RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_MATERIAL);
- }
-
- if (ED_texture_context_check_particles(C)) {
- RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_PARTICLES);
- }
-
- if (ED_texture_context_check_linestyle(C)) {
- RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_LINESTYLE);
- }
-
- if (ED_texture_context_check_others(C)) {
- RNA_enum_items_add_value(&item, &totitem, buttons_texture_context_items, SB_TEXC_OTHER);
- }
-
- RNA_enum_item_end(&item, &totitem);
- *r_free = true;
-
- return item;
-}
-
-static void rna_SpaceProperties_texture_context_set(PointerRNA *ptr, int value)
-{
- SpaceButs *sbuts = (SpaceButs *)(ptr->data);
-
- /* User action, no need to keep "better" value in prev here! */
- sbuts->texture_context = sbuts->texture_context_prev = value;
-}
-
/* Space Console */
static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value)
{
@@ -2773,18 +2718,6 @@ static void rna_def_space_buttons(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL);
- prop = RNA_def_property(srna, "texture_context", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, buttons_texture_context_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_texture_context_set",
- "rna_SpaceProperties_texture_context_itemf");
- RNA_def_property_ui_text(prop, "Texture Context", "Type of texture data to display and edit");
- RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
- prop = RNA_def_property(srna, "use_limited_texture_context", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_TEX_USER_LIMITED);
- RNA_def_property_ui_text(prop, "Limited Texture Context",
- "Use the limited version of texture user (for 'old shading' mode)");
-
prop = RNA_def_property(srna, "collection_context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, buttons_collection_context_items);
RNA_def_property_ui_text(prop, "Collection Context", "Which collection we want to show");
@@ -4148,7 +4081,6 @@ static void rna_def_space_node(BlenderRNA *brna)
PropertyRNA *prop;
static const EnumPropertyItem texture_id_type_items[] = {
- {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"},
{SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
{SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"},
#ifdef WITH_FREESTYLE
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 42e3e2c83fb..5449b67c040 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -67,19 +67,14 @@ const EnumPropertyItem rna_enum_texture_type_items[] = {
{TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", "Procedural - create a cloud-like fractal noise texture"},
{TEX_DISTNOISE, "DISTORTED_NOISE", ICON_TEXTURE,
"Distorted Noise", "Procedural - noise texture distorted by two noise algorithms"},
- {TEX_ENVMAP, "ENVIRONMENT_MAP", ICON_IMAGE_DATA,
- "Environment Map", "Create a render of the environment mapped to a texture"},
{TEX_IMAGE, "IMAGE", ICON_IMAGE_DATA, "Image or Movie", "Allow for images or movies to be used as textures"},
{TEX_MAGIC, "MAGIC", ICON_TEXTURE, "Magic", "Procedural - color texture based on trigonometric functions"},
{TEX_MARBLE, "MARBLE", ICON_TEXTURE, "Marble", "Procedural - marble-like noise texture with wave generated bands"},
{TEX_MUSGRAVE, "MUSGRAVE", ICON_TEXTURE, "Musgrave", "Procedural - highly flexible fractal noise texture"},
{TEX_NOISE, "NOISE", ICON_TEXTURE, "Noise",
"Procedural - random noise, gives a different result every time, for every frame, for every pixel"},
- {TEX_OCEAN, "OCEAN", ICON_TEXTURE, "Ocean", "Use a texture generated by an Ocean modifier"},
- {TEX_POINTDENSITY, "POINT_DENSITY", ICON_TEXTURE, "Point Density", ""},
{TEX_STUCCI, "STUCCI", ICON_TEXTURE, "Stucci", "Procedural - create a fractal noise texture"},
{TEX_VORONOI, "VORONOI", ICON_TEXTURE, "Voronoi", "Procedural - create cell-like patterns based on Worley noise"},
- {TEX_VOXELDATA, "VOXEL_DATA", ICON_TEXTURE, "Voxel Data", "Create a 3D texture based on volumetric data"},
{TEX_WOOD, "WOOD", ICON_TEXTURE, "Wood", "Procedural - wave generated bands or rings, with optional noise"},
{0, NULL, 0, NULL, NULL}
};
@@ -134,8 +129,6 @@ static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
return &RNA_CloudsTexture;
case TEX_DISTNOISE:
return &RNA_DistortedNoiseTexture;
- case TEX_ENVMAP:
- return &RNA_EnvironmentMapTexture;
case TEX_IMAGE:
return &RNA_ImageTexture;
case TEX_MAGIC:
@@ -146,18 +139,12 @@ static StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
return &RNA_MusgraveTexture;
case TEX_NOISE:
return &RNA_NoiseTexture;
- case TEX_POINTDENSITY:
- return &RNA_PointDensityTexture;
case TEX_STUCCI:
return &RNA_StucciTexture;
case TEX_VORONOI:
return &RNA_VoronoiTexture;
- case TEX_VOXELDATA:
- return &RNA_VoxelDataTexture;
case TEX_WOOD:
return &RNA_WoodTexture;
- case TEX_OCEAN:
- return &RNA_OceanTexture;
default:
return &RNA_Texture;
}
@@ -192,25 +179,6 @@ static void rna_Color_mapping_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
/* nothing to do */
}
-static void rna_Texture_voxeldata_update(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- Tex *tex = ptr->id.data;
-
- tex->vd->ok = 0;
- rna_Texture_update(bmain, scene, ptr);
-}
-
-static void rna_Texture_voxeldata_image_update(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- Tex *tex = ptr->id.data;
-
- if (tex->ima) { /* may be getting cleared too */
- tex->ima->source = IMA_SRC_SEQUENCE;
- }
- rna_Texture_voxeldata_update(bmain, scene, ptr);
-}
-
-
/* Used for Texture Properties, used (also) for/in Nodes */
static void rna_Texture_nodes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
@@ -433,54 +401,6 @@ static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value)
else tex->imaflag &= ~TEX_MIPMAP;
}
-static void rna_Envmap_update_generic(Main *bmain, Scene *scene, PointerRNA *ptr)
-{
- Tex *tex = ptr->id.data;
- if (tex->env) {
- ED_preview_kill_jobs(bmain->wm.first, bmain);
- BKE_texture_envmap_free_data(tex->env);
- }
- rna_Texture_update(bmain, scene, ptr);
-}
-
-static PointerRNA rna_PointDensity_psys_get(PointerRNA *ptr)
-{
- PointDensity *pd = ptr->data;
- Object *ob = pd->object;
- ParticleSystem *psys = NULL;
- PointerRNA value;
-
- if (ob && pd->psys)
- psys = BLI_findlink(&ob->particlesystem, pd->psys - 1);
-
- RNA_pointer_create(&ob->id, &RNA_ParticleSystem, psys, &value);
- return value;
-}
-
-static void rna_PointDensity_psys_set(PointerRNA *ptr, PointerRNA value)
-{
- PointDensity *pd = ptr->data;
- Object *ob = pd->object;
-
- if (ob && value.id.data == ob)
- pd->psys = BLI_findindex(&ob->particlesystem, value.data) + 1;
-}
-
-static char *rna_PointDensity_path(PointerRNA *UNUSED(ptr))
-{
- return BLI_sprintfN("point_density");
-}
-
-static char *rna_VoxelData_path(PointerRNA *UNUSED(ptr))
-{
- return BLI_sprintfN("voxel_data");
-}
-
-static char *rna_OceanTex_path(PointerRNA *UNUSED(ptr))
-{
- return BLI_sprintfN("ocean");
-}
-
#else
static void rna_def_texmapping(BlenderRNA *brna)
@@ -779,94 +699,6 @@ static void rna_def_filter_common(StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
-static void rna_def_environment_map(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem prop_source_items[] = {
- {ENV_STATIC, "STATIC", 0, "Static", "Calculate environment map only once"},
- {ENV_ANIM, "ANIMATED", 0, "Animated", "Calculate environment map at each rendering"},
- {ENV_LOAD, "IMAGE_FILE", 0, "Image File", "Load a saved environment map image from disk"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_mapping_items[] = {
- {ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides"},
- {ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image"},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "EnvironmentMap", NULL);
- RNA_def_struct_sdna(srna, "EnvMap");
- RNA_def_struct_ui_text(srna, "EnvironmentMap",
- "Environment map created by the renderer and cached for subsequent renders");
-
- prop = RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "stype");
- RNA_def_property_enum_items(prop, prop_source_items);
- RNA_def_property_ui_text(prop, "Source", "");
- RNA_def_property_update(prop, 0, "rna_Envmap_update_generic");
-
- prop = RNA_def_property(srna, "viewpoint_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Viewpoint Object", "Object to use as the environment map's viewpoint location");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "type");
- RNA_def_property_enum_items(prop, prop_mapping_items);
- RNA_def_property_ui_text(prop, "Mapping", "");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "clipsta");
- RNA_def_property_range(prop, 0.001, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.01, 50, 100, 2);
- RNA_def_property_ui_text(prop, "Clip Start", "Objects nearer than this are not visible to map");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "clipend");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_range(prop, 0.10, 20000, 100, 2);
- RNA_def_property_ui_text(prop, "Clip End", "Objects further than this are not visible to map");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "viewscale");
- RNA_def_property_range(prop, 0.1, 5.0);
- RNA_def_property_ui_range(prop, 0.5, 1.5, 1, 2);
- RNA_def_property_ui_text(prop, "Zoom", "");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "layers_ignore", PROP_BOOLEAN, PROP_LAYER_MEMBER);
- RNA_def_property_boolean_sdna(prop, NULL, "notlay", 1);
- RNA_def_property_array(prop, 20);
- RNA_def_property_ui_text(prop, "Ignore Layers",
- "Hide objects on these layers when generating the Environment Map");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "cuberes");
- RNA_def_property_range(prop, 50, 4096);
- RNA_def_property_ui_text(prop, "Resolution", "Pixel resolution of the rendered environment map");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_range(prop, 0, 5);
- RNA_def_property_ui_text(prop, "Depth", "Number of times a map will be rendered recursively (mirror effects)");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, 0);
- RNA_def_property_boolean_sdna(prop, NULL, "ok", 2);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Validity", "True if this map is ready for use, False if it needs rendering");
-
- RNA_api_environment_map(srna);
-}
-
static const EnumPropertyItem prop_noise_basis_items[] = {
{TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original",
"Noise algorithm - Blender original: Smooth interpolated noise"},
@@ -1372,43 +1204,6 @@ static void rna_def_texture_image(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_NORMALMAP);
RNA_def_property_ui_text(prop, "Normal Map", "Use image RGB values for normal mapping");
RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- /* Derivative Map */
- prop = RNA_def_property(srna, "use_derivative_map", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_DERIVATIVEMAP);
- RNA_def_property_ui_text(prop, "Derivative Map", "Use red and green as derivative values");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-}
-
-static void rna_def_texture_environment_map(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "EnvironmentMapTexture", "Texture");
- RNA_def_struct_ui_text(srna, "Environment Map", "Environment map texture");
- RNA_def_struct_sdna(srna, "Tex");
-
- prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "ima");
- RNA_def_property_struct_type(prop, "Image");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Image", "Source image file to read the environment map from");
- RNA_def_property_update(prop, 0, "rna_Envmap_update_generic");
-
- prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "iuser");
- RNA_def_property_ui_text(prop, "Image User",
- "Parameters defining which layer, pass and frame of the image is displayed");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- rna_def_filter_common(srna);
-
- prop = RNA_def_property(srna, "environment_map", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "env");
- RNA_def_property_struct_type(prop, "EnvironmentMap");
- RNA_def_property_ui_text(prop, "Environment Map", "Get the environment map associated with this texture");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
}
static void rna_def_texture_musgrave(BlenderRNA *brna)
@@ -1633,407 +1428,6 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
-static void rna_def_texture_pointdensity(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem point_source_items[] = {
- {TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
- {TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
- /*{TEX_PD_FILE, "FILE", 0, "File", ""}, */
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem particle_cache_items[] = {
- {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
- {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem vertex_cache_items[] = {
- {TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
- {TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
- {TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem falloff_items[] = {
- {TEX_PD_FALLOFF_STD, "STANDARD", 0, "Standard", ""},
- {TEX_PD_FALLOFF_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- {TEX_PD_FALLOFF_SOFT, "SOFT", 0, "Soft", ""},
- {TEX_PD_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", "Density is constant within lookup radius"},
- {TEX_PD_FALLOFF_ROOT, "ROOT", 0, "Root", ""},
- {TEX_PD_FALLOFF_PARTICLE_AGE, "PARTICLE_AGE", 0, "Particle Age", ""},
- {TEX_PD_FALLOFF_PARTICLE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", ""},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem particle_color_source_items[] = {
- {TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
- {TEX_PD_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"},
- {TEX_PD_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed",
- "Particle speed (absolute magnitude of velocity) mapped as 0.0-1.0 intensity"},
- {TEX_PD_COLOR_PARTVEL, "PARTICLE_VELOCITY", 0, "Particle Velocity", "XYZ velocity mapped to RGB colors"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem vertex_color_source_items[] = {
- {TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
- {TEX_PD_COLOR_VERTCOL, "VERTEX_COLOR", 0, "Vertex Color", "Vertex color layer"},
- {TEX_PD_COLOR_VERTWEIGHT, "VERTEX_WEIGHT", 0, "Vertex Weight", "Vertex group weight"},
- {TEX_PD_COLOR_VERTNOR, "VERTEX_NORMAL", 0, "Vertex Normal", "XYZ normal vector mapped to RGB colors"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem turbulence_influence_items[] = {
- {TEX_PD_NOISE_STATIC, "STATIC", 0, "Static",
- "Noise patterns will remain unchanged, faster and suitable for stills"},
- {TEX_PD_NOISE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity",
- "Turbulent noise driven by particle velocity"},
- {TEX_PD_NOISE_AGE, "PARTICLE_AGE", 0, "Particle Age",
- "Turbulent noise driven by the particle's age between birth and death"},
- {TEX_PD_NOISE_TIME, "GLOBAL_TIME", 0, "Global Time", "Turbulent noise driven by the global current frame"},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "PointDensity", NULL);
- RNA_def_struct_sdna(srna, "PointDensity");
- RNA_def_struct_ui_text(srna, "PointDensity", "Point density settings");
- RNA_def_struct_path_func(srna, "rna_PointDensity_path");
-
- prop = RNA_def_property(srna, "point_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "source");
- RNA_def_property_enum_items(prop, point_source_items);
- RNA_def_property_ui_text(prop, "Point Source", "Point data to use as renderable point density");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "Particle System", "Particle System to render as points");
- RNA_def_property_struct_type(prop, "ParticleSystem");
- RNA_def_property_pointer_funcs(prop, "rna_PointDensity_psys_get", "rna_PointDensity_psys_set", NULL, NULL);
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "particle_cache_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "psys_cache_space");
- RNA_def_property_enum_items(prop, particle_cache_items);
- RNA_def_property_ui_text(prop, "Particle Cache", "Coordinate system to cache particles in");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "vertex_cache_space", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ob_cache_space");
- RNA_def_property_enum_items(prop, vertex_cache_items);
- RNA_def_property_ui_text(prop, "Vertices Cache", "Coordinate system to cache vertices in");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "radius");
- RNA_def_property_range(prop, 0.001, FLT_MAX);
- RNA_def_property_ui_text(prop, "Radius", "Radius from the shaded sample to look for points within");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "falloff_type");
- RNA_def_property_enum_items(prop, falloff_items);
- RNA_def_property_ui_text(prop, "Falloff", "Method of attenuating density by distance from the point");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "falloff_soft", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "falloff_softness");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Softness", "Softness of the 'soft' falloff option");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "particle_color_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "color_source");
- RNA_def_property_enum_items(prop, particle_color_source_items);
- RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "vertex_color_source", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ob_color_source");
- RNA_def_property_enum_items(prop, vertex_color_source_items);
- RNA_def_property_ui_text(prop, "Color Source", "Data to derive color results from");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "vertex_attribute_name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Vertex Attribute Name", "Vertex attribute to use for color");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "speed_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "speed_scale");
- RNA_def_property_range(prop, 0.001, 100.0);
- RNA_def_property_ui_text(prop, "Scale", "Multiplier to bring particle speed within an acceptable range");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "falloff_speed_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "falloff_speed_scale");
- RNA_def_property_range(prop, 0.001, 100.0);
- RNA_def_property_ui_text(prop, "Velocity Scale", "Multiplier to bring particle speed within an acceptable range");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
-
- prop = RNA_def_property(srna, "color_ramp", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "coba");
- RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Color Ramp", "");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "falloff_curve");
- RNA_def_property_struct_type(prop, "CurveMapping");
- RNA_def_property_ui_text(prop, "Falloff Curve", "");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "use_falloff_curve", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_FALLOFF_CURVE);
- RNA_def_property_ui_text(prop, "Falloff Curve", "Use a custom falloff curve");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- /* Turbulence */
- prop = RNA_def_property(srna, "use_turbulence", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_PD_TURBULENCE);
- RNA_def_property_ui_text(prop, "Turbulence", "Add directed noise to the density at render-time");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "turbulence_scale", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "noise_size");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Size", "Scale of the added turbulent noise");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "turbulence_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "noise_fac");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Turbulence Strength", "Strength of the added turbulent noise");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "turbulence_depth", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "noise_depth");
- RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "Depth", "Level of detail in the added turbulent noise");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "turbulence_influence", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noise_influence");
- RNA_def_property_enum_items(prop, turbulence_influence_items);
- RNA_def_property_ui_text(prop, "Turbulence Influence", "Method for driving added turbulent noise");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "noise_basis", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "noise_basis");
- RNA_def_property_enum_items(prop, prop_noise_basis_items);
- RNA_def_property_ui_text(prop, "Noise Basis", "Noise formula used for turbulence");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
-
- srna = RNA_def_struct(brna, "PointDensityTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Point Density", "Settings for the Point Density texture");
-
- prop = RNA_def_property(srna, "point_density", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "pd");
- RNA_def_property_struct_type(prop, "PointDensity");
- RNA_def_property_ui_text(prop, "Point Density", "The point density settings associated with this texture");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-}
-
-static void rna_def_texture_voxeldata(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem interpolation_type_items[] = {
- {TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor",
- "No interpolation, fast but blocky and low quality"},
- {TEX_VD_LINEAR, "TRILINEAR", 0, "Linear", "Good smoothness and speed"},
- {TEX_VD_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Mid-range quality and speed"},
- {TEX_VD_TRICUBIC_CATROM, "TRICUBIC_CATROM", 0, "Cubic Catmull-Rom", "High quality interpolation, but slower"},
- {TEX_VD_TRICUBIC_BSPLINE, "TRICUBIC_BSPLINE", 0, "Cubic B-Spline",
- "Smoothed high quality interpolation, but slower"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem file_format_items[] = {
- {TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"},
- {TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit grayscale binary data"},
- /*{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""}, */
- {TEX_VD_IMAGE_SEQUENCE, "IMAGE_SEQUENCE", 0, "Image Sequence",
- "Generate voxels from a sequence of image slices"},
- {TEX_VD_SMOKE, "SMOKE", 0, "Smoke", "Render voxels from a Blender smoke simulation"},
- {TEX_VD_HAIR, "HAIR", 0, "Hair", "Render voxels from a Blender hair simulation"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem voxeldata_extension[] = {
- {TEX_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"},
- {TEX_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"},
- {TEX_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem smoked_type_items[] = {
- {TEX_VD_SMOKEDENSITY, "SMOKEDENSITY", 0, "Smoke", "Use smoke density and color as texture data"},
- {TEX_VD_SMOKEFLAME, "SMOKEFLAME", 0, "Flame", "Use flame temperature as texture data"},
- {TEX_VD_SMOKEHEAT, "SMOKEHEAT", 0, "Heat", "Use smoke heat as texture data. Values from -2.0 to 2.0 are used"},
- {TEX_VD_SMOKEVEL, "SMOKEVEL", 0, "Velocity", "Use smoke velocity as texture data"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem hair_type_items[] = {
- {TEX_VD_HAIRDENSITY, "HAIRDENSITY", 0, "Density", "Use hair density as texture data"},
- {TEX_VD_HAIRRESTDENSITY, "HAIRRESTDENSITY", 0, "Rest Density", "Use hair rest density as texture data"},
- {TEX_VD_HAIRVELOCITY, "HAIRVELOCITY", 0, "Velocity", "Use hair velocity as texture data"},
- {TEX_VD_HAIRENERGY, "HAIRENERGY", 0, "Energy", "Use potential hair energy as texture data"},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "VoxelData", NULL);
- RNA_def_struct_sdna(srna, "VoxelData");
- RNA_def_struct_ui_text(srna, "VoxelData", "Voxel data settings");
- RNA_def_struct_path_func(srna, "rna_VoxelData_path");
-
- prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "interp_type");
- RNA_def_property_enum_items(prop, interpolation_type_items);
- RNA_def_property_ui_text(prop, "Interpolation", "Method to interpolate/smooth values between voxel cells");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "smoke_data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "smoked_type");
- RNA_def_property_enum_items(prop, smoked_type_items);
- RNA_def_property_ui_text(prop, "Source", "Simulation value to be used as a texture");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "hair_data_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "hair_type");
- RNA_def_property_enum_items(prop, hair_type_items);
- RNA_def_property_ui_text(prop, "Source", "Simulation value to be used as a texture");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "extension", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "extend");
- RNA_def_property_enum_items(prop, voxeldata_extension);
- RNA_def_property_ui_text(prop, "Extension", "How the texture is extrapolated past its original bounds");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "int_multiplier");
- RNA_def_property_range(prop, 0.01, FLT_MAX);
- RNA_def_property_ui_text(prop, "Intensity", "Multiplier for intensity values");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "file_format");
- RNA_def_property_enum_items(prop, file_format_items);
- RNA_def_property_ui_text(prop, "File Format", "Format of the source data set to render");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "source_path");
- RNA_def_property_ui_text(prop, "Source Path", "The external source data file to use");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "resolution", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "resol");
- RNA_def_property_range(prop, 1, 100000);
- RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "use_still_frame", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_VD_STILL);
- RNA_def_property_ui_text(prop, "Still Frame Only", "Always render a still frame from the voxel data sequence");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "still_frame", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "still_frame");
- RNA_def_property_range(prop, -MAXFRAME, MAXFRAME);
- RNA_def_property_ui_text(prop, "Still Frame Number", "The frame number to always use");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
- prop = RNA_def_property(srna, "domain_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Domain Object", "Object used as the smoke simulation domain");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-
-
- srna = RNA_def_struct(brna, "VoxelDataTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Voxel Data", "Settings for the Voxel Data texture");
-
- prop = RNA_def_property(srna, "voxel_data", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "vd");
- RNA_def_property_struct_type(prop, "VoxelData");
- RNA_def_property_ui_text(prop, "Voxel Data", "The voxel data associated with this texture");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "ima");
- RNA_def_property_struct_type(prop, "Image");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Image", "");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_image_update");
-
- prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "iuser");
- RNA_def_property_ui_text(prop, "Image User",
- "Parameters defining which layer, pass and frame of the image is displayed");
- RNA_def_property_update(prop, 0, "rna_Texture_voxeldata_update");
-}
-
-static void rna_def_texture_ocean(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem ocean_output_items[] = {
- {TEX_OCN_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Output XYZ displacement in RGB channels"},
- /*{TEX_OCN_NORMALS, "NORMALS", 0, "Normals", "Outputs wave normals"}, *//* these are in nor channel now */
- {TEX_OCN_FOAM, "FOAM", 0, "Foam", "Output Foam (wave overlap) amount in single channel"},
- {TEX_OCN_JPLUS, "JPLUS", 0, "Eigenvalues", "Positive Eigenvalues"},
- {TEX_OCN_EMINUS, "EMINUS", 0, "Eigenvectors (-)", "Negative Eigenvectors"},
- {TEX_OCN_EPLUS, "EPLUS", 0, "Eigenvectors (+)", "Positive Eigenvectors"},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "OceanTexData", NULL);
- RNA_def_struct_sdna(srna, "OceanTex");
- RNA_def_struct_ui_text(srna, "Ocean", "Ocean Texture settings");
- RNA_def_struct_path_func(srna, "rna_OceanTex_path");
-
- prop = RNA_def_property(srna, "output", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "output");
- RNA_def_property_enum_items(prop, ocean_output_items);
- RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Output", "The data that is output by the texture");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- prop = RNA_def_property(srna, "ocean_object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_ui_text(prop, "Modifier Object", "Object containing the ocean modifier");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-
- srna = RNA_def_struct(brna, "OceanTexture", "Texture");
- RNA_def_struct_sdna(srna, "Tex");
- RNA_def_struct_ui_text(srna, "Ocean", "Settings for the Ocean texture");
-
- prop = RNA_def_property(srna, "ocean", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "ot");
- RNA_def_property_struct_type(prop, "OceanTexData");
- RNA_def_property_ui_text(prop, "Ocean", "The ocean data associated with this texture");
- RNA_def_property_update(prop, 0, "rna_Texture_update");
-}
-
static void rna_def_texture(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2134,13 +1528,9 @@ static void rna_def_texture(BlenderRNA *brna)
rna_def_texture_stucci(brna);
rna_def_texture_noise(brna);
rna_def_texture_image(brna);
- rna_def_texture_environment_map(brna);
rna_def_texture_musgrave(brna);
rna_def_texture_voronoi(brna);
rna_def_texture_distorted_noise(brna);
- rna_def_texture_pointdensity(brna);
- rna_def_texture_voxeldata(brna);
- rna_def_texture_ocean(brna);
/* XXX add more types here .. */
RNA_api_texture(srna);
@@ -2150,7 +1540,6 @@ void RNA_def_texture(BlenderRNA *brna)
{
rna_def_texture(brna);
rna_def_mtex(brna);
- rna_def_environment_map(brna);
rna_def_texmapping(brna);
rna_def_colormapping(brna);
}
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index a8fcf0ca3b6..1d513a494d7 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -45,30 +45,6 @@
#include "RE_pipeline.h"
#include "RE_shader_ext.h"
-static void save_envmap(struct EnvMap *env, bContext *C, ReportList *reports, const char *filepath,
- struct Scene *scene, float layout[12])
-{
- if (scene == NULL) {
- scene = CTX_data_scene(C);
- }
-
- RE_WriteEnvmapResult(reports, scene, env, filepath, scene->r.im_format.imtype, layout);
-}
-
-static void clear_envmap(struct EnvMap *env, bContext *C)
-{
- Main *bmain = CTX_data_main(C);
- Tex *tex;
-
- BKE_texture_envmap_free_data(env);
-
- for (tex = bmain->tex.first; tex; tex = tex->id.next)
- if (tex->env == env) {
- WM_event_add_notifier(C, NC_TEXTURE | NA_EDITED, tex);
- break;
- }
-}
-
static void texture_evaluate(struct Tex *tex, float value[3], float r_color[4])
{
TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
@@ -102,31 +78,4 @@ void RNA_api_texture(StructRNA *srna)
}
-void RNA_api_environment_map(StructRNA *srna)
-{
- FunctionRNA *func;
- PropertyRNA *parm;
-
- static const float default_layout[] = {0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 2, 1};
-
- func = RNA_def_function(srna, "clear", "clear_envmap");
- RNA_def_function_ui_description(func, "Discard the environment map and free it from memory");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
-
-
- func = RNA_def_function(srna, "save", "save_envmap");
- RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
-
- parm = RNA_def_string_file_name(func, "filepath", NULL, FILE_MAX, "File path", "Location of the output file");
- RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
-
- RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken");
-
- RNA_def_float_array(func, "layout", 12, default_layout, 0.0f, 1000.0f, "File layout",
- "Flat array describing the X,Y position of each cube face in the "
- "output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] "
- "(use -1 to skip a face)", 0.0f, 1000.0f);
-}
-
#endif
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index fe69b91e833..2645dc081c8 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -52,7 +52,6 @@
#include "WM_types.h"
#include "BLT_lang.h"
-#include "GPU_buffers.h"
#ifdef WITH_OPENSUBDIV
static const EnumPropertyItem opensubdiv_compute_type_items[] = {
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index e78355ee426..92fbbd61898 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -64,28 +64,6 @@ static PointerRNA rna_World_mist_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_WorldMistSettings, ptr->id.data);
}
-static void rna_World_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- World *wo = (World *)ptr->data;
- rna_iterator_array_begin(iter, (void *)wo->mtex, sizeof(MTex *), MAX_MTEX, 0, NULL);
-}
-
-static PointerRNA rna_World_active_texture_get(PointerRNA *ptr)
-{
- World *wo = (World *)ptr->data;
- Tex *tex;
-
- tex = give_current_world_texture(wo);
- return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
-}
-
-static void rna_World_active_texture_set(PointerRNA *ptr, PointerRNA value)
-{
- World *wo = (World *)ptr->data;
-
- set_current_world_texture(wo, value.data);
-}
-
static void rna_World_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
World *wo = ptr->id.data;
@@ -129,117 +107,11 @@ static void rna_World_use_nodes_update(bContext *C, PointerRNA *ptr)
#else
-static void rna_def_world_mtex(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static const EnumPropertyItem texco_items[] = {
- {TEXCO_VIEW, "VIEW", 0, "View", "Use view vector for the texture coordinates"},
- {TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates (interior mist)"},
- {TEXCO_ANGMAP, "ANGMAP", 0, "AngMap", "Use 360 degree angular coordinates, e.g. for spherical light probes"},
- {TEXCO_H_SPHEREMAP, "SPHERE", 0, "Sphere", "For 360 degree panorama sky, spherical mapped, only top half"},
- {TEXCO_EQUIRECTMAP, "EQUIRECT", 0, "Equirectangular", "For 360 degree panorama sky, equirectangular mapping"},
- {TEXCO_H_TUBEMAP, "TUBE", 0, "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half"},
- {TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
- {0, NULL, 0, NULL, NULL}
- };
-
- srna = RNA_def_struct(brna, "WorldTextureSlot", "TextureSlot");
- RNA_def_struct_sdna(srna, "MTex");
- RNA_def_struct_ui_text(srna, "World Texture Slot", "Texture slot for textures in a World data-block");
-
- /* map to */
- prop = RNA_def_property(srna, "use_map_blend", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_BLEND);
- RNA_def_property_ui_text(prop, "Blend", "Affect the color progression of the background");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_map_horizon", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_HORIZ);
- RNA_def_property_ui_text(prop, "Horizon", "Affect the color of the horizon");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_map_zenith_up", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENUP);
- RNA_def_property_ui_text(prop, "Zenith Up", "Affect the color of the zenith above");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_map_zenith_down", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mapto", WOMAP_ZENDOWN);
- RNA_def_property_ui_text(prop, "Zenith Down", "Affect the color of the zenith below");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "texco");
- RNA_def_property_enum_items(prop, texco_items);
- RNA_def_property_ui_text(prop, "Texture Coordinates",
- "Texture coordinates used to map the texture onto the background");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
- RNA_def_property_pointer_sdna(prop, NULL, "object");
- RNA_def_property_struct_type(prop, "Object");
- RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "blendfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Blend Factor", "Amount texture affects color progression of the background");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "horizon_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "colfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Horizon Factor", "Amount texture affects color of the horizon");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "zenupfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Zenith Up Factor", "Amount texture affects color of the zenith above");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "zendownfac");
- RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Zenith Down Factor", "Amount texture affects color of the zenith below");
- RNA_def_property_update(prop, 0, "rna_World_update");
-}
-
static void rna_def_lighting(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static const EnumPropertyItem blend_mode_items[] = {
- {WO_AOMUL, "MULTIPLY", 0, "Multiply", "Multiply direct lighting with ambient occlusion, darkening the result"},
- {WO_AOADD, "ADD", 0, "Add", "Add light and shadow"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_color_items[] = {
- {WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"},
- {WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy"},
- {WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_sample_method_items[] = {
- {WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", "Fastest and gives the most noise"},
- {WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas"},
- {WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality"},
- {0, NULL, 0, NULL, NULL}
- };
-
- static const EnumPropertyItem prop_gather_method_items[] = {
- {WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required"},
- {WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise"},
- {0, NULL, 0, NULL, NULL}
- };
-
srna = RNA_def_struct(brna, "WorldLighting", NULL);
RNA_def_struct_sdna(srna, "World");
RNA_def_struct_nested(brna, srna, "World");
@@ -259,135 +131,12 @@ static void rna_def_lighting(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop = RNA_def_property(srna, "ao_blend_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "aomix");
- RNA_def_property_enum_items(prop, blend_mode_items);
- RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- /* environment lighting */
- prop = RNA_def_property(srna, "use_environment_light", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_ENV_LIGHT);
- RNA_def_property_ui_text(prop, "Use Environment Lighting", "Add light coming from the environment");
- RNA_def_property_update(prop, 0, "rna_World_draw_update");
-
- prop = RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ao_env_energy");
- RNA_def_property_ui_range(prop, 0, FLT_MAX, 1, 3);
- RNA_def_property_ui_text(prop, "Environment Color", "Defines the strength of environment light");
- RNA_def_property_update(prop, 0, "rna_World_draw_update");
-
- prop = RNA_def_property(srna, "environment_color", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "aocolor");
- RNA_def_property_enum_items(prop, prop_color_items);
- RNA_def_property_ui_text(prop, "Environment Color", "Defines where the color of the environment light comes from");
- RNA_def_property_update(prop, 0, "rna_World_draw_update");
-
- /* indirect lighting */
- prop = RNA_def_property(srna, "use_indirect_light", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_INDIRECT_LIGHT);
- RNA_def_property_ui_text(prop, "Use Indirect Lighting", "Add indirect light bouncing of surrounding objects");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "indirect_factor", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy");
- RNA_def_property_range(prop, 0, INT_MAX);
- RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
- RNA_def_property_ui_text(prop, "Indirect Factor", "Factor for how much surrounding objects contribute to light");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "ao_indirect_bounces");
- RNA_def_property_range(prop, 1, SHRT_MAX);
- RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- /* gathering parameters */
- prop = RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
- RNA_def_property_enum_items(prop, prop_gather_method_items);
- RNA_def_property_ui_text(prop, "Gather Method", "");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
- RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce over-occlusion");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
RNA_def_property_ui_text(prop, "Distance",
"Length of rays, defines how far away other faces give occlusion effect");
RNA_def_property_update(prop, 0, "rna_World_update");
- prop = RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "aodistfac");
- RNA_def_property_ui_text(prop, "Strength",
- "Attenuation falloff strength, the higher, the less influence distant objects have");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "aobias");
- RNA_def_property_range(prop, 0, 0.5);
- RNA_def_property_ui_text(prop, "Bias",
- "Bias (in radians) to prevent smoothed faces from showing banding "
- "(for Raytrace Constant Jittered)");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Threshold",
- "Samples below this threshold will be considered fully shadowed/unshadowed and skipped "
- "(for Raytrace Adaptive QMC)");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_text(prop, "Adapt To Speed",
- "Use the speed vector pass to reduce AO samples in fast moving pixels - "
- "higher values result in more aggressive sample reduction "
- "(requires Vec pass enabled, for Raytrace Adaptive QMC)");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
- RNA_def_property_range(prop, 0.0001, 10);
- RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
- RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
- RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_falloff", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
- RNA_def_property_ui_text(prop, "Falloff", "Distance will be used to attenuate shadows");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_cache", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
- RNA_def_property_ui_text(prop, "Pixel Cache",
- "Cache AO results in pixels and interpolate over neighboring pixels for speedup");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "aosamp");
- RNA_def_property_range(prop, 1, 128);
- RNA_def_property_ui_text(prop, "Samples",
- "Amount of ray samples. Higher values give smoother results and longer rendering times");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
- RNA_def_property_enum_items(prop, prop_sample_method_items);
- RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace)");
- RNA_def_property_update(prop, 0, "rna_World_update");
}
static void rna_def_world_mist(BlenderRNA *brna)
@@ -456,9 +205,6 @@ void RNA_def_world(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_WORLD_DATA);
rna_def_animdata_common(srna);
- rna_def_mtex_common(brna, srna, "rna_World_mtex_begin", "rna_World_active_texture_get",
- "rna_World_active_texture_set", NULL, "WorldTextureSlot", "WorldTextureSlots",
- "rna_World_update", "rna_World_update");
/* colors */
prop = RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
@@ -469,47 +215,6 @@ void RNA_def_world(BlenderRNA *brna)
/* render-only uses this */
RNA_def_property_update(prop, 0, "rna_World_draw_update");
- prop = RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "zenr");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith");
- RNA_def_property_update(prop, 0, "rna_World_draw_update");
-
- prop = RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "ambr");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Ambient Color", "Ambient color of the world");
- RNA_def_property_update(prop, 0, "rna_World_draw_update");
-
- /* exp, range */
- prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "exp");
- RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Exposure", "Amount of exponential color correction for light");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- prop = RNA_def_property(srna, "color_range", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "range");
- RNA_def_property_range(prop, 0.2, 5.0);
- RNA_def_property_ui_text(prop, "Range", "The color range that will be mapped to 0-1");
- RNA_def_property_update(prop, 0, "rna_World_update");
-
- /* sky type */
- prop = RNA_def_property(srna, "use_sky_blend", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYBLEND);
- RNA_def_property_ui_text(prop, "Blend Sky", "Render background with natural progression from horizon to zenith");
- RNA_def_property_update(prop, NC_WORLD | ND_WORLD_DRAW, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_sky_paper", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYPAPER);
- RNA_def_property_ui_text(prop, "Paper Sky", "Flatten blend or texture coordinates");
- RNA_def_property_update(prop, NC_WORLD | ND_WORLD_DRAW, "rna_World_update");
-
- prop = RNA_def_property(srna, "use_sky_real", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "skytype", WO_SKYREAL);
- RNA_def_property_ui_text(prop, "Real Sky", "Render background with a real horizon, relative to the camera angle");
- RNA_def_property_update(prop, NC_WORLD | ND_WORLD_DRAW, "rna_World_update");
-
/* nested structs */
prop = RNA_def_property(srna, "light_settings", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
@@ -537,7 +242,6 @@ void RNA_def_world(BlenderRNA *brna)
rna_def_lighting(brna);
rna_def_world_mist(brna);
- rna_def_world_mtex(brna);
}
#endif