Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-14 16:26:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-14 16:26:34 +0400
commit8d3955c28d4f3db7026dc7f1a33a421a727f89d3 (patch)
tree502e22a0c45d7c22aea386740f31d7b2e55134c2 /source/blender/blenkernel/intern/screen.c
parent75d4a836b8427f1d71f41d037390352bffeafee4 (diff)
Depsgraph:
* Move function to compute visible screen layers to BKE. * Use this now in the depsgraph, was still using this all layers to flush. Still missing a way to get the current scene in background mode.. * Also two more function to not require a scene pointer anymore: * DAG_object_update_flags is now DAG_id_update_flags. * DAG_ids_flush_update is now available next to DAG_scene_flush_update.
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r--source/blender/blenkernel/intern/screen.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index cc740d7fb3d..661d0da1550 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -33,8 +33,10 @@
#include "MEM_guardedalloc.h"
+#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
+#include "DNA_view3d_types.h"
#include "BLI_blenlib.h"
@@ -321,4 +323,23 @@ void free_screen(bScreen *sc)
BLI_freelistN(&sc->areabase);
}
+/* for depsgraph */
+unsigned int BKE_screen_visible_layers(bScreen *screen)
+{
+ ScrArea *sa;
+ unsigned int layer= 0;
+
+ if(!screen)
+ return layer;
+
+ /* get all used view3d layers */
+ for(sa= screen->areabase.first; sa; sa= sa->next)
+ if(sa->spacetype==SPACE_VIEW3D)
+ layer |= ((View3D *)sa->spacedata.first)->lay;
+
+ if(!layer)
+ return screen->scene->lay;
+
+ return layer;
+}