diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2018-04-20 17:40:08 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2018-04-20 17:40:08 +0300 |
commit | c4e007d5f6e0058ca6cb6af3a384a6831a1ab637 (patch) | |
tree | a6bb2ea456ce054fe6ac25192fc3178c756d88bb /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 8ec25e5dccd21e25ea11336b88e14306ed2f77a0 (diff) |
Workbench: Removed Clay engine draw mode
- need a draw mode in workbench engine.
- reorganized render engine retrieval in 3d view. There are 2 places
where this happenes 1. 3d view draw code and 2. draw manager.
the draw manager code is not used for external engines, currently added
an exception in for cycles. will need to have a better solution in
place.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 5316520ccab..166684e7230 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1245,16 +1245,15 @@ static void view3d_draw_view(const bContext *C, ARegion *ar) RenderEngineType *ED_view3d_engine_type(Scene *scene, int drawtype) { - /* Tempory viewport draw modes until we have a proper system. */ - if (drawtype == OB_RENDER) { - return RE_engines_find(scene->r.engine); - } - else if (drawtype == OB_MATERIAL) { + /* + * Tempory viewport draw modes until we have a proper system. + * all modes are done in the draw manager, except + * cycles material as it is an external render engine. + */ + if (strcmp(scene->r.engine, RE_engine_id_CYCLES) == 0 && drawtype == OB_MATERIAL) { return RE_engines_find(RE_engine_id_BLENDER_EEVEE); } - else { - return RE_engines_find(RE_engine_id_BLENDER_WORKBENCH); - } + return RE_engines_find(scene->r.engine); } void view3d_main_region_draw(const bContext *C, ARegion *ar) |