Workbench: Clay renderer was not accessible anymore
authorJeroen Bakker <j.bakker@atmind.nl>
Fri, 20 Apr 2018 12:52:16 +0000 (14:52 +0200)
committerJeroen Bakker <j.bakker@atmind.nl>
Fri, 20 Apr 2018 12:52:16 +0000 (14:52 +0200)
issue was the factoring of the workspace engine that was removed. the logic implied that the clay could not be rendered as clay will be a draw mode we placed it already there so it is accessible in any engine. Should eventually fix the clay engine by migrating it to the workbench engine.

source/blender/draw/intern/draw_manager.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesrna/intern/rna_space.c

index dcc005d190af98ef947ac8329a0aedb60cc3a6a6..465768f1efa71d309b60539adc53b87227fb5735 100644 (file)
@@ -912,6 +912,10 @@ static void drw_engines_enable_from_engine(RenderEngineType *engine_type, int dr
                        }
                        break;
 
+               case OB_CLAY:
+                       use_drw_engine(&draw_engine_clay_type);
+                       break;
+
                case OB_TEXTURE:
                case OB_MATERIAL:
                case OB_RENDER:
index 0f9cbc06fa89851991fc161d4c3324b06b742caf..9c25da12da738b69728a47bc7dec7ec993445747 100644 (file)
@@ -442,6 +442,7 @@ enum {
        OB_MATERIAL  = 4,
        OB_TEXTURE   = 5,
        OB_RENDER    = 6,
+       OB_CLAY    = 7,
 };
 
 /* dtx: flags (short) */
index 3c02b60140a8a8473cad3a2270007040352af9ab..7d5745c423e91dce68fd6b4aecc051ecbe29dcec 100644 (file)
@@ -176,6 +176,7 @@ static const EnumPropertyItem autosnap_items[] = {
 const EnumPropertyItem rna_enum_viewport_shade_items[] = {
        {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"},
        {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid"},
+       {OB_CLAY, "MATCAP", ICON_SOLID, "Clay", "Display using Clay"},
        {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Texture", "Display the object solid, with a texture"},
        {OB_MATERIAL, "MATERIAL", ICON_MATERIAL_DATA, "Material", "Display objects solid, with GLSL material"},
        {OB_RENDER, "RENDERED", ICON_SMOOTH, "Rendered", "Display render preview"},
@@ -691,6 +692,7 @@ static const EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(
        int totitem = 0;
 
        RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_SOLID);
+       RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_CLAY);
 
        if (BKE_scene_uses_blender_eevee(scene)) {
                RNA_enum_items_add_value(&item, &totitem, rna_enum_viewport_shade_items, OB_RENDER);