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:
authorCampbell Barton <ideasman42@gmail.com>2010-10-18 10:41:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-18 10:41:16 +0400
commit4d37cf90b9d9d8ed2f0339c8ccd72481e29a4514 (patch)
tree8442faaffb762a79497a45d90f503ccedc4cd0b4 /source/blender/editors/space_info/info_ops.c
parentb3afc3618db09942f83d4a3ac62834e7b925d5d7 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_info/info_ops.c')
-rw-r--r--source/blender/editors/space_info/info_ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index c87b25877b4..aeb32cda6bd 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -191,7 +191,7 @@ static int make_paths_relative_exec(bContext *UNUSED(C), wmOperator *op)
return OPERATOR_CANCELLED;
}
- makeFilesRelative(G.sce, op->reports);
+ makeFilesRelative(G.main->name, op->reports);
return OPERATOR_FINISHED;
}
@@ -218,7 +218,7 @@ static int make_paths_absolute_exec(bContext *UNUSED(C), wmOperator *op)
return OPERATOR_CANCELLED;
}
- makeFilesAbsolute(G.sce, op->reports);
+ makeFilesAbsolute(G.main->name, op->reports);
return OPERATOR_FINISHED;
}
@@ -244,7 +244,7 @@ static int report_missing_files_exec(bContext *UNUSED(C), wmOperator *op)
txtname[0] = '\0';
/* run the missing file check */
- checkMissingFiles(G.sce, op->reports);
+ checkMissingFiles(G.main->name, op->reports);
return OPERATOR_FINISHED;
}
@@ -269,7 +269,7 @@ static int find_missing_files_exec(bContext *UNUSED(C), wmOperator *op)
char *path;
path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
- findMissingFiles(path, G.sce);
+ findMissingFiles(path, G.main->name);
MEM_freeN(path);
return OPERATOR_FINISHED;