diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-05 15:51:58 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-05 15:52:29 +0300 |
commit | 1478ac35c743430d0b333ae9829689782baf70c2 (patch) | |
tree | 1c64deaa6eed08cd48f92766232ac6377e7c98f3 /source | |
parent | 9683807459947330d50e8e38edae430d10d53ffc (diff) |
Depsgraph: Don't use legacy function when building without legacy depsgraph
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/SConscript | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt index 181a0adfd28..059b384a9e2 100644 --- a/source/blender/editors/space_view3d/CMakeLists.txt +++ b/source/blender/editors/space_view3d/CMakeLists.txt @@ -90,4 +90,8 @@ if(WITH_FREESTYLE) add_definitions(-DWITH_FREESTYLE) endif() +if(WITH_LEGACY_DEPSGRAPH) + add_definitions(-DWITH_LEGACY_DEPSGRAPH) +endif() + blender_add_lib(bf_editor_space_view3d "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/space_view3d/SConscript b/source/blender/editors/space_view3d/SConscript index 6e4e47e22a4..7fdccce1c0e 100644 --- a/source/blender/editors/space_view3d/SConscript +++ b/source/blender/editors/space_view3d/SConscript @@ -68,4 +68,7 @@ if env['WITH_BF_INTERNATIONAL']: if env['WITH_BF_FREESTYLE']: defs.append('WITH_FREESTYLE') +if env['WITH_BF_LEGACY_DEPSGRAPH']: + defs.append('WITH_LEGACY_DEPSGRAPH') + env.BlenderLib ( 'bf_editors_space_view3d', sources, incs, defines = defs, libtype=['core'], priority=[40] ) diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 5d65cccb213..7869522e8fb 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -928,6 +928,7 @@ static void view3d_main_area_listener(bScreen *sc, ScrArea *sa, ARegion *ar, wmN case ND_SHADING: case ND_NODES: { +#ifdef WITH_LEGACY_DEPSGRAPH Object *ob = OBACT; if ((v3d->drawtype == OB_MATERIAL) || (ob && (ob->mode == OB_MODE_TEXTURE_PAINT)) || @@ -935,6 +936,7 @@ static void view3d_main_area_listener(bScreen *sc, ScrArea *sa, ARegion *ar, wmN (scene->gm.matmode == GAME_MAT_GLSL || BKE_scene_use_new_shading_nodes(scene))) || !DEG_depsgraph_use_legacy()) +#endif { ED_region_tag_redraw(ar); } |