Fix T55061: Shadows were not updated during sclupting.
authorJeroen Bakker <j.bakker@atmind.nl>
Tue, 15 May 2018 07:12:42 +0000 (09:12 +0200)
committerJeroen Bakker <j.bakker@atmind.nl>
Tue, 15 May 2018 07:13:47 +0000 (09:13 +0200)
source/blender/draw/engines/workbench/workbench_materials.c

index 585449475e34e3f829cd9632759bb4389b1ef529..f4b9a0a3e536dd2088e6f75ed30f649e6254d798 100644 (file)
@@ -558,7 +558,12 @@ void workbench_materials_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob
                if (SHADOW_ENABLED(wpd) && (ob->display.flag & OB_SHOW_SHADOW) > 0) {
                        struct Gwn_Batch *geom_shadow = DRW_cache_object_surface_get(ob);
                        if (geom_shadow) {
-                               DRW_shgroup_call_object_add(wpd->shadow_shgrp, geom_shadow, ob);
+                               if (is_sculpt_mode) {
+                                       DRW_shgroup_call_sculpt_add(wpd->shadow_shgrp, ob, ob->obmat);
+                               }
+                               else {
+                                       DRW_shgroup_call_object_add(wpd->shadow_shgrp, geom_shadow, ob);
+                               }
                        }
                }
        }