From 7b36b2ebbb5449cebd6264d707a43bcaf910b81c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 25 Jun 2010 12:04:04 +0000 Subject: - duplicating a scene now duplicates its sequence strips too. - bugfix for copying a scene with FFMPEG properties set (wasnt copying the ID properties, could crash blender) - relative path option for adding sequence strips and replaceing images. --- source/blender/editors/space_buttons/buttons_ops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_buttons') diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 36aecd02138..96cf79d880f 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -30,6 +30,7 @@ #include "MEM_guardedalloc.h" +#include "DNA_userdef_types.h" #include "BKE_context.h" @@ -129,6 +130,10 @@ static int file_browse_invoke(bContext *C, wmOperator *op, wmEvent *event) RNA_string_set(op->ptr, "filepath", str); MEM_freeN(str); + if(RNA_struct_find_property(op->ptr, "relative_path")) + if(!RNA_property_is_set(op->ptr, "relative_path")) + RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); + WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -147,6 +152,6 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot) ot->cancel= file_browse_cancel; /* properties */ - WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, 0); + WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, FILE_RELPATH); } -- cgit v1.2.3