[Bf-blender-cvs] [2a76656] master: Fix T38295: Crash when changing screen with different visible layers

Sergey Sharybin noreply at git.blender.org
Tue Jan 21 10:04:14 CET 2014


Commit: 2a7665697637810515fb3620dad19c72f1c13e13
Author: Sergey Sharybin
Date:   Tue Jan 21 15:01:32 2014 +0600
https://developer.blender.org/rB2a7665697637810515fb3620dad19c72f1c13e13

Fix T38295: Crash when changing screen with different visible layers

The issue was caused by missing object update for the curve object
before going to new screen. And that new screen had different visible
layers due to disabled lock_camera_and_layers option.

Solved by calling DAG_on_visible_update() in ED_screen_set() even
in cases scene doesn't change. This ensures all the objects which
weren't visible before are correctly updated.

===================================================================

M	source/blender/editors/screen/screen_edit.c

===================================================================

diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index c10cb33..30337e8 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1545,8 +1545,13 @@ void ED_screen_set(bContext *C, bScreen *sc)
 		 */
 		if (oldscene != sc->scene) {
 			BKE_scene_set_background(bmain, sc->scene);
-			DAG_on_visible_update(bmain, FALSE);
 		}
+
+		/* Always do visible update since it's possible new screen will
+		 * have different layers visible in 3D viewpots. This is possible
+		 * because of view3d.lock_camera_and_layers option.
+		 */
+		DAG_on_visible_update(bmain, FALSE);
 	}
 }




More information about the Bf-blender-cvs mailing list