diff options
author | William Reynish <billrey@me.com> | 2019-04-14 19:41:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-14 21:09:02 +0300 |
commit | f5ea1fc4fbafbac6f648ba0d9d9ef16ca8323041 (patch) | |
tree | 26db8316aa052ad327b44ef15746ac6e09896143 /source/blender/makesrna/intern/rna_material.c | |
parent | 8b0102b443571a19ab17e141623cfc029320813c (diff) |
Render: new material preview
* EEVEE support through irradiance volume and light probe.
* New shader ball shape (designed by Robin Marin).
* New cloth and liquid shapes, removed monkey.
* Replace world sphere by toggle to use world for any shape.
* Slight bevel on cube.
* More subdivision for displacement preview.
* Fixed and improved UV mapping for all shapes.
* Material icon / asset preview now uses specified shape instead of always
a sphere. So for example hair material can be displayed as hair.
Ref T57683
Diffstat (limited to 'source/blender/makesrna/intern/rna_material.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 5445db78582..8e5f486fea1 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -658,9 +658,10 @@ void RNA_def_material(BlenderRNA *brna) {MA_FLAT, "FLAT", ICON_MATPLANE, "Flat", "Flat XY plane"}, {MA_SPHERE, "SPHERE", ICON_MATSPHERE, "Sphere", "Sphere"}, {MA_CUBE, "CUBE", ICON_MATCUBE, "Cube", "Cube"}, - {MA_MONKEY, "MONKEY", ICON_MONKEY, "Monkey", "Monkey"}, {MA_HAIR, "HAIR", ICON_HAIR, "Hair", "Hair strands"}, - {MA_SPHERE_A, "SPHERE_A", ICON_MAT_SPHERE_SKY, "World Sphere", "Large sphere with sky"}, + {MA_SHADERBALL, "SHADERBALL", ICON_MATSHADERBALL, "Shader Ball", "Shader Ball"}, + {MA_CLOTH, "CLOTH", ICON_MATCLOTH, "Cloth", "Cloth"}, + {MA_FLUID, "FLUID", ICON_MATFLUID, "Fluid", "Fluid"}, {0, NULL, 0, NULL, NULL}, }; @@ -731,7 +732,12 @@ void RNA_def_material(BlenderRNA *brna) 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_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, "use_preview_world", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pr_flag", MA_PREVIEW_WORLD); + RNA_def_property_ui_text(prop, "Preview World", "Use the current world background to light the preview render"); RNA_def_property_update(prop, 0, "rna_Material_update_previews"); prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); |