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_sequencer
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_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index b9db18f7850..5f0693dc43c 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -101,7 +101,7 @@ static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op,
if(last_seq && last_seq->strip && SEQ_HAS_PATH(last_seq)) {
char path[sizeof(last_seq->strip->dir)];
BLI_strncpy(path, last_seq->strip->dir, sizeof(path));
- BLI_path_abs(path, G.sce);
+ BLI_path_abs(path, G.main->name);
RNA_string_set(op->ptr, identifier, path);
}
}
@@ -152,7 +152,7 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op)
}
if((is_file != -1) && relative)
- BLI_path_rel(seq_load->path, G.sce);
+ BLI_path_rel(seq_load->path, G.main->name);
if (RNA_struct_find_property(op->ptr, "frame_end")) {
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index bd53615feda..35f27953633 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -992,7 +992,7 @@ void touch_seq_files(Scene *scene)
if(seq->flag & SELECT) {
if(seq->type==SEQ_MOVIE) {
if(seq->strip && seq->strip->stripdata) {
- BLI_make_file_string(G.sce, str, seq->strip->dir, seq->strip->stripdata->name);
+ BLI_make_file_string(G.main->name, str, seq->strip->dir, seq->strip->stripdata->name);
BLI_touch(seq->name);
}
}