Depsgraph: Don't use legacy function when building without legacy depsgraph
This commit is contained in:
@@ -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}")
|
||||
|
@@ -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] )
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user