Fix T44815: Sound bake doesn't check filepath

This commit is contained in:
Campbell Barton 2015-05-25 22:12:18 +10:00
parent 62f2d9b566
commit 39b85e452f
Notes: blender-bot 2023-02-14 10:21:15 +01:00
Referenced by issue #44815, bpy.ops.graph.sound_bake() doesn't check valid filepath
1 changed files with 5 additions and 0 deletions

View File

@ -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 */