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:
authorArystanbek Dyussenov <arystan.d@gmail.com>2010-09-04 22:49:07 +0400
committerArystanbek Dyussenov <arystan.d@gmail.com>2010-09-04 22:49:07 +0400
commit90b464d3728d9ed8ec26fdf59058d236b99dbcd9 (patch)
treee88cab4fb1358e962b19f658064ca8c9f8d29f5b /release/scripts/ui/properties_render.py
parent08d02dd04d836976b25793bb1d4c6a86b3f924c7 (diff)
parentb0b787ef38f9947b3176642556f5282eb3518f69 (diff)
COLLADA branch: merge from trunk -r 28015:31610.soc-2009-chingachgook
Diffstat (limited to 'release/scripts/ui/properties_render.py')
-rw-r--r--release/scripts/ui/properties_render.py422
1 files changed, 199 insertions, 223 deletions
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py
index 2d20a948278..aef95056391 100644
--- a/release/scripts/ui/properties_render.py
+++ b/release/scripts/ui/properties_render.py
@@ -19,13 +19,11 @@
# <pep8 compliant>
import bpy
-narrowui = 180
-
class RENDER_MT_presets(bpy.types.Menu):
bl_label = "Render Presets"
preset_subdir = "render"
- preset_operator = "script.python_file_run"
+ preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
@@ -36,18 +34,19 @@ class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset
-class RenderButtonsPanel(bpy.types.Panel):
+class RenderButtonsPanel():
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "render"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
- def poll(self, context):
+ @classmethod
+ def poll(cls, context):
rd = context.scene.render
- return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES)
+ return (context.scene and rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES)
-class RENDER_PT_render(RenderButtonsPanel):
+class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -55,23 +54,21 @@ class RENDER_PT_render(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
split = layout.split()
col = split.column()
col.operator("render.render", text="Image", icon='RENDER_STILL')
- if wide_ui:
- col = split.column()
+ col = split.column()
col.operator("render.render", text="Animation", icon='RENDER_ANIMATION').animation = True
layout.prop(rd, "display_mode", text="Display")
-class RENDER_PT_layers(RenderButtonsPanel):
+class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Layers"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
@@ -79,16 +76,15 @@ class RENDER_PT_layers(RenderButtonsPanel):
scene = context.scene
rd = scene.render
- wide_ui = context.region.width > narrowui
row = layout.row()
- row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
+ row.template_list(rd, "layers", rd.layers, "active_index", rows=2)
col = row.column(align=True)
col.operator("scene.render_layer_add", icon='ZOOMIN', text="")
col.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
- rl = rd.layers[rd.active_layer_index]
+ rl = rd.layers.active
if rl:
layout.prop(rl, "name")
@@ -96,13 +92,16 @@ class RENDER_PT_layers(RenderButtonsPanel):
split = layout.split()
col = split.column()
- col.prop(scene, "visible_layers", text="Scene")
- if wide_ui:
- col = split.column()
- col.prop(rl, "visible_layers", text="Layer")
+ col.prop(scene, "layers", text="Scene")
+ col.label(text="")
+ col.prop(rl, "light_override", text="Light")
+ col.prop(rl, "material_override", text="Material")
+
+ col = split.column()
+ col.prop(rl, "layers", text="Layer")
+ col.label(text="Mask Layers:")
+ col.prop(rl, "layers_zmask", text="")
- layout.prop(rl, "light_override", text="Light")
- layout.prop(rl, "material_override", text="Material")
layout.separator()
layout.label(text="Include:")
@@ -110,26 +109,21 @@ class RENDER_PT_layers(RenderButtonsPanel):
split = layout.split()
col = split.column()
- col.prop(rl, "zmask")
+ col.prop(rl, "use_zmask")
row = col.row()
- row.prop(rl, "zmask_negate", text="Negate")
- row.active = rl.zmask
- col.prop(rl, "all_z")
+ row.prop(rl, "invert_zmask", text="Negate")
+ row.active = rl.use_zmask
+ col.prop(rl, "use_all_z")
col = split.column()
- col.prop(rl, "solid")
- col.prop(rl, "halo")
- col.prop(rl, "ztransp")
+ col.prop(rl, "use_solid")
+ col.prop(rl, "use_halo")
+ col.prop(rl, "use_ztransp")
col = split.column()
- col.prop(rl, "sky")
- col.prop(rl, "edge")
- col.prop(rl, "strand")
-
- if rl.zmask:
- split = layout.split()
- split.label(text="Zmask Layers:")
- split.column().prop(rl, "zmask_layers", text="")
+ col.prop(rl, "use_sky")
+ col.prop(rl, "use_edge_enhance")
+ col.prop(rl, "use_strand")
layout.separator()
@@ -137,46 +131,45 @@ class RENDER_PT_layers(RenderButtonsPanel):
col = split.column()
col.label(text="Passes:")
- col.prop(rl, "pass_combined")
- col.prop(rl, "pass_z")
- col.prop(rl, "pass_vector")
- col.prop(rl, "pass_normal")
- col.prop(rl, "pass_uv")
- col.prop(rl, "pass_mist")
- col.prop(rl, "pass_object_index")
- col.prop(rl, "pass_color")
-
- if wide_ui:
- col = split.column()
+ col.prop(rl, "use_pass_combined")
+ col.prop(rl, "use_pass_z")
+ col.prop(rl, "use_pass_vector")
+ col.prop(rl, "use_pass_normal")
+ col.prop(rl, "use_pass_uv")
+ col.prop(rl, "use_pass_mist")
+ col.prop(rl, "use_pass_object_index")
+ col.prop(rl, "use_pass_color")
+
+ col = split.column()
col.label()
- col.prop(rl, "pass_diffuse")
+ col.prop(rl, "use_pass_diffuse")
row = col.row()
- row.prop(rl, "pass_specular")
- row.prop(rl, "pass_specular_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_specular")
+ row.prop(rl, "exclude_specular", text="")
row = col.row()
- row.prop(rl, "pass_shadow")
- row.prop(rl, "pass_shadow_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_shadow")
+ row.prop(rl, "exclude_shadow", text="")
row = col.row()
- row.prop(rl, "pass_emit")
- row.prop(rl, "pass_emit_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_emit")
+ row.prop(rl, "exclude_emit", text="")
row = col.row()
- row.prop(rl, "pass_ao")
- row.prop(rl, "pass_ao_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_ambient_occlusion")
+ row.prop(rl, "exclude_ambient_occlusion", text="")
row = col.row()
- row.prop(rl, "pass_environment")
- row.prop(rl, "pass_environment_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_environment")
+ row.prop(rl, "exclude_environment", text="")
row = col.row()
- row.prop(rl, "pass_indirect")
- row.prop(rl, "pass_indirect_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_indirect")
+ row.prop(rl, "exclude_indirect", text="")
row = col.row()
- row.prop(rl, "pass_reflection")
- row.prop(rl, "pass_reflection_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_reflection")
+ row.prop(rl, "exclude_reflection", text="")
row = col.row()
- row.prop(rl, "pass_refraction")
- row.prop(rl, "pass_refraction_exclude", text="", icon='X')
+ row.prop(rl, "use_pass_refraction")
+ row.prop(rl, "exclude_refraction", text="")
-class RENDER_PT_shading(RenderButtonsPanel):
+class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -184,33 +177,30 @@ class RENDER_PT_shading(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
split = layout.split()
col = split.column()
- col.prop(rd, "render_textures", text="Textures")
- col.prop(rd, "render_shadows", text="Shadows")
- col.prop(rd, "render_sss", text="Subsurface Scattering")
- col.prop(rd, "render_envmaps", text="Environment Map")
+ col.prop(rd, "use_textures", text="Textures")
+ col.prop(rd, "use_shadows", text="Shadows")
+ col.prop(rd, "use_sss", text="Subsurface Scattering")
+ col.prop(rd, "use_envmaps", text="Environment Map")
- if wide_ui:
- col = split.column()
- col.prop(rd, "render_raytracing", text="Ray Tracing")
- col.prop(rd, "color_management")
+ col = split.column()
+ col.prop(rd, "use_raytrace", text="Ray Tracing")
+ col.prop(rd, "use_color_management")
col.prop(rd, "alpha_mode", text="Alpha")
-class RENDER_PT_performance(RenderButtonsPanel):
+class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Performance"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
split = layout.split()
@@ -225,36 +215,34 @@ class RENDER_PT_performance(RenderButtonsPanel):
sub.prop(rd, "parts_x", text="X")
sub.prop(rd, "parts_y", text="Y")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.label(text="Memory:")
sub = col.column()
- sub.enabled = not (rd.use_border or rd.full_sample)
- sub.prop(rd, "save_buffers")
+ sub.enabled = not (rd.use_border or rd.use_full_sample)
+ sub.prop(rd, "use_save_buffers")
sub = col.column()
sub.active = rd.use_compositing
- sub.prop(rd, "free_image_textures")
+ sub.prop(rd, "use_free_image_textures")
sub = col.column()
- sub.active = rd.render_raytracing
+ sub.active = rd.use_raytrace
sub.label(text="Acceleration structure:")
- sub.prop(rd, "raytrace_structure", text="")
- if rd.raytrace_structure == 'OCTREE':
+ sub.prop(rd, "raytrace_method", text="")
+ if rd.raytrace_method == 'OCTREE':
sub.prop(rd, "octree_resolution", text="Resolution")
else:
sub.prop(rd, "use_instances", text="Instances")
sub.prop(rd, "use_local_coords", text="Local Coordinates")
-class RENDER_PT_post_processing(RenderButtonsPanel):
+class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Post Processing"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
split = layout.split()
@@ -262,8 +250,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
col.prop(rd, "use_compositing")
col.prop(rd, "use_sequencer")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "dither_intensity", text="Dither", slider=True)
layout.separator()
@@ -271,25 +258,22 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
split = layout.split()
col = split.column()
- col.prop(rd, "fields", text="Fields")
+ col.prop(rd, "use_fields", text="Fields")
sub = col.column()
- sub.active = rd.fields
+ sub.active = rd.use_fields
sub.row().prop(rd, "field_order", expand=True)
- sub.prop(rd, "fields_still", text="Still")
+ sub.prop(rd, "use_fields_still", text="Still")
- if wide_ui:
- col = split.column()
- else:
- col.separator()
- col.prop(rd, "edge")
+ col = split.column()
+ col.prop(rd, "use_edge_enhance")
sub = col.column()
- sub.active = rd.edge
+ sub.active = rd.use_edge_enhance
sub.prop(rd, "edge_threshold", text="Threshold", slider=True)
sub.prop(rd, "edge_color", text="")
-class RENDER_PT_output(RenderButtonsPanel):
+class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Output"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -297,86 +281,119 @@ class RENDER_PT_output(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
+ file_format = rd.file_format
- layout.prop(rd, "output_path", text="")
+ layout.prop(rd, "filepath", text="")
split = layout.split()
col = split.column()
col.prop(rd, "file_format", text="")
col.row().prop(rd, "color_mode", text="Color", expand=True)
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "use_file_extension")
col.prop(rd, "use_overwrite")
col.prop(rd, "use_placeholder")
- if rd.file_format in ('AVI_JPEG', 'JPEG'):
+ if file_format in ('AVI_JPEG', 'JPEG'):
split = layout.split()
split.prop(rd, "file_quality", slider=True)
+
+ if file_format == 'PNG':
+ split = layout.split()
+ split.prop(rd, "file_quality", slider=True, text="Compression")
- elif rd.file_format == 'OPEN_EXR':
+ elif file_format == 'MULTILAYER':
split = layout.split()
col = split.column()
col.label(text="Codec:")
col.prop(rd, "exr_codec", text="")
+ col = split.column()
- if wide_ui:
- subsplit = split.split()
- col = subsplit.column()
- col.prop(rd, "exr_half")
+ elif file_format == 'OPEN_EXR':
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Codec:")
+ col.prop(rd, "exr_codec", text="")
+
+ subsplit = split.split()
+ col = subsplit.column()
+ col.prop(rd, "use_exr_half")
col.prop(rd, "exr_zbuf")
- if wide_ui:
- col = subsplit.column()
+ col = subsplit.column()
col.prop(rd, "exr_preview")
- elif rd.file_format == 'JPEG2000':
+ elif file_format == 'JPEG2000':
split = layout.split()
col = split.column()
col.label(text="Depth:")
col.row().prop(rd, "jpeg2k_depth", expand=True)
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "jpeg2k_preset", text="")
col.prop(rd, "jpeg2k_ycc")
- elif rd.file_format in ('CINEON', 'DPX'):
+ elif file_format in ('CINEON', 'DPX'):
split = layout.split()
col = split.column()
- col.prop(rd, "cineon_log", text="Convert to Log")
+ col.prop(rd, "use_cineon_log", text="Convert to Log")
- if wide_ui:
- col = split.column(align=True)
- col.active = rd.cineon_log
+ col = split.column(align=True)
+ col.active = rd.use_cineon_log
col.prop(rd, "cineon_black", text="Black")
col.prop(rd, "cineon_white", text="White")
col.prop(rd, "cineon_gamma", text="Gamma")
- elif rd.file_format == 'TIFF':
+ elif file_format == 'TIFF':
split = layout.split()
- split.prop(rd, "tiff_bit")
+ split.prop(rd, "use_tiff_16bit")
- elif rd.file_format == 'QUICKTIME_CARBON':
+ elif file_format == 'QUICKTIME_CARBON':
split = layout.split()
- split.operator("scene.render_set_quicktime_codec")
+ split.operator("scene.render_data_set_quicktime_codec")
- elif rd.file_format == 'QUICKTIME_QTKIT':
+ elif file_format == 'QUICKTIME_QTKIT':
split = layout.split()
col = split.column()
- col.prop(rd, "quicktime_codec_type")
+ col.prop(rd, "quicktime_codec_type", text="Video Codec")
col.prop(rd, "quicktime_codec_spatial_quality", text="Quality")
+ # Audio
+ col.prop(rd, "quicktime_audiocodec_type", text="Audio Codec")
+ if rd.quicktime_audiocodec_type != 'No audio':
+ split = layout.split()
+ col = split.column()
+ if rd.quicktime_audiocodec_type == 'LPCM':
+ col.prop(rd, "quicktime_audio_bitdepth", text="")
+
+ col = split.column()
+ col.prop(rd, "quicktime_audio_samplerate", text="")
-class RENDER_PT_encoding(RenderButtonsPanel):
+ split = layout.split()
+ col = split.column()
+ if rd.quicktime_audiocodec_type == 'AAC':
+ col.prop(rd, "quicktime_audio_bitrate")
+
+ subsplit = split.split()
+ col = subsplit.column()
+
+ if rd.quicktime_audiocodec_type == 'AAC':
+ col.prop(rd, "quicktime_audio_codec_isvbr")
+
+ col = subsplit.column()
+ col.prop(rd, "quicktime_audio_resampling_hq")
+
+
+class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Encoding"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
- def poll(self, context):
+ @classmethod
+ def poll(cls, context):
rd = context.scene.render
return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA')
@@ -384,7 +401,6 @@ class RENDER_PT_encoding(RenderButtonsPanel):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")
@@ -393,19 +409,17 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col = split.column()
col.prop(rd, "ffmpeg_format")
if rd.ffmpeg_format in ('AVI', 'QUICKTIME', 'MKV', 'OGG'):
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "ffmpeg_codec")
else:
- if wide_ui:
- split.label()
+ split.label()
split = layout.split()
col = split.column()
col.prop(rd, "ffmpeg_video_bitrate")
- if wide_ui:
- col = split.column()
+
+ col = split.column()
col.prop(rd, "ffmpeg_gopsize")
split = layout.split()
@@ -416,8 +430,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col.prop(rd, "ffmpeg_maxrate", text="Maximum")
col.prop(rd, "ffmpeg_buffersize", text="Buffer")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "ffmpeg_autosplit")
col.label(text="Mux:")
@@ -427,7 +440,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
# Audio:
sub = layout.column()
- if rd.ffmpeg_format not in ('MP3'):
+ if rd.ffmpeg_format not in ('MP3', ):
sub.prop(rd, "ffmpeg_audio_codec", text="Audio Codec")
sub.separator()
@@ -438,26 +451,24 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col.prop(rd, "ffmpeg_audio_bitrate")
col.prop(rd, "ffmpeg_audio_mixrate")
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "ffmpeg_audio_volume", slider=True)
-class RENDER_PT_antialiasing(RenderButtonsPanel):
+class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Anti-Aliasing"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
rd = context.scene.render
- self.layout.prop(rd, "antialiasing", text="")
+ self.layout.prop(rd, "use_antialiasing", text="")
def draw(self, context):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
- layout.active = rd.antialiasing
+ layout.active = rd.use_antialiasing
split = layout.split()
@@ -465,35 +476,34 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
col.row().prop(rd, "antialiasing_samples", expand=True)
sub = col.row()
sub.enabled = not rd.use_border
- sub.prop(rd, "full_sample")
+ sub.prop(rd, "use_full_sample")
- if wide_ui:
- col = split.column()
- col.prop(rd, "pixel_filter", text="")
+ col = split.column()
+ col.prop(rd, "pixel_filter_type", text="")
col.prop(rd, "filter_size", text="Size")
-class RENDER_PT_motion_blur(RenderButtonsPanel):
+class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Full Sample Motion Blur"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
rd = context.scene.render
- self.layout.prop(rd, "motion_blur", text="")
+ self.layout.prop(rd, "use_motion_blur", text="")
def draw(self, context):
layout = self.layout
rd = context.scene.render
- layout.active = rd.motion_blur
+ layout.active = rd.use_motion_blur
row = layout.row()
row.prop(rd, "motion_blur_samples")
+ row.prop(rd, "motion_blur_shutter")
-
-class RENDER_PT_dimensions(RenderButtonsPanel):
+class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Dimensions"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -502,12 +512,10 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
scene = context.scene
rd = scene.render
- wide_ui = context.region.width > narrowui
- row = layout.row().split()
- sub = row.row(align=True).split(percentage=0.75)
- sub.menu("RENDER_MT_presets", text="Presets")
- sub.operator("render.preset_add", text="Add")
+ row = layout.row(align=True)
+ row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
+ row.operator("render.preset_add", text="", icon="ZOOMIN")
split = layout.split()
@@ -526,10 +534,9 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
row.prop(rd, "use_border", text="Border")
sub = row.row()
sub.active = rd.use_border
- sub.prop(rd, "crop_to_border", text="Crop")
+ sub.prop(rd, "use_crop_to_border", text="Crop")
- if wide_ui:
- col = split.column()
+ col = split.column()
sub = col.column(align=True)
sub.label(text="Frame Range:")
sub.prop(scene, "frame_start", text="Start")
@@ -541,126 +548,95 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
sub.prop(rd, "fps_base", text="/")
-class RENDER_PT_stamp(RenderButtonsPanel):
+class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Stamp"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
rd = context.scene.render
- self.layout.prop(rd, "render_stamp", text="")
+ self.layout.prop(rd, "use_stamp", text="")
def draw(self, context):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
- layout.active = rd.render_stamp
+ layout.active = rd.use_stamp
split = layout.split()
col = split.column()
- col.prop(rd, "stamp_time", text="Time")
- col.prop(rd, "stamp_date", text="Date")
- col.prop(rd, "stamp_render_time", text="RenderTime")
- col.prop(rd, "stamp_frame", text="Frame")
- col.prop(rd, "stamp_scene", text="Scene")
- col.prop(rd, "stamp_camera", text="Camera")
- col.prop(rd, "stamp_filename", text="Filename")
- col.prop(rd, "stamp_marker", text="Marker")
- col.prop(rd, "stamp_sequencer_strip", text="Seq. Strip")
+ col.prop(rd, "use_stamp_time", text="Time")
+ col.prop(rd, "use_stamp_date", text="Date")
+ col.prop(rd, "use_stamp_render_time", text="RenderTime")
+ col.prop(rd, "use_stamp_frame", text="Frame")
+ col.prop(rd, "use_stamp_scene", text="Scene")
+ col.prop(rd, "use_stamp_camera", text="Camera")
+ col.prop(rd, "use_stamp_filename", text="Filename")
+ col.prop(rd, "use_stamp_marker", text="Marker")
+ col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
- if wide_ui:
- col = split.column()
- col.active = rd.render_stamp
+ col = split.column()
+ col.active = rd.use_stamp
col.prop(rd, "stamp_foreground", slider=True)
col.prop(rd, "stamp_background", slider=True)
col.separator()
col.prop(rd, "stamp_font_size", text="Font Size")
row = layout.split(percentage=0.2)
- row.prop(rd, "stamp_note", text="Note")
+ row.prop(rd, "use_stamp_note", text="Note")
sub = row.row()
- sub.active = rd.stamp_note
+ sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="")
-class RENDER_PT_bake(RenderButtonsPanel):
+class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Bake"
- bl_default_closed = True
+ bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
layout.operator("object.bake_image", icon='RENDER_STILL')
- if wide_ui:
- layout.prop(rd, "bake_type")
- else:
- layout.prop(rd, "bake_type", text="")
+ layout.prop(rd, "bake_type")
if rd.bake_type == 'NORMALS':
- if wide_ui:
- layout.prop(rd, "bake_normal_space")
- else:
- layout.prop(rd, "bake_normal_space", text="")
+ layout.prop(rd, "bake_normal_space")
elif rd.bake_type in ('DISPLACEMENT', 'AO'):
- layout.prop(rd, "bake_normalized")
+ layout.prop(rd, "use_bake_normalize")
# col.prop(rd, "bake_aa_mode")
- # col.prop(rd, "bake_enable_aa")
+ # col.prop(rd, "use_bake_antialiasing")
layout.separator()
split = layout.split()
col = split.column()
- col.prop(rd, "bake_clear")
+ col.prop(rd, "use_bake_clear")
col.prop(rd, "bake_margin")
col.prop(rd, "bake_quad_split", text="Split")
- if wide_ui:
- col = split.column()
- col.prop(rd, "bake_active")
+ col = split.column()
+ col.prop(rd, "use_bake_selected_to_active")
sub = col.column()
- sub.active = rd.bake_active
+ sub.active = rd.use_bake_selected_to_active
sub.prop(rd, "bake_distance")
sub.prop(rd, "bake_bias")
-classes = [
- RENDER_MT_presets,
- RENDER_MT_ffmpeg_presets,
- RENDER_PT_render,
- RENDER_PT_layers,
- RENDER_PT_dimensions,
- RENDER_PT_antialiasing,
- RENDER_PT_motion_blur,
- RENDER_PT_shading,
- RENDER_PT_output,
- RENDER_PT_encoding,
- RENDER_PT_performance,
- RENDER_PT_post_processing,
- RENDER_PT_stamp,
- RENDER_PT_bake]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
- unregister = bpy.types.unregister
- for cls in classes:
- unregister(cls)
+ pass
if __name__ == "__main__":
register()