diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 36657c8a898..9d63dfe0f55 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -119,15 +119,21 @@ static void rna_Scene_update_tagged(Scene *scene) #endif } -static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name) +static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, int preview, const char *view, char *name) { + const char *suffix = BKE_scene_multiview_view_suffix_get(rd, view); + + /* avoid NULL pointer */ + if (!suffix) + suffix = ""; + if (BKE_imtype_is_movie(rd->im_format.imtype)) { - BKE_movie_filepath_get(name, rd); + BKE_movie_filepath_get(name, rd, preview != 0, suffix); } else { BKE_image_path_from_imformat( name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, - &rd->im_format, (rd->scemode & R_EXTENSION) != 0, true); + &rd->im_format, (rd->scemode & R_EXTENSION) != 0, true, suffix); } } @@ -287,6 +293,10 @@ void RNA_api_scene_render(StructRNA *srna) RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame"); RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used", MINAFRAME, MAXFRAME); + parm = RNA_def_boolean(func, "preview", 0, "Preview", "Use preview range"); + parm = RNA_def_string_file_path(func, "view", NULL, FILE_MAX, "View", + "The name of the view to use to replace the \"%\" chars"); + parm = RNA_def_string_file_path(func, "filepath", NULL, FILE_MAX, "File Path", "The resulting filepath from the scenes render settings"); RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ |