forked from bartvdbraak/blender
fix [#28880] relative paths don't work with Change Path/Files
This commit is contained in:
parent
15bf56c696
commit
18b9a2d0bc
@ -2961,9 +2961,11 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot)
|
||||
|
||||
static int sequencer_change_path_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain= CTX_data_main(C);
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
Sequence *seq= seq_active_get(scene);
|
||||
const int is_relative_path= RNA_boolean_get(op->ptr, "relative_path");
|
||||
|
||||
if(seq->type == SEQ_IMAGE) {
|
||||
char directory[FILE_MAX];
|
||||
@ -2974,6 +2976,12 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
RNA_string_get(op->ptr, "directory", directory);
|
||||
if (is_relative_path) {
|
||||
/* TODO, shouldnt this already be relative from the filesel?
|
||||
* (as the 'filepath' is) for now just make relative here,
|
||||
* but look into changing after 2.60 - campbell */
|
||||
BLI_path_rel(directory, bmain->name);
|
||||
}
|
||||
BLI_strncpy(seq->strip->dir, directory, sizeof(seq->strip->dir));
|
||||
|
||||
if(seq->strip->stripdata) {
|
||||
|
Loading…
Reference in New Issue
Block a user