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-06-25 16:04:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-25 16:04:04 +0400
commit7b36b2ebbb5449cebd6264d707a43bcaf910b81c (patch)
treed1c12525e05fcd1c190cd5304c4db9067c7c4c96 /source/blender/editors/space_image/image_ops.c
parent044a20821b290beef5b39a265a3527bc4ecf31fa (diff)
- 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.
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r--source/blender/editors/space_image/image_ops.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index c4265c6e011..f84fd6fc430 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -780,7 +780,6 @@ static int replace_exec(bContext *C, wmOperator *op)
static int replace_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceImage *sima= CTX_wm_space_image(C);
- char *path= (sima->image)? sima->image->name: U.textudir;
if(!sima->image)
return OPERATOR_CANCELLED;
@@ -788,7 +787,10 @@ static int replace_invoke(bContext *C, wmOperator *op, wmEvent *event)
if(RNA_property_is_set(op->ptr, "filepath"))
return replace_exec(C, op);
- image_filesel(C, op, path);
+ if(!RNA_property_is_set(op->ptr, "relative_path"))
+ RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0);
+
+ image_filesel(C, op, sima->image->name);
return OPERATOR_RUNNING_MODAL;
}
@@ -808,7 +810,7 @@ void IMAGE_OT_replace(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, 0); //XXX TODO, relative_path
+ WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, FILE_RELPATH);
}
/******************** save image as operator ********************/