From f5ea1fc4fbafbac6f648ba0d9d9ef16ca8323041 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Sun, 14 Apr 2019 18:41:10 +0200 Subject: 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 --- source/blender/makesrna/intern/rna_material.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_material.c') 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); -- cgit v1.2.3