diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-27 19:52:28 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-27 19:52:28 +0300 |
commit | e7010a05beba64af032707b1818af707f398cc8d (patch) | |
tree | 238bec03b65cbc3690301c51257186abc4495e7c /source/blender/makesrna/intern/rna_scene_api.c | |
parent | 1863883a248faa1fcae4b99332c8d5e6d3957845 (diff) | |
parent | 38cb29d67e5947f99824987dcd567a82cfd51646 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_scene_api.c
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 8ea6217f00c..a307aff6e96 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -144,7 +144,8 @@ static void rna_Scene_update_tagged(Scene *scene, Main *bmain) #endif } -static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, int preview, const char *view, char *name) +static void rna_SceneRender_get_frame_path( + RenderData *rd, Main *bmain, int frame, int preview, const char *view, char *name) { const char *suffix = BKE_scene_multiview_view_suffix_get(rd, view); @@ -157,7 +158,7 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, int previe } else { BKE_image_path_from_imformat( - name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, + name, rd->pic, bmain->name, (frame == INT_MIN) ? rd->cfra : frame, &rd->im_format, (rd->scemode & R_EXTENSION) != 0, true, suffix); } } @@ -390,6 +391,7 @@ void RNA_api_scene_render(StructRNA *srna) PropertyRNA *parm; func = RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path"); + RNA_def_function_flag(func, FUNC_USE_MAIN); 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); |