2.5
[blender.git] / source / blender / editors / space_view3d / space_view3d.c
index e20490c0c075dabc2507d1d0d308ccd88cee5b93..96116af1c06b6d6b59c8542c37f4e4fa8b99cb12 100644 (file)
@@ -60,8 +60,9 @@
 
 /* ******************** default callbacks for view3d space ***************** */
 
-static SpaceLink *view3d_new(void)
+static SpaceLink *view3d_new(const bContext *C)
 {
+       Scene *scene= CTX_data_scene(C);
        ARegion *ar;
        View3D *vd;
        
@@ -69,9 +70,9 @@ static SpaceLink *view3d_new(void)
        vd->spacetype= SPACE_VIEW3D;
        vd->blockscale= 0.7f;
        vd->lay= vd->layact= 1;
-       if(G.scene) {
-               vd->lay= vd->layact= G.scene->lay;
-               vd->camera= G.scene->camera;
+       if(scene) {
+               vd->lay= vd->layact= scene->lay;
+               vd->camera= scene->camera;
        }
        vd->scenelock= 1;
        vd->grid= 1.0f;