From 4d37cf90b9d9d8ed2f0339c8ccd72481e29a4514 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Oct 2010 06:41:16 +0000 Subject: remove G.sce, use G.main->name instead. Both stored the filename of the blend file, but G.sce stored the last opened file. This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore). Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend. --- source/blender/blenkernel/intern/scene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/scene.c') diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index fde180cadc6..e399e0bb83d 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -566,11 +566,11 @@ Scene *set_scene_name(Main *bmain, char *name) Scene *sce= (Scene *)find_id("SC", name); if(sce) { set_scene_bg(bmain, sce); - printf("Scene switch: '%s' in file: '%s'\n", name, G.sce); + printf("Scene switch: '%s' in file: '%s'\n", name, G.main->name); return sce; } - printf("Can't find scene: '%s' in file: '%s'\n", name, G.sce); + printf("Can't find scene: '%s' in file: '%s'\n", name, G.main->name); return NULL; } -- cgit v1.2.3