diff options
26 files changed, 1230 insertions, 256 deletions
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py index f583f9679bc..7ca70029e49 100644 --- a/release/ui/buttons_data_camera.py +++ b/release/ui/buttons_data_camera.py @@ -38,7 +38,6 @@ class DATA_PT_camera(DataButtonsPanel): cam = context.camera - layout.itemS() layout.itemR(cam, "type", expand=True) row = layout.row(align=True) @@ -51,6 +50,10 @@ class DATA_PT_camera(DataButtonsPanel): elif cam.type == 'ORTHO': row.itemR(cam, "ortho_scale") + + split = layout.split() + split.itemR(cam, "panorama"); + split.itemL() split = layout.split() @@ -64,9 +67,13 @@ class DATA_PT_camera(DataButtonsPanel): sub.itemR(cam, "clip_start", text="Start") sub.itemR(cam, "clip_end", text="End") - row = layout.row() - row.itemR(cam, "dof_object") - row.itemR(cam, "dof_distance") + split = layout.split() + col = split.column() + col.itemL(text="Depth of Field:") + col.itemR(cam, "dof_object", text="") + col = split.column() + col.itemL() + col.itemR(cam, "dof_distance", text="Distance") class DATA_PT_camera_display(DataButtonsPanel): __idname__ = "DATA_PT_camera_display" diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index a774b887df5..50cb8f7dbfd 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -6,6 +6,103 @@ class RenderButtonsPanel(bpy.types.Panel): __region_type__ = "WINDOW" __context__ = "scene" +class RENDER_PT_render(RenderButtonsPanel): + __label__ = "Render" + + def draw(self, context): + layout = self.layout + rd = context.scene.render_data + + row = layout.row() + row.itemO("SCREEN_OT_render", text="Image", icon='ICON_IMAGE_COL') + row.item_booleanO("SCREEN_OT_render", "anim", True, text="Animation", icon='ICON_SEQUENCE') + + layout.itemR(rd, "display_mode", text="Display") + +class RENDER_PT_layers(RenderButtonsPanel): + __label__ = "Layers" + __default_closed__ = True + + def draw(self, context): + layout = self.layout + scene = context.scene + rd = scene.render_data + + split = layout.split() + split.itemL(text="Scene:") + split.column().itemR(scene, "visible_layers", text="") + + row = layout.row() + row.template_list(rd, "layers", rd, "active_layer_index", rows=2) + + col = row.column(align=True) + col.itemO("SCENE_OT_render_layer_add", icon="ICON_ZOOMIN", text="") + col.itemO("SCENE_OT_render_layer_remove", icon="ICON_ZOOMOUT", text="") + + rl = rd.layers[rd.active_layer_index] + + split = layout.split() + split.itemL(text="Layers:") + split.column().itemR(rl, "visible_layers", text="") + + layout.itemR(rl, "light_override", text="Light") + layout.itemR(rl, "material_override", text="Material") + + split = layout.split() + + col = split.column() + col.itemR(rl, "zmask") + row = col.row() + row.itemR(rl, "zmask_negate", text="Negate") + row.active = rl.zmask + col.itemR(rl, "all_z") + + col = split.column() + col.itemR(rl, "solid") + col.itemR(rl, "halo") + col.itemR(rl, "ztransp") + + col = split.column() + col.itemR(rl, "sky") + col.itemR(rl, "edge") + col.itemR(rl, "strand") + + if rl.zmask: + split = layout.split() + split.itemL(text="Zmask Layers:") + split.column().itemR(rl, "zmask_layers", text="") + + split = layout.split() + col = split.column() + col.itemL(text="Passes:") + col.itemR(rl, "pass_combined") + col.itemR(rl, "pass_z") + col.itemR(rl, "pass_vector") + col.itemR(rl, "pass_normal") + col.itemR(rl, "pass_uv") + col.itemR(rl, "pass_mist") + col.itemR(rl, "pass_object_index") + + col = split.column() + col.itemL() + col.itemR(rl, "pass_color") + col.itemR(rl, "pass_diffuse") + row = col.row() + row.itemR(rl, "pass_specular") + row.itemR(rl, "pass_specular_exclude", text="", icon="ICON_DOT") + row = col.row() + row.itemR(rl, "pass_shadow") + row.itemR(rl, "pass_shadow_exclude", text="", icon="ICON_DOT") + row = col.row() + row.itemR(rl, "pass_ao") + row.itemR(rl, "pass_ao_exclude", text="", icon="ICON_DOT") + row = col.row() + row.itemR(rl, "pass_reflection") + row.itemR(rl, "pass_reflection_exclude", text="", icon="ICON_DOT") + row = col.row() + row.itemR(rl, "pass_refraction") + row.itemR(rl, "pass_refraction_exclude", text="", icon="ICON_DOT") + class RENDER_PT_shading(RenderButtonsPanel): __label__ = "Shading" @@ -15,18 +112,82 @@ class RENDER_PT_shading(RenderButtonsPanel): split = layout.split() - sub = split.column() - sub.itemR(rd, "render_shadows", text="Shadows") - sub.itemR(rd, "render_sss", text="Subsurface Scattering") - sub.itemR(rd, "render_envmaps", text="Environment Map") - # sub.itemR(rd, "render_radiosity", text="Radio") + col = split.column() + col.itemR(rd, "render_shadows", text="Shadows") + col.itemR(rd, "render_sss", text="Subsurface Scattering") + col.itemR(rd, "render_envmaps", text="Environment Map") col = split.column() col.itemR(rd, "render_raytracing", text="Ray Tracing") + row = col.row() + row.active = rd.render_raytracing + row.itemR(rd, "octree_resolution", text="Octree") + col.itemR(rd, "alpha_mode", text="Alpha") + +class RENDER_PT_performance(RenderButtonsPanel): + __label__ = "Performance" + __default_closed__ = True + + def draw(self, context): + layout = self.layout + rd = context.scene.render_data + + split = layout.split() + + col = split.column(align=True) + col.itemL(text="Threads:") + col.row().itemR(rd, "threads_mode", expand=True) colsub = col.column() - colsub.active = rd.render_raytracing - colsub.itemR(rd, "octree_resolution", text="Octree") - col.itemR(rd, "dither_intensity", text="Dither", slider=True) + colsub.enabled = rd.threads_mode == 'THREADS_FIXED' + colsub.itemR(rd, "threads") + + col = split.column() + + sub = col.column(align=True) + sub.itemL(text="Tiles:") + sub.itemR(rd, "parts_x", text="X") + sub.itemR(rd, "parts_y", text="Y") + + split = layout.split() + + col = split.column() + col.itemL(text="Memory:") + row = col.row() + row.itemR(rd, "save_buffers") + row.enabled = not rd.full_sample + + col = split.column() + col.itemL() + col.itemR(rd, "free_image_textures") + col.active = rd.use_compositing + +class RENDER_PT_post_processing(RenderButtonsPanel): + __label__ = "Post Processing" + __default_closed__ = True + + def draw(self, context): + layout = self.layout + rd = context.scene.render_data + + split = layout.split() + + col = split.column() + col.itemR(rd, "use_compositing") + col.itemR(rd, "use_sequencer") + + col = split.column() + row = col.row() + row.itemR(rd, "fields", text="Fields") + rowsub = row.row() + rowsub.active = rd.fields + rowsub.itemR(rd, "fields_still", text="Still") + rowsub = col.row() + rowsub.active = rd.fields + rowsub.itemR(rd, "field_order", expand=True) + + split = layout.split() + split.itemL() + split.itemR(rd, "dither_intensity", text="Dither", slider=True) class RENDER_PT_output(RenderButtonsPanel): __label__ = "Output" @@ -35,96 +196,115 @@ class RENDER_PT_output(RenderButtonsPanel): layout = self.layout rd = context.scene.render_data - layout.itemR(rd, "display_mode", text="Display") - - layout.itemR(rd, "output_path") - + layout.itemR(rd, "output_path", text="") + split = layout.split() - - col = split.column() - col.itemR(rd, "file_extensions") - col.itemR(rd, "fields", text="Fields") - colsub = col.column() - colsub.active = rd.fields - colsub.itemR(rd, "fields_still", text="Still") - colsub.row().itemR(rd, "field_order", expand=True) - col = split.column() - col.itemR(rd, "color_mode") - col.itemR(rd, "alpha_mode") - col.itemL(text="Distributed Rendering:") col.itemR(rd, "placeholders") col.itemR(rd, "no_overwrite") - - layout.itemR(rd, "file_format", text="Format") - - split = layout.split() - + col = split.column() - + col.itemR(rd, "file_format", text="") + col.itemR(rd, "file_extensions") + if rd.file_format in ('AVIJPEG', 'JPEG'): - col.itemR(rd, "quality", slider=True) + split = layout.split() + split.itemR(rd, "color_mode", text="Color") + split.itemR(rd, "quality", slider=True) elif rd.file_format == 'OPENEXR': + split = layout.split() + col = split.column() + col.itemR(rd, "color_mode", text="Color") col.itemR(rd, "exr_codec") + + subsplit = split.split() + col = subsplit.column() col.itemR(rd, "exr_half") - col = split.column() col.itemR(rd, "exr_zbuf") + col = subsplit.column() col.itemR(rd, "exr_preview") elif rd.file_format == 'JPEG2000': - row = layout.row() - row.itemR(rd, "jpeg_preset") split = layout.split() col = split.column() + col.itemR(rd, "color_mode", text="Color") col.itemL(text="Depth:") col.row().itemR(rd, "jpeg_depth", expand=True) + col = split.column() + col.itemR(rd, "jpeg_preset", text="") col.itemR(rd, "jpeg_ycc") col.itemR(rd, "exr_preview") elif rd.file_format in ('CINEON', 'DPX'): + split = layout.split() + col = split.column() + col.itemR(rd, "color_mode", text="Color") col.itemR(rd, "cineon_log", text="Convert to Log") - colsub = col.column() - colsub.active = rd.cineon_log - colsub.itemR(rd, "cineon_black", text="Black") - colsub.itemR(rd, "cineon_white", text="White") - colsub.itemR(rd, "cineon_gamma", text="Gamma") + + col = split.column(align=True) + col.active = rd.cineon_log + col.itemR(rd, "cineon_black", text="Black") + col.itemR(rd, "cineon_white", text="White") + col.itemR(rd, "cineon_gamma", text="Gamma") elif rd.file_format == 'TIFF': - col.itemR(rd, "tiff_bit") - - elif rd.file_format == 'FFMPEG': - #row = layout.row() - #row.itemR(rd, "ffmpeg_format") - #row.itemR(rd, "ffmpeg_codec") split = layout.split() + split.itemR(rd, "color_mode", text="Color") + split.itemR(rd, "tiff_bit") - col = split.column() - col.itemR(rd, "ffmpeg_video_bitrate") - col.itemL(text="Rate:") - col.itemR(rd, "ffmpeg_minrate", text="Minimum") - col.itemR(rd, "ffmpeg_maxrate", text="Maximum") - col.itemR(rd, "ffmpeg_buffersize", text="Buffer") - - col = split.column() - col.itemR(rd, "ffmpeg_gopsize") - col.itemR(rd, "ffmpeg_autosplit") - col.itemL(text="Mux:") - col.itemR(rd, "ffmpeg_muxrate", text="Rate") - col.itemR(rd, "ffmpeg_packetsize", text="Packet Size") - - row = layout.row() - row.itemL(text="Audio:") - row = layout.row() - #row.itemR(rd, "ffmpeg_audio_codec") - + else: split = layout.split() + split.itemR(rd, "color_mode", text="Color") + split.itemL() + +class RENDER_PT_encoding(RenderButtonsPanel): + __label__ = "Encoding" + __default_closed__ = True - col = split.column() - col.itemR(rd, "ffmpeg_audio_bitrate") - col = split.column() - col.itemR(rd, "ffmpeg_multiplex_audio") + def poll(self, context): + rd = context.scene.render_data + return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA') + + def draw(self, context): + layout = self.layout + rd = context.scene.render_data + + split = layout.split() + split.itemR(rd, "ffmpeg_format") + if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'): + split.itemR(rd, "ffmpeg_codec") + else: + split.itemL() + + split = layout.split() + + col = split.column() + col.itemR(rd, "ffmpeg_video_bitrate") + col.itemL(text="Rate:") + col.itemR(rd, "ffmpeg_minrate", text="Minimum") + col.itemR(rd, "ffmpeg_maxrate", text="Maximum") + col.itemR(rd, "ffmpeg_buffersize", text="Buffer") + + col = split.column() + col.itemR(rd, "ffmpeg_gopsize") + col.itemR(rd, "ffmpeg_autosplit") + col.itemL(text="Mux:") + col.itemR(rd, "ffmpeg_muxrate", text="Rate") + col.itemR(rd, "ffmpeg_packetsize", text="Packet Size") + + row = layout.row() + row.itemL(text="Audio:") + row = layout.row() + row.itemR(rd, "ffmpeg_audio_codec") + + split = layout.split() + + col = split.column() + col.itemR(rd, "ffmpeg_audio_bitrate") + col = split.column() + col.itemR(rd, "ffmpeg_multiplex_audio") class RENDER_PT_antialiasing(RenderButtonsPanel): __label__ = "Anti-Aliasing" @@ -143,57 +323,14 @@ class RENDER_PT_antialiasing(RenderButtonsPanel): split = layout.split() - sub = split.column() - sub.itemL(text="Samples:") - sub.row().itemR(rd, "antialiasing_samples", expand=True) - sub.itemR(rd, "pixel_filter") + col = split.column() + col.row().itemR(rd, "antialiasing_samples", expand=True) + col.itemR(rd, "full_sample") col = split.column() + col.itemR(rd, "pixel_filter", text="Filter") col.itemR(rd, "filter_size", text="Size", slider=True) - col.itemR(rd, "save_buffers") - colsub = col.column() - colsub.active = rd.save_buffers - colsub.itemR(rd, "full_sample") - -class RENDER_PT_render(RenderButtonsPanel): - __label__ = "Render" - - def draw(self, context): - layout = self.layout - rd = context.scene.render_data - - row = layout.row() - row.itemO("SCREEN_OT_render", text="Render Still", icon='ICON_IMAGE_COL') - row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon='ICON_SEQUENCE') - - row = layout.row() - row.itemR(rd, "do_composite") - row.itemR(rd, "do_sequence") - rowsub = layout.row() - rowsub.active = rd.do_composite - rowsub.itemR(rd, "free_image_textures") - - split = layout.split() - - col = split.column(align=True) - col.itemL(text="Threads:") - col.row().itemR(rd, "threads_mode", expand=True) - colsub = col.column() - colsub.active = rd.threads_mode == 'THREADS_FIXED' - colsub.itemR(rd, "threads") - - sub = split.column(align=True) - sub.itemL(text="Tiles:") - sub.itemR(rd, "parts_x", text="X") - sub.itemR(rd, "parts_y", text="Y") - - split = layout.split() - sub = split.column() - sub = split.column() - sub.itemR(rd, "panorama") - - # row.itemR(rd, "backbuf") - + class RENDER_PT_dimensions(RenderButtonsPanel): __label__ = "Dimensions" @@ -215,13 +352,13 @@ class RENDER_PT_dimensions(RenderButtonsPanel): sub.itemL(text="Aspect Ratio:") sub.itemR(rd, "pixel_aspect_x", text="X") sub.itemR(rd, "pixel_aspect_y", text="Y") - - col = col.column(align=False) - col.itemR(rd, "border", text="Border") - colsub = col.column() - colsub.active = rd.border - colsub.itemR(rd, "crop_to_border") + row = col.row() + row.itemR(rd, "border", text="Border") + rowsub = row.row() + rowsub.active = rd.border + rowsub.itemR(rd, "crop_to_border", text="Crop") + col = split.column(align=True) col.itemL(text="Frame Range:") col.itemR(scene, "start_frame", text="Start") @@ -239,13 +376,13 @@ class RENDER_PT_stamp(RenderButtonsPanel): rd = context.scene.render_data layout = self.layout - layout.itemR(rd, "stamp", text="") + layout.itemR(rd, "render_stamp", text="") def draw(self, context): layout = self.layout rd = context.scene.render_data - layout.active = rd.stamp + layout.active = rd.render_stamp split = layout.split() @@ -253,26 +390,32 @@ class RENDER_PT_stamp(RenderButtonsPanel): col.itemR(rd, "stamp_time", text="Time") col.itemR(rd, "stamp_date", text="Date") col.itemR(rd, "stamp_frame", text="Frame") - col.itemR(rd, "stamp_camera", text="Scene") - col.itemR(rd, "stamp_marker", text="Marker") + col.itemR(rd, "stamp_scene", text="Scene") + col.itemR(rd, "stamp_camera", text="Camera") col.itemR(rd, "stamp_filename", text="Filename") + col.itemR(rd, "stamp_marker", text="Marker") col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip") - col.itemR(rd, "stamp_note", text="Note") - colsub = col.column() - colsub.active = rd.stamp_note - colsub.itemR(rd, "stamp_note_text", text="") - + sub = split.column() - sub.itemR(rd, "render_stamp") - colsub = sub.column() - colsub.active = rd.render_stamp - colsub.itemR(rd, "stamp_foreground", slider=True) - colsub.itemR(rd, "stamp_background", slider=True) - colsub.itemR(rd, "stamp_font_size", text="Font Size") + sub.active = rd.render_stamp + sub.itemR(rd, "stamp_foreground", slider=True) + sub.itemR(rd, "stamp_background", slider=True) + sub.itemR(rd, "stamp_font_size", text="Font Size") + + row = layout.split(percentage=0.2) + row.itemR(rd, "stamp_note", text="Note") + rowsub = row.row() + rowsub.active = rd.stamp_note + rowsub.itemR(rd, "stamp_note_text", text="") bpy.types.register(RENDER_PT_render) bpy.types.register(RENDER_PT_dimensions) bpy.types.register(RENDER_PT_antialiasing) +bpy.types.register(RENDER_PT_layers) bpy.types.register(RENDER_PT_shading) +bpy.types.register(RENDER_PT_post_processing) +bpy.types.register(RENDER_PT_performance) bpy.types.register(RENDER_PT_output) +bpy.types.register(RENDER_PT_encoding) bpy.types.register(RENDER_PT_stamp) + diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h index dba3944a58d..be136bd9d6d 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.h +++ b/source/blender/blenkernel/BKE_writeffmpeg.h @@ -46,19 +46,29 @@ extern "C" { #define FFMPEG_MKV 9 #define FFMPEG_OGG 10 -#define FFMPEG_PRESET_NONE 0 -#define FFMPEG_PRESET_DVD 1 -#define FFMPEG_PRESET_SVCD 2 -#define FFMPEG_PRESET_VCD 3 -#define FFMPEG_PRESET_DV 4 -#define FFMPEG_PRESET_H264 5 +#define FFMPEG_PRESET_NONE 0 +#define FFMPEG_PRESET_DVD 1 +#define FFMPEG_PRESET_SVCD 2 +#define FFMPEG_PRESET_VCD 3 +#define FFMPEG_PRESET_DV 4 +#define FFMPEG_PRESET_H264 5 +#define FFMPEG_PRESET_THEORA 6 +#define FFMPEG_PRESET_XVID 7 +struct IDProperty; struct RenderData; extern void start_ffmpeg(struct RenderData *rd, int rectx, int recty); extern void end_ffmpeg(void); extern void append_ffmpeg(struct RenderData *rd, int frame, int *pixels, int rectx, int recty); +extern void ffmpeg_set_preset(struct RenderData *rd, int preset); +extern void ffmpeg_verify_image_type(struct RenderData *rd); + +extern struct IDProperty *ffmpeg_property_add(struct RenderData *Rd, char *type, int opt_index, int parent_index); +extern int ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str); +extern void ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_); + #ifdef __cplusplus } #endif diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 754ec06f23f..93924d1ea0d 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -860,6 +860,9 @@ int BKE_imtype_is_movie(int imtype) case R_AVICODEC: case R_QUICKTIME: case R_FFMPEG: + case R_H264: + case R_THEORA: + case R_XVID: case R_FRAMESERVER: return 1; } @@ -870,7 +873,7 @@ void BKE_add_image_extension(Scene *scene, char *string, int imtype) { char *extension=""; - if(scene->r.imtype== R_IRIS) { + if(imtype== R_IRIS) { if(!BLI_testextensie(string, ".rgb")) extension= ".rgb"; } @@ -882,7 +885,7 @@ void BKE_add_image_extension(Scene *scene, char *string, int imtype) if(!BLI_testextensie(string, ".hdr")) extension= ".hdr"; } - else if(imtype==R_PNG || imtype==R_FFMPEG) { + else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) { if(!BLI_testextensie(string, ".png")) extension= ".png"; } @@ -1230,7 +1233,7 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt else if ((imtype==R_RADHDR)) { ibuf->ftype= RADHDR; } - else if (imtype==R_PNG || imtype==R_FFMPEG) { + else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) { ibuf->ftype= PNG; } #ifdef WITH_DDS @@ -1305,7 +1308,7 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt BLI_make_existing_file(name); - if(scene->r.scemode & R_STAMP_INFO) + if(scene->r.stamp & R_STAMP_ALL) BKE_stamp_info(scene, ibuf); ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat); diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 23da5c66850..598336886c2 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -204,17 +204,17 @@ Scene *add_scene(char *name) sce= alloc_libblock(&G.main->scene, ID_SCE, name); sce->lay= 1; - sce->r.mode= R_GAMMA; + sce->r.mode= R_GAMMA|R_OSA|R_SHADOW|R_SSS|R_ENVMAP|R_RAYTRACE; sce->r.cfra= 1; sce->r.sfra= 1; sce->r.efra= 250; - sce->r.xsch= 320; - sce->r.ysch= 256; + sce->r.xsch= 1920; + sce->r.ysch= 1080; sce->r.xasp= 1; sce->r.yasp= 1; - sce->r.xparts= 4; - sce->r.yparts= 4; - sce->r.size= 100; + sce->r.xparts= 8; + sce->r.yparts= 8; + sce->r.size= 25; sce->r.planes= 24; sce->r.quality= 90; sce->r.framapto= 100; @@ -225,7 +225,7 @@ Scene *add_scene(char *name) sce->r.ocres = 128; sce->r.bake_mode= 1; /* prevent to include render stuff here */ - sce->r.bake_filter= 2; + sce->r.bake_filter= 8; sce->r.bake_osa= 5; sce->r.bake_flag= R_BAKE_CLEAR; sce->r.bake_normal_space= R_BAKE_SPACE_TANGENT; @@ -234,6 +234,9 @@ Scene *add_scene(char *name) sce->r.yplay= 480; sce->r.freqplay= 60; sce->r.depth= 32; + + sce->r.scemode= R_DOCOMP|R_DOSEQ|R_EXTENSION; + sce->r.stamp= R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_SCENE|R_STAMP_CAMERA; sce->r.threads= 1; diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c index c8d95929027..3eeecd94a85 100644 --- a/source/blender/blenkernel/intern/sequence.c +++ b/source/blender/blenkernel/intern/sequence.c @@ -2017,7 +2017,8 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int RenderResult rres; int doseq, rendering= G.rendering; char scenename[64]; - int sce_valid =sce&& (sce->camera || sce->r.scemode & R_DOSEQ); + int have_seq= (sce->r.scemode & R_DOSEQ) && sce->ed && sce->ed->seqbase.first; + int sce_valid =sce && (sce->camera || have_seq); if (se->ibuf == NULL && sce_valid && !build_proxy_run) { se->ibuf = seq_proxy_fetch(scene, seq, cfra, render_size); @@ -2038,7 +2039,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int } else if (se->ibuf==NULL && sce_valid) { /* no need to display a waitcursor on sequencer scene strips */ - if (!(sce->r.scemode & R_DOSEQ)) + if (!have_seq) waitcursor(1); /* Hack! This function can be called from do_render_seq(), in that case @@ -2093,7 +2094,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int // XXX #if 0 if((G.f & G_PLAYANIM)==0 /* bad, is set on do_render_seq */ - && !(sce->r.scemode & R_DOSEQ) + && !have_seq && !build_proxy_run) #endif diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index f84bd690347..cfbe3f629d6 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -40,6 +40,7 @@ #include "BLI_blenlib.h" #include "BKE_global.h" +#include "BKE_utildefines.h" #include "BKE_writeavi.h" #include "AVI_avi.h" @@ -87,7 +88,7 @@ bMovieHandle *BKE_get_movie_handle(int imtype) } #endif #ifdef WITH_FFMPEG - if (imtype == R_FFMPEG) { + if (ELEM4(imtype, R_FFMPEG, R_H264, R_XVID, R_THEORA)) { mh.start_movie = start_ffmpeg; mh.append_movie = append_ffmpeg; mh.end_movie = end_ffmpeg; diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 25dc6fa2fd7..5e3c8024524 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -937,5 +937,322 @@ void end_ffmpeg(void) img_convert_ctx = 0; } } + +/* properties */ + +void ffmpeg_property_del(RenderData *rd, void *type, void *prop_) +{ + struct IDProperty *prop = (struct IDProperty *) prop_; + IDProperty * group; + + if (!rd->ffcodecdata.properties) { + return; + } + + group = IDP_GetPropertyFromGroup( + rd->ffcodecdata.properties, (char*) type); + if (group && prop) { + IDP_RemFromGroup(group, prop); + IDP_FreeProperty(prop); + MEM_freeN(prop); + } +} + +IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int parent_index) +{ + AVCodecContext c; + const AVOption * o; + const AVOption * parent; + IDProperty * group; + IDProperty * prop; + IDPropertyTemplate val; + int idp_type; + char name[256]; + + avcodec_get_context_defaults(&c); + + o = c.av_class->option + opt_index; + parent = c.av_class->option + parent_index; + + if (!rd->ffcodecdata.properties) { + IDPropertyTemplate val; + + rd->ffcodecdata.properties + = IDP_New(IDP_GROUP, val, "ffmpeg"); + } + + group = IDP_GetPropertyFromGroup( + rd->ffcodecdata.properties, (char*) type); + + if (!group) { + IDPropertyTemplate val; + + group = IDP_New(IDP_GROUP, val, (char*) type); + IDP_AddToGroup(rd->ffcodecdata.properties, group); + } + + if (parent_index) { + sprintf(name, "%s:%s", parent->name, o->name); + } else { + strcpy(name, o->name); + } + + fprintf(stderr, "ffmpeg_property_add: %s %d %d %s\n", + type, parent_index, opt_index, name); + + prop = IDP_GetPropertyFromGroup(group, name); + if (prop) { + return prop; + } + + switch (o->type) { + case FF_OPT_TYPE_INT: + case FF_OPT_TYPE_INT64: + val.i = o->default_val; + idp_type = IDP_INT; + break; + case FF_OPT_TYPE_DOUBLE: + case FF_OPT_TYPE_FLOAT: + val.f = o->default_val; + idp_type = IDP_FLOAT; + break; + case FF_OPT_TYPE_STRING: + val.str = " "; + idp_type = IDP_STRING; + break; + case FF_OPT_TYPE_CONST: + val.i = 1; + idp_type = IDP_INT; + break; + default: + return NULL; + } + prop = IDP_New(idp_type, val, name); + IDP_AddToGroup(group, prop); + return prop; +} + +/* not all versions of ffmpeg include that, so here we go ... */ + +static const AVOption *my_av_find_opt(void *v, const char *name, + const char *unit, int mask, int flags){ + AVClass *c= *(AVClass**)v; + const AVOption *o= c->option; + + for(;o && o->name; o++){ + if(!strcmp(o->name, name) && + (!unit || (o->unit && !strcmp(o->unit, unit))) && + (o->flags & mask) == flags ) + return o; + } + return NULL; +} + +int ffmpeg_property_add_string(RenderData *rd, const char * type, const char * str) +{ + AVCodecContext c; + const AVOption * o = 0; + const AVOption * p = 0; + char name_[128]; + char * name; + char * param; + IDProperty * prop; + + avcodec_get_context_defaults(&c); + + strncpy(name_, str, 128); + + name = name_; + while (*name == ' ') name++; + + param = strchr(name, ':'); + + if (!param) { + param = strchr(name, ' '); + } + if (param) { + *param++ = 0; + while (*param == ' ') param++; + } + + o = my_av_find_opt(&c, name, NULL, 0, 0); + if (!o) { + return 0; + } + if (param && o->type == FF_OPT_TYPE_CONST) { + return 0; + } + if (param && o->type != FF_OPT_TYPE_CONST && o->unit) { + p = my_av_find_opt(&c, param, o->unit, 0, 0); + prop = ffmpeg_property_add(rd, + (char*) type, p - c.av_class->option, + o - c.av_class->option); + } else { + prop = ffmpeg_property_add(rd, + (char*) type, o - c.av_class->option, 0); + } + + + if (!prop) { + return 0; + } + + if (param && !p) { + switch (prop->type) { + case IDP_INT: + IDP_Int(prop) = atoi(param); + break; + case IDP_FLOAT: + IDP_Float(prop) = atof(param); + break; + case IDP_STRING: + strncpy(IDP_String(prop), param, prop->len); + break; + } + } + return 1; +} + +void ffmpeg_set_preset(RenderData *rd, int preset) +{ + int isntsc = (rd->frs_sec != 25); + + switch (preset) { + case FFMPEG_PRESET_VCD: + rd->ffcodecdata.type = FFMPEG_MPEG1; + rd->ffcodecdata.video_bitrate = 1150; + rd->xsch = 352; + rd->ysch = isntsc ? 240 : 288; + rd->ffcodecdata.gop_size = isntsc ? 18 : 15; + rd->ffcodecdata.rc_max_rate = 1150; + rd->ffcodecdata.rc_min_rate = 1150; + rd->ffcodecdata.rc_buffer_size = 40*8; + rd->ffcodecdata.mux_packet_size = 2324; + rd->ffcodecdata.mux_rate = 2352 * 75 * 8; + break; + + case FFMPEG_PRESET_SVCD: + rd->ffcodecdata.type = FFMPEG_MPEG2; + rd->ffcodecdata.video_bitrate = 2040; + rd->xsch = 480; + rd->ysch = isntsc ? 480 : 576; + rd->ffcodecdata.gop_size = isntsc ? 18 : 15; + rd->ffcodecdata.rc_max_rate = 2516; + rd->ffcodecdata.rc_min_rate = 0; + rd->ffcodecdata.rc_buffer_size = 224*8; + rd->ffcodecdata.mux_packet_size = 2324; + rd->ffcodecdata.mux_rate = 0; + break; + + case FFMPEG_PRESET_DVD: + rd->ffcodecdata.type = FFMPEG_MPEG2; + rd->ffcodecdata.video_bitrate = 6000; + rd->xsch = 720; + rd->ysch = isntsc ? 480 : 576; + rd->ffcodecdata.gop_size = isntsc ? 18 : 15; + rd->ffcodecdata.rc_max_rate = 9000; + rd->ffcodecdata.rc_min_rate = 0; + rd->ffcodecdata.rc_buffer_size = 224*8; + rd->ffcodecdata.mux_packet_size = 2048; + rd->ffcodecdata.mux_rate = 10080000; + break; + + case FFMPEG_PRESET_DV: + rd->ffcodecdata.type = FFMPEG_DV; + rd->xsch = 720; + rd->ysch = isntsc ? 480 : 576; + break; + + case FFMPEG_PRESET_H264: + rd->ffcodecdata.type = FFMPEG_AVI; + rd->ffcodecdata.codec = CODEC_ID_H264; + rd->ffcodecdata.video_bitrate = 6000; + rd->ffcodecdata.gop_size = isntsc ? 18 : 15; + rd->ffcodecdata.rc_max_rate = 9000; + rd->ffcodecdata.rc_min_rate = 0; + rd->ffcodecdata.rc_buffer_size = 224*8; + rd->ffcodecdata.mux_packet_size = 2048; + rd->ffcodecdata.mux_rate = 10080000; + + ffmpeg_property_add_string(rd, "video", "coder:vlc"); + ffmpeg_property_add_string(rd, "video", "flags:loop"); + ffmpeg_property_add_string(rd, "video", "cmp:chroma"); + ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); + ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); + ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); + ffmpeg_property_add_string(rd, "video", "me:hex"); + ffmpeg_property_add_string(rd, "video", "subq:5"); + ffmpeg_property_add_string(rd, "video", "me_range:16"); + ffmpeg_property_add_string(rd, "video", "keyint_min:25"); + ffmpeg_property_add_string(rd, "video", "sc_threshold:40"); + ffmpeg_property_add_string(rd, "video", "i_qfactor:0.71"); + ffmpeg_property_add_string(rd, "video", "b_strategy:1"); + + break; + + case FFMPEG_PRESET_THEORA: + case FFMPEG_PRESET_XVID: + if(preset == FFMPEG_PRESET_XVID) { + rd->ffcodecdata.type = FFMPEG_AVI; + rd->ffcodecdata.codec = CODEC_ID_XVID; + } + else if(preset == FFMPEG_PRESET_THEORA) { + rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken + rd->ffcodecdata.codec = CODEC_ID_THEORA; + } + + rd->ffcodecdata.video_bitrate = 6000; + rd->ffcodecdata.gop_size = isntsc ? 18 : 15; + rd->ffcodecdata.rc_max_rate = 9000; + rd->ffcodecdata.rc_min_rate = 0; + rd->ffcodecdata.rc_buffer_size = 224*8; + rd->ffcodecdata.mux_packet_size = 2048; + rd->ffcodecdata.mux_rate = 10080000; + break; + + } +} + +void ffmpeg_verify_image_type(RenderData *rd) +{ + int audio= 0; + + if(rd->imtype == R_FFMPEG) { + if(rd->ffcodecdata.type <= 0 || + rd->ffcodecdata.codec <= 0 || + rd->ffcodecdata.audio_codec <= 0 || + rd->ffcodecdata.video_bitrate <= 1) { + + rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO; + ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD); + } + + audio= 1; + } + else if(rd->imtype == R_H264) { + if(rd->ffcodecdata.codec != CODEC_ID_H264) { + ffmpeg_set_preset(rd, FFMPEG_PRESET_H264); + audio= 1; + } + } + else if(rd->imtype == R_XVID) { + if(rd->ffcodecdata.codec != CODEC_ID_XVID) { + ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID); + audio= 1; + } + } + else if(rd->imtype == R_THEORA) { + if(rd->ffcodecdata.codec != CODEC_ID_THEORA) { + ffmpeg_set_preset(rd, FFMPEG_PRESET_THEORA); + audio= 1; + } + } + + if(audio && rd->ffcodecdata.audio_codec <= 0) { + rd->ffcodecdata.audio_codec = CODEC_ID_MP2; + rd->ffcodecdata.audio_bitrate = 128; + } +} + #endif diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 21e173bd87d..06092cc97d4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9098,7 +9098,9 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (main->versionfile < 250) { bScreen *screen; Scene *scene; + Base *base; Material *ma; + Camera *cam; Mesh *me; Scene *sce; Tex *tx; @@ -9132,6 +9134,20 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for(sce= main->scene.first; sce; sce= sce->id.next) { if(sce->nodetree && strlen(sce->nodetree->id.name)==0) strcpy(sce->nodetree->id.name, "NTComposit Nodetree"); + + /* move to cameras */ + if(sce->r.scemode & R_PANORAMA) { + for(base=scene->base.first; base; base=base->next) { + ob= newlibadr(fd, lib, base->object); + + if(ob->type == OB_CAMERA && !ob->id.lib) { + cam= newlibadr(fd, lib, ob->data); + cam->flag |= CAM_PANORAMA; + } + } + + sce->r.scemode &= ~R_PANORAMA; + } } /* and texture trees */ for(tx= main->tex.first; tx; tx= tx->id.next) { diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 7fa0bf6426f..284da29f0d2 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -466,13 +466,18 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, i uiLayout *sub; uiBut *but; PropertySubType subtype; + int labelw; sub= uiLayoutRow(layout, 0); uiBlockSetCurLayout(block, sub); if(strcmp(name, "") != 0) { - w= w/2; - uiDefBut(block, LABEL, 0, name, x, y, w, h, NULL, 0.0, 0.0, 0, 0, ""); + /* XXX UI_GetStringWidth is not accurate + labelw= UI_GetStringWidth(name); + CLAMP(labelw, w/4, 3*w/4);*/ + labelw= w/2; + uiDefBut(block, LABEL, 0, name, x, y, labelw, h, NULL, 0.0, 0.0, 0, 0, ""); + w= w-labelw; } subtype= RNA_property_subtype(prop); diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index edde575f695..c1129db8ebe 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -374,8 +374,10 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) { /* full string */ ui_get_but_string(but, buf, sizeof(buf)); - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Value: %s", buf); - data->totline++; + if(buf[0]) { + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Value: %s", buf); + data->totline++; + } } if(but->rnaprop) { diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index c3b68eb74ce..113e7249e65 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2320,6 +2320,40 @@ static ScrArea *find_area_showing_r_result(bContext *C) return sa; } +static ScrArea *find_area_image_empty(bContext *C) +{ + bScreen *sc= CTX_wm_screen(C); + ScrArea *sa; + SpaceImage *sima; + + /* find an imagewindow showing render result */ + for(sa=sc->areabase.first; sa; sa= sa->next) { + if(sa->spacetype==SPACE_IMAGE) { + sima= sa->spacedata.first; + if(!sima->image) + break; + } + } + return sa; +} + +static ScrArea *find_empty_image_area(bContext *C) +{ + bScreen *sc= CTX_wm_screen(C); + ScrArea *sa; + SpaceImage *sima; + + /* find an imagewindow showing render result */ + for(sa=sc->areabase.first; sa; sa= sa->next) { + if(sa->spacetype==SPACE_IMAGE) { + sima= sa->spacedata.first; + if(!sima->image) + break; + } + } + return sa; +} + static void screen_set_image_output(bContext *C) { Scene *scene= CTX_data_scene(C); @@ -2334,6 +2368,8 @@ static void screen_set_image_output(bContext *C) else { sa= find_area_showing_r_result(C); + if(sa==NULL) + sa= find_area_image_empty(C); if(sa==NULL) { /* find largest open non-image area */ diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index f16a232f26d..f09f35589b9 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -80,5 +80,8 @@ void PARTICLE_OT_remove_keyed_target(struct wmOperatorType *ot); void PARTICLE_OT_keyed_target_move_up(struct wmOperatorType *ot); void PARTICLE_OT_keyed_target_move_down(struct wmOperatorType *ot); +void SCENE_OT_render_layer_add(struct wmOperatorType *ot); +void SCENE_OT_render_layer_remove(struct wmOperatorType *ot); + #endif /* ED_BUTTONS_INTERN_H */ diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 6fb52c61131..fb1e9d1214d 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -33,6 +33,7 @@ #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_material_types.h" +#include "DNA_node_types.h" #include "DNA_texture_types.h" #include "DNA_scene_types.h" #include "DNA_world_types.h" @@ -43,7 +44,9 @@ #include "BKE_library.h" #include "BKE_main.h" #include "BKE_material.h" +#include "BKE_node.h" #include "BKE_particle.h" +#include "BKE_scene.h" #include "BKE_texture.h" #include "BKE_utildefines.h" #include "BKE_world.h" @@ -689,3 +692,74 @@ void PARTICLE_OT_keyed_target_move_down(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } +/********************** render layer operators *********************/ + +static int render_layer_add_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + + scene_add_render_layer(scene); + scene->r.actlay= BLI_countlist(&scene->r.layers) - 1; + + WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + + return OPERATOR_FINISHED; +} + +void SCENE_OT_render_layer_add(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Add Render Layer"; + ot->idname= "SCENE_OT_render_layer_add"; + + /* api callbacks */ + ot->exec= render_layer_add_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} + +static int render_layer_remove_exec(bContext *C, wmOperator *op) +{ + Scene *scene= CTX_data_scene(C); + SceneRenderLayer *rl; + int act= scene->r.actlay; + + if(BLI_countlist(&scene->r.layers) <= 1) + return OPERATOR_CANCELLED; + + rl= BLI_findlink(&scene->r.layers, scene->r.actlay); + BLI_remlink(&scene->r.layers, rl); + MEM_freeN(rl); + + scene->r.actlay= 0; + + if(scene->nodetree) { + bNode *node; + for(node= scene->nodetree->nodes.first; node; node= node->next) { + if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) { + if(node->custom1==act) + node->custom1= 0; + else if(node->custom1>act) + node->custom1--; + } + } + } + + WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + + return OPERATOR_FINISHED; +} + +void SCENE_OT_render_layer_remove(wmOperatorType *ot) +{ + /* identifiers */ + ot->name= "Remove Render Layer"; + ot->idname= "SCENE_OT_render_layer_remove"; + + /* api callbacks */ + ot->exec= render_layer_remove_exec; + + /* flags */ + ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; +} diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 6cdb4dbf93d..17f55c9395e 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -228,6 +228,9 @@ void buttons_operatortypes(void) WM_operatortype_append(PARTICLE_OT_remove_keyed_target); WM_operatortype_append(PARTICLE_OT_keyed_target_move_up); WM_operatortype_append(PARTICLE_OT_keyed_target_move_down); + + WM_operatortype_append(SCENE_OT_render_layer_add); + WM_operatortype_append(SCENE_OT_render_layer_remove); } void buttons_keymap(struct wmWindowManager *wm) diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c index 25890953320..ac15ed93ad0 100644 --- a/source/blender/editors/space_file/writeimage.c +++ b/source/blender/editors/space_file/writeimage.c @@ -153,6 +153,9 @@ void save_image_filesel_str(Scene *scene, char *str) strcpy(str, "Save Radiance HDR"); break; case R_FFMPEG: + case R_H264: + case R_XVID: + case R_THEORA: case R_PNG: strcpy(str, "Save PNG"); break; diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 7a504efdd2a..8ba7fa8b58d 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -79,6 +79,7 @@ typedef struct Camera { #define CAM_SHOWNAME 16 #define CAM_ANGLETOGGLE 32 #define CAM_DS_EXPAND 64 +#define CAM_PANORAMA 128 /* yafray: dof sampling switch */ #define CAM_YF_NO_QMC 512 diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index c71aa81147d..7a6cbced45e 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -635,7 +635,7 @@ typedef struct Scene { #define R_FIELDSTILL 0x0080 #define R_RADIO 0x0100 #define R_BORDER 0x0200 -#define R_PANORAMA 0x0400 +#define R_PANORAMA 0x0400 /* deprecated as scene option, still used in renderer */ #define R_CROP 0x0800 #define R_COSMO 0x1000 #define R_ODDFIELD 0x2000 @@ -694,7 +694,7 @@ typedef struct Scene { #define R_COMP_FREE 0x0800 #define R_NO_IMAGE_LOAD 0x1000 #define R_NO_TEX 0x2000 -#define R_STAMP_INFO 0x4000 +#define R_STAMP_INFO 0x4000 /* deprecated */ #define R_FULL_SAMPLE 0x8000 #define R_COMP_RERENDER 0x10000 #define R_RECURS_PROTECTION 0x20000 @@ -710,6 +710,7 @@ typedef struct Scene { #define R_STAMP_MARKER 0x0080 #define R_STAMP_FILENAME 0x0100 #define R_STAMP_SEQSTRIP 0x0200 +#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP) /* alphamode */ #define R_ADDSKY 0 @@ -746,6 +747,9 @@ typedef struct Scene { #define R_MULTILAYER 28 #define R_DDS 29 #define R_JP2 30 +#define R_H264 31 +#define R_XVID 32 +#define R_THEORA 33 /* subimtype, flag options for imtype */ #define R_OPENEXR_HALF 1 diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 967636fe36b..89118850b20 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -9,4 +9,28 @@ objs += o incs = '#/intern/guardedalloc ../blenkernel ../blenlib ../makesdna intern .' incs += ' ../windowmanager ../editors/include ../imbuf' -env.BlenderLib ( 'bf_rna', objs, Split(incs), [], libtype=['core'], priority = [195] ) +defs = [] + +if env['WITH_BF_OPENEXR']: + defs.append('WITH_OPENEXR') + +if env['WITH_BF_OPENJPEG']: + defs.append('WITH_OPENJPEG') + +if env['WITH_BF_DDS']: + defs.append('WITH_DDS') + +if env['WITH_BF_FFMPEG']: + defs.append('WITH_FFMPEG') + incs += ' ' + env['BF_FFMPEG_INC'] + +if env['WITH_BF_OGG']: + defs.append('WITH_OGG') + +if env['WITH_BF_QUICKTIME']: + defs.append('WITH_QUICKTIME') + +if env['WITH_BF_LCMS']: + defs.append('WITH_LCMS') + +env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core'], priority = [195] ) diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 3400b69ee38..85505d546c4 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -59,6 +59,7 @@ IF(WITH_QUICKTIME) ENDIF(WITH_QUICKTIME) IF(WITH_FFMPEG) + SET(INC ${INC} ${FFMPEG_INC}) ADD_DEFINITIONS(-DWITH_FFMPEG) ENDIF(WITH_FFMPEG) diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile index 1694e55ed4c..7f9bfbfea67 100644 --- a/source/blender/makesrna/intern/Makefile +++ b/source/blender/makesrna/intern/Makefile @@ -57,6 +57,7 @@ CPPFLAGS += -I. ifeq ($(WITH_FFMPEG),true) CPPFLAGS += -DWITH_FFMPEG + CPPFLAGS += $(NAN_FFMPEGCFLAGS) endif ifeq ($(WITH_OPENEXR), true) diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 03f0afdb2cc..7cd3fde21be 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -29,6 +29,10 @@ makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" ' defs = [] +incs = '#/intern/guardedalloc ../../blenlib ../../blenkernel' +incs += ' ../../imbuf ../../makesdna ../../makesrna' +incs += ' ../../windowmanager ../../editors/include' + if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') @@ -40,6 +44,10 @@ if env['WITH_BF_DDS']: if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') + incs += ' ' + env['BF_FFMPEG_INC'] + +if env['WITH_BF_OGG']: + defs.append('WITH_OGG') if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') @@ -49,14 +57,7 @@ if env['WITH_BF_LCMS']: makesrna_tool.Append(CPPDEFINES=defs) -makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc', - '../../blenlib', - '../../blenkernel', - '../../imbuf', - '../../makesdna', - '../../makesrna', - '../../windowmanager', - '../../editors/include']) +makesrna_tool.Append (CPPPATH = Split(incs)) if env['OURPLATFORM'] == 'linuxcross': USE_WINE = True # when cross compiling on linux 64bit this is useful diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index 4814f9583a9..9c33b0afb00 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -153,6 +153,11 @@ void RNA_def_camera(BlenderRNA *brna) RNA_def_property_enum_items(prop, prop_lens_unit_items); RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface."); + prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA); + RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects."); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); + /* pointers */ rna_def_animdata_common(srna); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 6e2a6e27928..9c9fbf0e3cf 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -31,11 +31,11 @@ #include "DNA_scene_types.h" -/* +#ifdef WITH_FFMPEG #include "BKE_writeffmpeg.h" #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> -*/ +#endif #include "WM_types.h" @@ -52,8 +52,13 @@ EnumPropertyItem prop_mode_items[] ={ #ifdef RNA_RUNTIME +#include "DNA_node_types.h" + #include "BKE_context.h" #include "BKE_global.h" +#include "BKE_node.h" + +#include "BLI_threads.h" PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter) { @@ -63,9 +68,8 @@ PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter) return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object); } -static void rna_Scene_layer_set(PointerRNA *ptr, const int *values) +static int layer_set(int lay, const int *values) { - Scene *scene= (Scene*)ptr->data; int i, tot= 0; /* ensure we always have some layer selected */ @@ -74,12 +78,21 @@ static void rna_Scene_layer_set(PointerRNA *ptr, const int *values) tot++; if(tot==0) - return; + return lay; for(i=0; i<20; i++) { - if(values[i]) scene->lay |= (1<<i); - else scene->lay &= ~(1<<i); + if(values[i]) lay |= (1<<i); + else lay &= ~(1<<i); } + + return lay; +} + +static void rna_Scene_layer_set(PointerRNA *ptr, const int *values) +{ + Scene *scene= (Scene*)ptr->data; + + scene->lay= layer_set(scene->lay, values); } static void rna_Scene_start_frame_set(PointerRNA *ptr, int value) @@ -102,6 +115,92 @@ static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr) //update_for_newframe(); } +static int rna_SceneRenderData_threads_get(PointerRNA *ptr) +{ + RenderData *rd= (RenderData*)ptr->data; + + if(rd->mode & R_FIXED_THREADS) + return rd->threads; + else + return BLI_system_thread_count(); +} + +static int rna_SceneRenderData_save_buffers_get(PointerRNA *ptr) +{ + RenderData *rd= (RenderData*)ptr->data; + + return (rd->scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) != 0; +} + +static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value) +{ + RenderData *rd= (RenderData*)ptr->data; + + rd->imtype= value; + ffmpeg_verify_image_type(rd); +} + +static int rna_SceneRenderData_active_layer_index_get(PointerRNA *ptr) +{ + RenderData *rd= (RenderData*)ptr->data; + return rd->actlay; +} + +static void rna_SceneRenderData_active_layer_index_set(PointerRNA *ptr, int value) +{ + RenderData *rd= (RenderData*)ptr->data; + rd->actlay= value; +} + +static void rna_SceneRenderData_active_layer_index_range(PointerRNA *ptr, int *min, int *max) +{ + RenderData *rd= (RenderData*)ptr->data; + + *min= 0; + *max= BLI_countlist(&rd->layers)-1; + *max= MAX2(0, *max); +} + +static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value) +{ + Scene *scene= (Scene*)ptr->id.data; + SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data; + + BLI_strncpy(rl->name, value, sizeof(rl->name)); + + if(scene->nodetree) { + bNode *node; + int index= BLI_findindex(&scene->r.layers, rl); + + for(node= scene->nodetree->nodes.first; node; node= node->next) { + if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) { + if(node->custom1==index) + BLI_strncpy(node->name, rl->name, NODE_MAXSTR); + } + } + } +} + +static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values) +{ + SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data; + rl->lay= layer_set(rl->lay, values); +} + +static void rna_SceneRenderLayer_zmask_layer_set(PointerRNA *ptr, const int *values) +{ + SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data; + rl->lay_zmask= layer_set(rl->lay_zmask, values); +} + +static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr) +{ + Scene *scene= (Scene*)ptr->id.data; + + if(scene->nodetree) + ntreeCompositForceHidden(scene->nodetree, scene); +} + #else void rna_def_sculpt(BlenderRNA *brna) @@ -257,6 +356,194 @@ void rna_def_tool_settings(BlenderRNA *brna) rna_def_sculpt(brna); } +void rna_def_scene_render_layer(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "SceneRenderLayer", NULL); + RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer."); + + prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); + RNA_def_property_ui_text(prop, "Name", "Render layer name."); + RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + RNA_def_struct_name_property(srna, prop); + + prop= RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE); + RNA_def_property_pointer_sdna(prop, NULL, "mat_override"); + RNA_def_property_struct_type(prop, "Material"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Material Override", "Material to override all other materials in this render layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "Group"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + /* layers */ + prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); + RNA_def_property_array(prop, 20); + RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer."); + RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set"); + + prop= RNA_def_property(srna, "zmask_layers", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1); + RNA_def_property_array(prop, 20); + RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers."); + RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_zmask_layer_set"); + + /* layer options */ + prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE); + RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "zmask", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK); + RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "zmask_negate", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK); + RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "all_z", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z); + RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "solid", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "halo", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "ztransp", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (On top of Solid and Halos)."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "sky", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "strand", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); + RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + /* passes */ + prop= RNA_def_property(srna, "pass_combined", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED); + RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_z", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z); + RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_vector", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR); + RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_normal", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL); + RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_uv", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV); + RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_mist", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST); + RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_object_index", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB); + RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_color", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA); + RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_diffuse", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE); + RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_specular", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC); + RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_shadow", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW); + RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_ao", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO); + RNA_def_property_ui_text(prop, "AO", "Deliver AO pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_reflection", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT); + RNA_def_property_ui_text(prop, "Reflection", "Deliver ratraced reflection pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_refraction", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT); + RNA_def_property_ui_text(prop, "Refraction", "Deliver ratraced refraction pass."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_specular_exclude", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC); + RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_shadow_exclude", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW); + RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_ao_exclude", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO); + RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_reflection_exclude", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT); + RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude ratraced reflection pass from combined."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); + + prop= RNA_def_property(srna, "pass_refraction_exclude", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT); + RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude ratraced refraction pass from combined."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update"); +} + void rna_def_scene_render_data(BlenderRNA *brna) { StructRNA *srna; @@ -324,10 +611,27 @@ void rna_def_scene_render_data(BlenderRNA *brna) static EnumPropertyItem image_type_items[] = { - {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""}, -#ifdef WITH_FFMPEG - {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""}, + {R_PNG, "PNG", 0, "PNG", ""}, + {R_JPEG90, "JPEG", 0, "JPEG", ""}, +#ifdef WITH_OPENJPEG + {R_JP2, "JPEG2000", 0, "JPEG 2000", ""}, +#endif + {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff + {R_BMP, "BMP", 0, "BMP", ""}, + {R_TARGA, "TARGA", 0, "Targa", ""}, + {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""}, + //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented + {R_HAMX, "HAMX", 0, "HamX", ""}, + {R_IRIS, "IRIS", 0, "Iris", ""}, + {0, "", 0, NULL, NULL}, +#ifdef WITH_OPENEXR + {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""}, + {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""}, #endif + {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""}, + {R_CINEON, "CINEON", 0, "Cineon", ""}, + {R_DPX, "DPX", 0, "DPX", ""}, + {0, "", 0, NULL, NULL}, {R_AVIRAW, "AVIRAW", 0, "AVI Raw", ""}, {R_AVIJPEG, "AVIJPEG", 0, "AVI JPEG", ""}, #ifdef _WIN32 @@ -336,31 +640,25 @@ void rna_def_scene_render_data(BlenderRNA *brna) #ifdef WITH_QUICKTIME {R_QUICKTIME, "QUICKTIME", 0, "QuickTime", ""}, #endif - {R_TARGA, "TARGA", 0, "Targa", ""}, - {R_RAWTGA, "RAWTARGA", 0, "Targa Raw", ""}, - {R_PNG, "PNG", 0, "PNG", ""}, - //{R_DDS, "DDS", 0, "DDS", ""}, // XXX not yet implemented -//#ifdef WITH_OPENJPEG - {R_JP2, "JPEG2000", 0, "JPEG 2000", ""}, -//#endif - {R_BMP, "BMP", 0, "BMP", ""}, - {R_JPEG90, "JPEG", 0, "JPEG", ""}, - {R_HAMX, "HAMX", 0, "HamX", ""}, - {R_IRIS, "IRIS", 0, "Iris", ""}, - {R_RADHDR, "RADHDR", 0, "Radiance HDR", ""}, - {R_CINEON, "CINEON", 0, "Cineon", ""}, - {R_DPX, "DPX", 0, "DPX", ""}, #ifdef __sgi {R_MOVIE, "MOVIE", 0, "Movie", ""}, #endif -//#ifdef WITH_OPENEXR - {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""}, - {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""}, -//#endif - {R_TIFF, "TIFF", 0, "TIFF", ""}, // XXX only with G.have_libtiff +#ifdef WITH_FFMPEG + {R_H264, "H264", 0, "H.264", ""}, + {R_XVID, "XVID", 0, "Xvid", ""}, + // XXX broken +#if 0 +#ifdef WITH_OGG + {R_THEORA, "THEORA", 0, "Ogg Theora", ""}, +#endif +#endif + {R_FFMPEG, "FFMPEG", 0, "FFMpeg", ""}, +#endif + {0, "", 0, NULL, NULL}, + {R_FRAMESERVER, "FRAMESERVER", 0, "Frame Server", ""}, {0, NULL, 0, NULL, NULL}}; -//#ifdef WITH_OPENEXR +#ifdef WITH_OPENEXR static EnumPropertyItem exr_codec_items[] = { {0, "NONE", 0, "None", ""}, {1, "PXR24", 0, "Pxr24 (lossy)", ""}, @@ -368,9 +666,9 @@ void rna_def_scene_render_data(BlenderRNA *brna) {3, "PIZ", 0, "PIZ (lossless)", ""}, {4, "RLE", 0, "RLE (lossless)", ""}, {0, NULL, 0, NULL, NULL}}; -//#endif +#endif -//#ifdef WITH_OPENJPEG +#ifdef WITH_OPENJPEG static EnumPropertyItem jp2_preset_items[] = { {0, "NO_PRESET", 0, "No Preset", ""}, {1, "R_JPEG2K_CINE_PRESET", 0, "Cinema 24fps 2048x1080", ""}, @@ -387,20 +685,24 @@ void rna_def_scene_render_data(BlenderRNA *brna) {R_JPEG2K_12BIT, "16", 0, "16", ""}, {R_JPEG2K_16BIT, "32", 0, "32", ""}, {0, NULL, 0, NULL, NULL}}; -//#endif +#endif -/* #ifdef WITH_FFMPEG static EnumPropertyItem ffmpeg_format_items[] = { {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""}, {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""}, {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""}, - {FFMPEG_AVI, "AVI", 0, "Avi", ""}, + {FFMPEG_AVI, "AVI", 0, "AVI", ""}, {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""}, {FFMPEG_DV, "DV", 0, "DV", ""}, - {FFMPEG_H264, "H264", 0, "H264", ""}, - {FFMPEG_XVID, "XVID", 0, "XVid", ""}, - {FFMPEG_OGG, "OGG", 0, "OGG", ""}, + {FFMPEG_H264, "H264", 0, "H.264", ""}, + {FFMPEG_XVID, "XVID", 0, "Xvid", ""}, + // XXX broken +#if 0 +#ifdef WITH_OGG + {FFMPEG_OGG, "OGG", 0, "Ogg", ""}, +#endif +#endif {FFMPEG_FLV, "FLASH", 0, "Flash", ""}, {0, NULL, 0, NULL, NULL}}; @@ -410,10 +712,12 @@ void rna_def_scene_render_data(BlenderRNA *brna) {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""}, {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""}, {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""}, - {CODEC_ID_H264, "H264", 0, "H264", ""}, - {CODEC_ID_XVID, "XVID", 0, "XVid", ""}, - {CODEC_ID_THEORA, "THEORA", 0, "OGG Theora", ""}, - {CODEC_ID_FLV1, "FLASH", 0, "FlashVideo1", ""}, + {CODEC_ID_H264, "H264", 0, "H.264", ""}, + {CODEC_ID_XVID, "XVID", 0, "Xvid", ""}, +#ifdef WITH_OGG + {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""}, +#endif + {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem ffmpeg_audio_codec_items[] = { @@ -425,7 +729,6 @@ void rna_def_scene_render_data(BlenderRNA *brna) {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""}, {0, NULL, 0, NULL, NULL}}; #endif -*/ srna= RNA_def_struct(brna, "SceneRenderData", NULL); RNA_def_struct_sdna(srna, "RenderData"); @@ -518,7 +821,7 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "G", "Log conversion gamma"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); -//#ifdef WITH_OPENEXR +#ifdef WITH_OPENEXR /* OpenEXR */ prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE); @@ -541,9 +844,9 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG); RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); -//#endif +#endif -//#ifdef WITH_OPENJPEG +#ifdef WITH_OPENJPEG /* Jpeg 2000 */ prop= RNA_def_property(srna, "jpeg_preset", PROP_ENUM, PROP_NONE); @@ -562,12 +865,11 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC); RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); -//#endif +#endif #ifdef WITH_FFMPEG /* FFMPEG Video*/ - /* prop= RNA_def_property(srna, "ffmpeg_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.type"); RNA_def_property_enum_items(prop, ffmpeg_format_items); @@ -579,7 +881,6 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_enum_items(prop, ffmpeg_codec_items); RNA_def_property_ui_text(prop, "Codec", "FFMpeg codec to use"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - */ prop= RNA_def_property(srna, "ffmpeg_video_bitrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.video_bitrate"); @@ -630,13 +931,11 @@ void rna_def_scene_render_data(BlenderRNA *brna) /* FFMPEG Audio*/ - /* prop= RNA_def_property(srna, "ffmpeg_audio_codec", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffcodecdata.audio_codec"); RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items); - RNA_def_property_ui_text(prop, Codec", "FFMpeg codec to use"); + RNA_def_property_ui_text(prop, "Audio Codec", "FFMpeg audio codec to use"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - */ prop= RNA_def_property(srna, "ffmpeg_audio_bitrate", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "ffcodecdata.audio_bitrate"); @@ -765,14 +1064,10 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Edge Color", ""); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "panorama", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PANORAMA); - RNA_def_property_ui_text(prop, "Panorama", "Render the scene with a cylindrical camera for pseudo-fisheye lens effects"); - RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "threads"); RNA_def_property_range(prop, 1, 8); + RNA_def_property_int_funcs(prop, "rna_SceneRenderData_threads_get", NULL, NULL); RNA_def_property_ui_text(prop, "Threads", "Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); @@ -806,14 +1101,14 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "No Overwrite", "Skip and don't overwrite existing files while rendering"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "do_composite", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP); - RNA_def_property_ui_text(prop, "Do Composite", "Process the render result through the compositing pipeline"); + RNA_def_property_ui_text(prop, "Compositing", "Process the render result through the compositing pipeline, if a compositing nodes are enabled."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "do_sequence", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ); - RNA_def_property_ui_text(prop, "Do Sequence", "Process the render (and composited) result through the video sequence editor pipeline"); + RNA_def_property_ui_text(prop, "Sequencer", "Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "file_extensions", PROP_BOOLEAN, PROP_NONE); @@ -824,6 +1119,7 @@ void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "imtype"); RNA_def_property_enum_items(prop, image_type_items); + RNA_def_property_enum_funcs(prop, NULL, "rna_SceneRenderData_file_format_set", NULL); RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); @@ -834,12 +1130,13 @@ void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE); - RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, allows Full Sampling)."); + RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL); + RNA_def_property_ui_text(prop, "Save Buffers","Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "full_sample", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE); - RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing"); + RNA_def_property_ui_text(prop, "Full Sample","Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "backbuf", PROP_BOOLEAN, PROP_NONE); @@ -857,11 +1154,6 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Output Path", "Directory/name to save animations, # characters defines the position and length of frame numbers."); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "stamp", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_STAMP_INFO); - RNA_def_property_ui_text(prop, "Stamp", "Embed metadata into the rendered image"); - RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "stamp_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME); RNA_def_property_ui_text(prop, "Stamp Time", "Include the current time in image metadata"); @@ -935,6 +1227,21 @@ void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Stamp Background", "Color to use behind stamp text"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + prop= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE); + RNA_def_property_collection_sdna(prop, NULL, "layers", NULL); + RNA_def_property_struct_type(prop, "SceneRenderLayer"); + RNA_def_property_ui_text(prop, "Render Layers", ""); + + prop= RNA_def_property(srna, "single_layer", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER); + RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "actlay"); + RNA_def_property_int_funcs(prop, "rna_SceneRenderData_active_layer_index_get", "rna_SceneRenderData_active_layer_index_set", "rna_SceneRenderData_active_layer_index_range"); + RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array."); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); } void RNA_def_scene(BlenderRNA *brna) @@ -1038,6 +1345,7 @@ void RNA_def_scene(BlenderRNA *brna) rna_def_tool_settings(brna); rna_def_scene_render_data(brna); + rna_def_scene_render_layer(brna); } #endif diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index a0185a64659..842adcf8520 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -453,6 +453,7 @@ void RE_SetCamera(Render *re, Object *camera) cam= camera->data; if(cam->type==CAM_ORTHO) re->r.mode |= R_ORTHO; + if(cam->flag & CAM_PANORAMA) re->r.mode |= R_PANORAMA; /* solve this too... all time depending stuff is in convertblender.c? * Need to update the camera early because it's used for projection matrices @@ -601,7 +602,7 @@ void initparts(Render *re) yparts= re->r.yparts; /* mininum part size, but for exr tile saving it was checked already */ - if(!(re->r.scemode & R_EXR_TILE_FILE)) { + if(!(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE))) { if(re->r.mode & R_PANORAMA) { if(ceil(re->rectx/(float)xparts) < 8) xparts= 1 + re->rectx/8; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index ec2660566f5..3ef50af53c2 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -36,6 +36,7 @@ #include "DNA_node_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" +#include "DNA_sequence_types.h" #include "DNA_userdef_types.h" #include "BKE_utildefines.h" @@ -1092,14 +1093,14 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, int winx, int winy re->ok= 0; } else { -#ifndef WITH_OPENEXR +#ifdef WITH_OPENEXR + if(re->r.scemode & R_FULL_SAMPLE) + re->r.scemode |= R_EXR_TILE_FILE; /* enable automatic */ +#else /* can't do this without openexr support */ - re->r.scemode &= ~R_EXR_TILE_FILE; + re->r.scemode &= ~(R_EXR_TILE_FILE|R_FULL_SAMPLE); #endif - if(!(re->r.scemode & R_EXR_TILE_FILE)) - re->r.scemode &= ~R_FULL_SAMPLE; /* clear, so we can use this flag for test both */ - /* fullsample wants uniform osa levels */ if(source && (re->r.scemode & R_FULL_SAMPLE)) { /* but, if source has no full sample we disable it */ @@ -1499,7 +1500,7 @@ static void threaded_tile_processor(Render *re) else if(re->r.scemode & R_FULL_SAMPLE) re->result= new_full_sample_buffers_exr(re); else - re->result= new_render_result(re, &re->disprect, 0, re->r.scemode & R_EXR_TILE_FILE); + re->result= new_render_result(re, &re->disprect, 0, re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)); } if(re->result==NULL) @@ -2278,7 +2279,7 @@ static void do_render_all_options(Render *re) /* ensure no images are in memory from previous animated sequences */ BKE_image_all_free_anim_ibufs(re->r.cfra); - if(re->r.scemode & R_DOSEQ) { + if((re->r.scemode & R_DOSEQ) && re->scene->ed && re->scene->ed->seqbase.first) { /* note: do_render_seq() frees rect32 when sequencer returns float images */ if(!re->test_break(re->tbh)) ; //XXX do_render_seq(re->result, re->r.cfra); @@ -2299,7 +2300,7 @@ static void do_render_all_options(Render *re) re->stats_draw(re->sdh, &re->i); /* stamp image info here */ - if((re->r.scemode & R_STAMP_INFO) && (re->r.stamp & R_STAMP_DRAW)) { + if((re->r.stamp & R_STAMP_ALL) && (re->r.stamp & R_STAMP_DRAW)) { renderresult_stampinfo(re->scene); re->display_draw(re->ddh, re->result, NULL); } @@ -2327,13 +2328,13 @@ static int is_rendering_allowed(Render *re) re->error(re->erh, "No border area selected."); return 0; } - if(re->r.scemode & R_EXR_TILE_FILE) { + if(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) { re->error(re->erh, "Border render and Buffer-save not supported yet"); return 0; } } - if(re->r.scemode & R_EXR_TILE_FILE) { + if(re->r.scemode & (R_EXR_TILE_FILE|R_FULL_SAMPLE)) { char str[FILE_MAX]; render_unique_exr_name(re, str, 0); |