[Bf-blender-cvs] [39b85e4] master: Fix T44815: Sound bake doesn't check filepath

Campbell Barton noreply at git.blender.org
Mon May 25 14:13:42 CEST 2015


Commit: 39b85e452faae543d10831e4fa66fdffbc22e0a1
Author: Campbell Barton
Date:   Mon May 25 22:12:18 2015 +1000
Branches: master
https://developer.blender.org/rB39b85e452faae543d10831e4fa66fdffbc22e0a1

Fix T44815: Sound bake doesn't check filepath

===================================================================

M	source/blender/editors/space_graph/graph_edit.c

===================================================================

diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index a8cb4ce..3de3ece 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1179,6 +1179,11 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op)
 
 	RNA_string_get(op->ptr, "filepath", path);
 
+	if (!BLI_is_file(path)) {
+		BKE_reportf(op->reports, RPT_ERROR, "File not found '%s'", path);
+		return OPERATOR_CANCELLED;
+	}
+
 	scene = ac.scene;    /* current scene */
 
 	/* store necessary data for the baking steps */




More information about the Bf-blender-cvs mailing list