diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 15:42:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-09 15:43:01 +0300 |
commit | 2ca8230f67db3d6c4693d0a2e0997dfd5de43091 (patch) | |
tree | d8d7e5c7a15a68f7b27fde0dc7939cbfcf71cf4a /source/blender/makesrna/intern/rna_material.c | |
parent | 09ce794dc8c6cf5e406532651576e6b86dfd9232 (diff) | |
parent | fb565ddb681f39cbe47e91d11e5b728bb4314a7b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 9f5b72ff13e..e1eadda3696 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -97,10 +97,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); } @@ -226,7 +226,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; @@ -254,7 +254,7 @@ static void rna_def_material_display(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); @@ -267,7 +267,7 @@ static void rna_def_material_display(StructRNA *srna) RNA_def_property_range(prop, 0, 1); RNA_def_property_ui_text(prop, "Roughness", "Roughness of the material"); RNA_def_property_update(prop, 0, "rna_Material_draw_update"); - + prop = RNA_def_property(srna, "specular_intensity", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "spec"); RNA_def_property_float_default(prop, 0.5f); @@ -334,7 +334,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); - + /* 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); @@ -386,7 +386,7 @@ void RNA_def_material(BlenderRNA *brna) 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, "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"); @@ -432,14 +432,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); @@ -490,7 +490,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, "is_valid", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "valid", 1); RNA_def_property_clear_flag(prop, PROP_EDITABLE); |