diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 15:40:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 15:40:09 +0300 |
commit | fb565ddb681f39cbe47e91d11e5b728bb4314a7b (patch) | |
tree | 93eba0946d0e65fd3cf16564cb41a0417bb3ba1e /source/blender/makesrna/intern/rna_material.c | |
parent | 56a47e58f4de3f66c2fee827fb2a7883b4f493e9 (diff) |
Cleanup: trailing space in RNA
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 302 |
1 files changed, 151 insertions, 151 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 4e86e5c59af..a4b9f52464d 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -109,10 +109,10 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point static void rna_Material_update_previews(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) { Material *ma = ptr->id.data; - + if (ma->nodetree) BKE_node_preview_clear_tree(ma->nodetree); - + WM_main_add_notifier(NC_MATERIAL | ND_SHADING_PREVIEW, ma); } @@ -205,7 +205,7 @@ static void rna_Material_active_paint_texture_index_update(Main *bmain, Scene *s for (sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_IMAGE) { SpaceImage *sima = (SpaceImage *)sl; - + if (!sima->pin) ED_space_image_set(bmain, sima, scene, scene->obedit, image); } @@ -294,7 +294,7 @@ static int rna_MaterialTextureSlot_use_get(PointerRNA *ptr) for (a = 0; a < MAX_MTEX; a++) if (ma->mtex[a] == mtex) return (ma->septex & (1 << a)) == 0; - + return 0; } @@ -342,7 +342,7 @@ static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr) if (ma->use_nodes && ma->nodetree == NULL) ED_node_shader_default(C, &ma->id); - + rna_Material_draw_update(CTX_data_main(C), CTX_data_scene(C), ptr); } @@ -352,11 +352,11 @@ static const EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext * 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 */ } @@ -369,10 +369,10 @@ static const EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext * 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; } @@ -418,7 +418,7 @@ void rna_mtex_texture_slots_clear(ID *self_id, struct bContext *C, ReportList *r BKE_report(reports, RPT_ERROR, "Mtex not found for this type"); return; } - + if (index < 0 || index >= MAX_MTEX) { BKE_reportf(reports, RPT_ERROR, "Index %d is invalid", index); return; @@ -449,7 +449,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {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", ""}, @@ -457,7 +457,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {3, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL} }; - + static const EnumPropertyItem prop_y_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, @@ -465,7 +465,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {3, "Z", 0, "Z", ""}, {0, NULL, 0, NULL, NULL} }; - + static const EnumPropertyItem prop_z_mapping_items[] = { {0, "NONE", 0, "None", ""}, {1, "X", 0, "X", ""}, @@ -499,7 +499,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) {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"); @@ -510,7 +510,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) 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"); @@ -546,67 +546,67 @@ static void rna_def_material_mtex(BlenderRNA *brna) 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"); @@ -617,13 +617,13 @@ static void rna_def_material_mtex(BlenderRNA *brna) 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); @@ -730,69 +730,69 @@ static void rna_def_material_mtex(BlenderRNA *brna) 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); @@ -804,9 +804,9 @@ static void rna_def_material_mtex(BlenderRNA *brna) 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"); @@ -817,7 +817,7 @@ static void rna_def_material_mtex(BlenderRNA *brna) 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); @@ -850,12 +850,12 @@ static void rna_def_material_gamesettings(BlenderRNA *brna) {GEMAT_SHADOW, "SHADOW", 0, "Shadow", "Faces are used for shadow"}, {0, NULL, 0, NULL, NULL} }; - + srna = RNA_def_struct(brna, "MaterialGameSettings", NULL); RNA_def_struct_sdna(srna, "GameSettings"); RNA_def_struct_nested(brna, srna, "Material"); RNA_def_struct_ui_text(srna, "Material Game Settings", "Game Engine settings for a Material data-block"); - + prop = RNA_def_property(srna, "use_backface_culling", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_BACKCULL); /* use bitflags */ RNA_def_property_ui_text(prop, "Backface Culling", "Hide Back of the face in Game Engine "); @@ -903,19 +903,19 @@ static void rna_def_material_colors(StructRNA *srna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Diffuse Color", "Diffuse color of the material"); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); - + prop = RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR); RNA_def_property_float_sdna(prop, NULL, "specr"); RNA_def_property_array(prop, 3); 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, "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"); @@ -926,7 +926,7 @@ static void rna_def_material_colors(StructRNA *srna) 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); @@ -951,13 +951,13 @@ static void rna_def_material_colors(StructRNA *srna) 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); @@ -969,7 +969,7 @@ static void rna_def_material_colors(StructRNA *srna) 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); @@ -1015,19 +1015,19 @@ static void rna_def_material_diffuse(StructRNA *srna) {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"); @@ -1056,7 +1056,7 @@ static void rna_def_material_diffuse(StructRNA *srna) 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"); @@ -1083,32 +1083,32 @@ static void rna_def_material_raymirror(BlenderRNA *brna) 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); @@ -1116,13 +1116,13 @@ static void rna_def_material_raymirror(BlenderRNA *brna) "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); @@ -1130,13 +1130,13 @@ static void rna_def_material_raymirror(BlenderRNA *brna) "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); @@ -1144,7 +1144,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna) "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); @@ -1170,32 +1170,32 @@ static void rna_def_material_raytra(BlenderRNA *brna) 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); @@ -1203,13 +1203,13 @@ static void rna_def_material_raytra(BlenderRNA *brna) "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); @@ -1217,7 +1217,7 @@ static void rna_def_material_raytra(BlenderRNA *brna) "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); @@ -1225,7 +1225,7 @@ static void rna_def_material_raytra(BlenderRNA *brna) "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); @@ -1253,44 +1253,44 @@ static void rna_def_material_volume(BlenderRNA *brna) /*{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); @@ -1298,26 +1298,26 @@ static void rna_def_material_volume(BlenderRNA *brna) "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); @@ -1325,7 +1325,7 @@ static void rna_def_material_volume(BlenderRNA *brna) "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); @@ -1338,7 +1338,7 @@ static void rna_def_material_volume(BlenderRNA *brna) 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); @@ -1347,21 +1347,21 @@ static void rna_def_material_volume(BlenderRNA *brna) "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); @@ -1369,20 +1369,20 @@ static void rna_def_material_volume(BlenderRNA *brna) 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); @@ -1407,113 +1407,113 @@ static void rna_def_material_halo(BlenderRNA *brna) 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"); @@ -1594,7 +1594,7 @@ static void rna_def_material_sss(BlenderRNA *brna) 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"}, @@ -1603,13 +1603,13 @@ static void rna_def_material_specularity(StructRNA *srna) {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); @@ -1666,7 +1666,7 @@ static void rna_def_material_strand(BlenderRNA *brna) 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); @@ -1727,12 +1727,12 @@ static void rna_def_material_physics(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - + srna = RNA_def_struct(brna, "MaterialPhysics", NULL); RNA_def_struct_sdna(srna, "Material"); RNA_def_struct_nested(brna, srna, "Material"); RNA_def_struct_ui_text(srna, "Material Physics", "Physics settings for a Material data-block"); - + prop = RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "friction"); RNA_def_property_range(prop, 0, 100); @@ -1755,12 +1755,12 @@ static void rna_def_material_physics(BlenderRNA *brna) RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 2); RNA_def_property_ui_text(prop, "Force", "Upward spring force, when inside the physics distance area"); - + prop = RNA_def_property(srna, "fh_distance", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fhdist"); RNA_def_property_range(prop, 0, 20); RNA_def_property_ui_text(prop, "Distance", "Distance of the physics area"); - + prop = RNA_def_property(srna, "fh_damping", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "xyfrict"); RNA_def_property_range(prop, 0, 1); @@ -1785,7 +1785,7 @@ void RNA_def_material(BlenderRNA *brna) {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"}, @@ -1809,7 +1809,7 @@ void RNA_def_material(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "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); @@ -1827,14 +1827,14 @@ void RNA_def_material(BlenderRNA *brna) 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"); - + /* For Preview Render */ prop = RNA_def_property(srna, "preview_render_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "pr_type"); RNA_def_property_enum_items(prop, preview_type_items); 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); @@ -1851,13 +1851,13 @@ void RNA_def_material(BlenderRNA *brna) 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"); @@ -1894,7 +1894,7 @@ void RNA_def_material(BlenderRNA *brna) 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", @@ -1912,17 +1912,17 @@ void RNA_def_material(BlenderRNA *brna) 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"); @@ -1934,7 +1934,7 @@ void RNA_def_material(BlenderRNA *brna) "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", @@ -1945,13 +1945,13 @@ void RNA_def_material(BlenderRNA *brna) 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", @@ -1964,49 +1964,49 @@ void RNA_def_material(BlenderRNA *brna) 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_face_texture", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE); RNA_def_property_ui_text(prop, "Face Textures", "Replace the object's base color with color from UV map image textures"); RNA_def_property_update(prop, 0, "rna_Material_update"); - + prop = RNA_def_property(srna, "use_face_texture_alpha", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE_ALPHA); RNA_def_property_ui_text(prop, "Face Textures Alpha", "Replace the object's base alpha value with alpha from UV map image textures"); 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", @@ -2024,14 +2024,14 @@ void RNA_def_material(BlenderRNA *brna) 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", @@ -2074,7 +2074,7 @@ void RNA_def_material(BlenderRNA *brna) 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"); - + prop = RNA_def_property(srna, "physics", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); RNA_def_property_struct_type(prop, "MaterialPhysics"); @@ -2160,14 +2160,14 @@ static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const ch RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex"); RNA_def_function_return(func, parm); - + func = RNA_def_function(srna, "create", "rna_mtex_texture_slots_create"); RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize", 0, INT_MAX); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex"); RNA_def_function_return(func, parm); - + func = RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear"); RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_NO_SELF | FUNC_USE_CONTEXT | FUNC_USE_REPORTS); parm = RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear", 0, INT_MAX); @@ -2218,7 +2218,7 @@ static void rna_def_tex_slot(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "uvname"); 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); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Index", "Index of MTex slot in the material"); |