diff options
-rw-r--r-- | release/ui/buttons_data_camera.py | 30 | ||||
-rw-r--r-- | release/ui/buttons_data_lamp.py | 15 | ||||
-rw-r--r-- | release/ui/buttons_scene.py | 111 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_lamp.c | 11 |
4 files changed, 91 insertions, 76 deletions
diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py index 27f63669cf7..2fac272ada3 100644 --- a/release/ui/buttons_data_camera.py +++ b/release/ui/buttons_data_camera.py @@ -33,14 +33,18 @@ class DATA_PT_cameralens(DataButtonsPanel): row.itemR(cam, "lens_unit", text="") elif cam.type == 'ORTHO': row.itemR(cam, "ortho_scale") + + split = layout.split() - flow = layout.column_flow() - flow.itemL(text="Shift:") - flow.itemR(cam, "shift_x", text="X") - flow.itemR(cam, "shift_y", text="Y") - flow.itemL(text="Clipping:") - flow.itemR(cam, "clip_start", text="Start") - flow.itemR(cam, "clip_end", text="End") + sub = split.column(align=True) + sub.itemL(text="Shift:") + sub.itemR(cam, "shift_x", text="X") + sub.itemR(cam, "shift_y", text="Y") + + sub = split.column(align=True) + sub.itemL(text="Clipping:") + sub.itemR(cam, "clip_start", text="Start") + sub.itemR(cam, "clip_end", text="End") row = layout.row() row.itemR(cam, "dof_object") @@ -64,14 +68,12 @@ class DATA_PT_cameradisplay(DataButtonsPanel): sub.itemR(cam, "show_mist", text="Mist") sub.itemR(cam, "show_title_safe", text="Title Safe") sub.itemR(cam, "show_name", text="Name") - - sub = split.column() - subsub = sub.box() - subsub.itemR(cam, "show_passepartout", text="Passepartout") + sub.itemR(cam, "show_passepartout", text="Passepartout") if (cam.show_passepartout): - subsub.itemR(cam, "passepartout_alpha", text="Alpha") - row = sub.row() - row.itemR(cam, "draw_size", text="Size") + sub.itemR(cam, "passepartout_alpha", text="Alpha") + + sub = split.column() + sub.itemR(cam, "draw_size", text="Size") bpy.types.register(DATA_PT_cameralens) bpy.types.register(DATA_PT_cameradisplay) diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py index da2701a43f2..9b64748032d 100644 --- a/release/ui/buttons_data_lamp.py +++ b/release/ui/buttons_data_lamp.py @@ -27,10 +27,10 @@ class DATA_PT_lamp(DataButtonsPanel): split = layout.split() sub = split.column() + sub.itemR(lamp, "color") sub.itemR(lamp, "energy") sub.itemR(lamp, "distance") sub.itemR(lamp, "negative") - sub.itemR(lamp, "color") sub = split.column() sub.itemR(lamp, "layer", text="This Layer Only") @@ -124,11 +124,11 @@ class DATA_PT_shadow(DataButtonsPanel): split = layout.split() sub = split.column() - sub.itemR(lamp, "only_shadow") - sub.itemR(lamp, "shadow_layer") + sub.itemR(lamp, "shadow_color") sub = split.column() - sub.itemR(lamp, "shadow_color") + sub.itemR(lamp, "shadow_layer", text="This Layer Only") + sub.itemR(lamp, "only_shadow") if lamp.shadow_method == 'RAY_SHADOW': @@ -136,7 +136,7 @@ class DATA_PT_shadow(DataButtonsPanel): col.itemL(text="Sampling:") col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True) - if lamp.type in ('POINT', 'SUN', 'SPOT') and lamp.shadow_ray_sampling_method in ('CONSTANT_QMC', 'ADAPTIVE_QMC'): + if lamp.type in ('POINT', 'SUN', 'SPOT'): flow = layout.column_flow() flow.itemR(lamp, "shadow_soft_size", text="Soft Size") flow.itemR(lamp, "shadow_ray_samples", text="Samples") @@ -161,9 +161,10 @@ class DATA_PT_shadow(DataButtonsPanel): if lamp.shadow_buffer_type in ('REGULAR', 'HALFWAY'): flow = layout.column_flow() flow.itemL(text="Sample Buffers:") - flow.row().itemR(lamp, "shadow_sample_buffers", expand=True) + flow.itemR(lamp, "shadow_sample_buffers", text="") flow.itemL(text="Filter Type:") - flow.row().itemR(lamp, "shadow_filter_type", expand=True) + flow.itemR(lamp, "shadow_filter_type", text="") + flow = layout.column_flow() flow.itemR(lamp, "shadow_buffer_size", text="Size") flow.itemR(lamp, "shadow_buffer_samples", text="Samples") diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index 170c94cdef1..7644ad39f23 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -22,13 +22,13 @@ class RENDER_PT_shading(RenderButtonsPanel): sub.itemR(rd, "render_sss", text="SSS") sub.itemR(rd, "render_envmaps", text="EnvMap") sub.itemR(rd, "render_radiosity", text="Radio") + sub.itemR(rd, "render_raytracing", text="Ray Tracing") + if (rd.render_raytracing): + sub.itemR(rd, "octree_resolution", text="Octree") sub = split.column() - subsub = sub.box() - subsub.itemR(rd, "render_raytracing", text="Ray Tracing") - if (rd.render_raytracing): - subsub.itemR(rd, "octree_resolution", text="Octree") - sub.itemR(rd, "alpha_mode") + sub.itemL(text="Alpha Mode:") + sub.itemR(rd, "alpha_mode", expand=True) class RENDER_PT_image(RenderButtonsPanel): __label__ = "Image" @@ -38,12 +38,16 @@ class RENDER_PT_image(RenderButtonsPanel): layout = self.layout rd = scene.render_data - - flow = layout.column_flow() - flow.itemR(rd, "resolution_x", text="SizeX") - flow.itemR(rd, "resolution_y", text="SizeY") - flow.itemR(rd, "pixel_aspect_x", text="AspX") - flow.itemR(rd, "pixel_aspect_y", text="AspY") + + split = layout.split() + + sub = split.column(align=True) + sub.itemR(rd, "resolution_x", text="SizeX") + sub.itemR(rd, "resolution_y", text="SizeY") + + sub = split.column(align=True) + sub.itemR(rd, "pixel_aspect_x", text="AspX") + sub.itemR(rd, "pixel_aspect_y", text="AspY") box = layout.box() box.itemR(rd, "output_path") @@ -71,9 +75,9 @@ class RENDER_PT_antialiasing(RenderButtonsPanel): row = layout.row() row.itemL(text="Samples:") row.itemR(rd, "antialiasing_samples", expand=True) - row = layout.row() + row = layout.row(align=True) row.itemR(rd, "pixel_filter") - row.itemR(rd, "filter_size") + row.itemR(rd, "filter_size", text="Size") row = layout.row() row.itemR(rd, "save_buffers") @@ -92,16 +96,20 @@ class RENDER_PT_render(RenderButtonsPanel): row = layout.row() row.itemO("SCREEN_OT_render", text="RENDER", icon=0) # ICON_SCENE row.item_booleanO("SCREEN_OT_render", "anim", True, text="ANIM", icon=0) - - row = layout.row() - row.itemR(scene, "start_frame", text="Start") - row.itemR(rd, "fps") - row.itemR(scene, "current_frame", text="Frame") - row = layout.row() - row.itemR(scene, "end_frame", text="End") - row.itemR(rd, "fps_base",text="/") - row.itemR(scene, "frame_step", text="Step") + split = layout.split() + + sub = split.column(align=True) + sub.itemR(scene, "start_frame", text="Start") + sub.itemR(scene, "end_frame", text="End") + + sub = split.column(align=True) + sub.itemR(rd, "fps") + sub.itemR(rd, "fps_base",text="/") + + sub = split.column(align=True) + sub.itemR(scene, "current_frame", text="Frame") + sub.itemR(scene, "frame_step", text="Step") row = layout.row() row.itemR(rd, "do_composite") @@ -109,47 +117,46 @@ class RENDER_PT_render(RenderButtonsPanel): row = layout.row() row.itemL(text="General:") + + split = layout.split() + + sub = split.column() + sub.itemR(rd, "resolution_percentage", text="Size") - flow = layout.column_flow() - flow.itemR(rd, "resolution_percentage", text="Size ") - flow.itemR(rd, "dither_intensity") - flow.itemR(rd, "parts_x") - flow.itemR(rd, "parts_y") + sub = split.column(align=True) + sub.itemR(rd, "parts_x") + sub.itemR(rd, "parts_y") split = layout.split() sub = split.column() - subsub = sub.box() - subsub.itemL(text="Threads Mode:") - subsub.itemR(rd, "threads_mode", expand=True) + sub.itemL(text="Threads Mode:") + sub.itemR(rd, "threads_mode", expand=True) if rd.threads_mode == 'THREADS_FIXED': - subsub.itemR(rd, "threads") - - subsub = sub.box() - subsub.itemL(text="Distributed Rendering:") - subsub.itemR(rd, "placeholders") - subsub.itemR(rd, "no_overwrite") - subsub = sub.box() - subsub.itemR(rd, "fields", text="Fields") + sub.itemR(rd, "threads") + + sub.itemL(text="Distributed Rendering:") + sub.itemR(rd, "placeholders") + sub.itemR(rd, "no_overwrite") + + sub.itemR(rd, "fields", text="Fields") if rd.fields: - subsub.itemR(rd, "fields_still", text="Still") - subsub.itemR(rd, "field_order", text="Order") + sub.itemR(rd, "fields_still", text="Still") + sub.itemR(rd, "field_order", text="Order") sub = split.column() - subsub = sub.box() - subsub.itemL(text="Extra:") - subsub.itemR(rd, "panorama") - subsub.itemR(rd, "backbuf") - subsub.itemR(rd, "free_image_textures") - - subsub = sub.box() - subsub.itemL(text="Border:") - subsub.itemR(rd, "border", text="Border Render") + sub.itemL(text="Extra:") + sub.itemR(rd, "panorama") + sub.itemR(rd, "backbuf") + sub.itemR(rd, "free_image_textures") + sub.itemR(rd, "dither_intensity") + + sub.itemL(text="Border:") + sub.itemR(rd, "border", text="Border Render") if rd.border: - subsub.itemR(rd, "crop_to_border") + sub.itemR(rd, "crop_to_border") bpy.types.register(RENDER_PT_render) bpy.types.register(RENDER_PT_antialiasing) bpy.types.register(RENDER_PT_shading) -bpy.types.register(RENDER_PT_image) - +bpy.types.register(RENDER_PT_image)
\ No newline at end of file diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 333c356acbc..b3baac88702 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -372,10 +372,15 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) {0, NULL, NULL, NULL}}; static EnumPropertyItem prop_ray_sampling_method_items[] = { - {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""}, {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""}, {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""}, {0, NULL, NULL, NULL}}; + + static EnumPropertyItem prop_spot_ray_sampling_method_items[] = { + {LA_SAMP_HALTON, "ADAPTIVE_QMC", "Adaptive QMC", ""}, + {LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", "Constant QMC", ""}, + {LA_SAMP_CONSTANT, "CONSTANT_JITTERED", "Constant Jittered", ""}, + {0, NULL, NULL, NULL}}; prop= RNA_def_property(srna, "shadow_method", PROP_ENUM, PROP_NONE); @@ -397,7 +402,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area) prop= RNA_def_property(srna, "shadow_ray_sampling_method", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ray_samp_method"); - RNA_def_property_enum_items(prop, prop_ray_sampling_method_items); + RNA_def_property_enum_items(prop, (area)? prop_spot_ray_sampling_method_items: prop_ray_sampling_method_items); RNA_def_property_ui_text(prop, "Shadow Ray Sampling Method", "Method for generating shadow samples: Adaptive QMC is fastest, Constant QMC is less noisy but slower."); RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL); @@ -508,8 +513,8 @@ static void rna_def_spot_lamp(BlenderRNA *brna) static EnumPropertyItem prop_shadbuftype_items[] = { {LA_SHADBUF_REGULAR , "REGULAR", "Classical", "Classic shadow buffer."}, - {LA_SHADBUF_IRREGULAR, "IRREGULAR", "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing."}, {LA_SHADBUF_HALFWAY, "HALFWAY", "Classic-Halfway", "Regular buffer, averaging the closest and 2nd closest Z value to reducing bias artifaces."}, + {LA_SHADBUF_IRREGULAR, "IRREGULAR", "Irregular", "Irregular buffer produces sharp shadow always, but it doesn't show up for raytracing."}, {0, NULL, NULL, NULL}}; static EnumPropertyItem prop_shadbuffiltertype_items[] = { |