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-11-16 17:40:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-16 17:40:46 +0300
commit1e245cc58928ad40c9e665f3aede685a9485ea21 (patch)
treef64cfe137212f0bb93aeb6a545c14c49e6c9b338 /source/blender/blenkernel
parent2153c663be809eca6b30fa042c88751692175dc7 (diff)
option to write images to a files on single frame renders, this isn't accessed by the UI at the moment, but could eventually be used for saving test-renders.
The main reason to have this is so renders can be scripted to write to a specific file without having to do annoying tricks like set a dummy start/end frame range, render an animation and work out the current frame image will be written to, then rename after rendering. Also made some 'char *' args into 'const char *'
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_image.h2
-rw-r--r--source/blender/blenkernel/intern/image.c6
-rw-r--r--source/blender/blenkernel/intern/sequencer.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index b0cb3f32d37..ab636899925 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -47,7 +47,7 @@ void free_image(struct Image *me);
void BKE_stamp_info(struct Scene *scene, struct ImBuf *ibuf);
void BKE_stamp_buf(struct Scene *scene, unsigned char *rect, float *rectf, int width, int height, int channels);
int BKE_write_ibuf(struct Scene *scene, struct ImBuf *ibuf, char *name, int imtype, int subimtype, int quality);
-void BKE_makepicstring(char *string, char *base, int frame, int imtype, int use_ext);
+void BKE_makepicstring(char *string, const char *base, int frame, int imtype, const short use_ext, const short use_frames);
int BKE_add_image_extension(char *string, int imtype);
int BKE_ftype_to_imtype(int ftype);
int BKE_imtype_to_ftype(int imtype);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 2719563f829..a2435801ac6 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1310,12 +1310,14 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt
}
-void BKE_makepicstring(char *string, char *base, int frame, int imtype, int use_ext)
+void BKE_makepicstring(char *string, const char *base, int frame, int imtype, const short use_ext, const short use_frames)
{
if (string==NULL) return;
BLI_strncpy(string, base, FILE_MAX - 10); /* weak assumption */
BLI_path_abs(string, G.main->name);
- BLI_path_frame(string, frame, 4);
+
+ if(use_frames)
+ BLI_path_frame(string, frame, 4);
if(use_ext)
BKE_add_image_extension(string, imtype);
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 5bc087fcd85..4272e317cc7 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1828,7 +1828,7 @@ static ImBuf * seq_render_scene_strip_impl(
if(re==NULL)
re= RE_NewRender(sce->id.name);
- RE_BlenderFrame(re, bmain, sce, NULL, sce->lay, frame);
+ RE_BlenderFrame(re, bmain, sce, NULL, sce->lay, frame, FALSE);
/* restore previous state after it was toggled on & off by RE_BlenderFrame */
G.rendering = rendering;