diff options
author | Thomas Dinges <blender@dingto.org> | 2009-05-24 16:37:55 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-05-24 16:37:55 +0400 |
commit | ef01c5bf0abda3893b3a7f075a3ab20f164d5081 (patch) | |
tree | 0e9f69618ca5f89572edf0199149c2cec845a96e | |
parent | 3956a10deb575114713462dbb00bf48dd1451497 (diff) |
2.5 Buttons Code:
* Code Cleanup.
* Tiny layout changes.
* Added proper context for bone, curve, mesh and text objects.
* Fixed Sun/Sky context.
-rw-r--r-- | release/ui/buttons_data_armature.py | 17 | ||||
-rw-r--r-- | release/ui/buttons_data_bone.py | 9 | ||||
-rw-r--r-- | release/ui/buttons_data_camera.py | 12 | ||||
-rw-r--r-- | release/ui/buttons_data_curve.py | 42 | ||||
-rw-r--r-- | release/ui/buttons_data_empty.py | 5 | ||||
-rw-r--r-- | release/ui/buttons_data_lamp.py | 20 | ||||
-rw-r--r-- | release/ui/buttons_data_lattice.py | 5 | ||||
-rw-r--r-- | release/ui/buttons_data_mesh.py | 9 | ||||
-rw-r--r-- | release/ui/buttons_data_modifier.py | 6 | ||||
-rw-r--r-- | release/ui/buttons_data_text.py | 48 | ||||
-rw-r--r-- | release/ui/buttons_material.py | 17 | ||||
-rw-r--r-- | release/ui/buttons_objects.py | 45 | ||||
-rw-r--r-- | release/ui/buttons_scene.py | 8 | ||||
-rw-r--r-- | release/ui/buttons_world.py | 24 |
14 files changed, 78 insertions, 189 deletions
diff --git a/release/ui/buttons_data_armature.py b/release/ui/buttons_data_armature.py index 2982ad52a6d..1d0043a5179 100644 --- a/release/ui/buttons_data_armature.py +++ b/release/ui/buttons_data_armature.py @@ -1,3 +1,4 @@ + import bpy class DataButtonsPanel(bpy.types.Panel): @@ -17,13 +18,11 @@ class DATA_PT_skeleton(DataButtonsPanel): arm = context.active_object.data layout = self.layout - row = layout.row() - row.itemR(arm, "rest_position") + layout.itemR(arm, "rest_position") split = layout.split() sub = split.column() - sub.itemL(text="Deform:") sub.itemR(arm, "deform_vertexgroups", text="Vertes Groups") sub.itemR(arm, "deform_envelope", text="Envelopes") @@ -38,7 +37,6 @@ class DATA_PT_skeleton(DataButtonsPanel): #sub.itemR(arm, "layer") #sub.itemR(arm, "layer_protection") - class DATA_PT_display(DataButtonsPanel): __idname__ = "DATA_PT_display" __label__ = "Display" @@ -59,7 +57,6 @@ class DATA_PT_display(DataButtonsPanel): sub.itemR(arm, "draw_custom_bone_shapes", text="Shapes") sub.itemR(arm, "draw_group_colors", text="Colors") - class DATA_PT_paths(DataButtonsPanel): __idname__ = "DATA_PT_paths" __label__ = "Paths" @@ -71,11 +68,10 @@ class DATA_PT_paths(DataButtonsPanel): split = layout.split() sub = split.column() - sub.itemR(arm, "paths_show_around_current_frame", text="Around Frame") if (arm.paths_show_around_current_frame): - sub.itemR(arm, "path_before_current", text="Before") - sub.itemR(arm, "path_after_current", text="After") + sub.itemR(arm, "path_before_current", text="Before") + sub.itemR(arm, "path_after_current", text="After") else: sub.itemR(arm, "path_start_frame", text="Start") sub.itemR(arm, "path_end_frame", text="End") @@ -89,7 +85,6 @@ class DATA_PT_paths(DataButtonsPanel): sub.itemR(arm, "paths_highlight_keyframes", text="Keyframes") sub.itemR(arm, "paths_show_keyframe_numbers", text="Keyframe Numbers") - class DATA_PT_ghost(DataButtonsPanel): __idname__ = "DATA_PT_ghost" __label__ = "Ghost" @@ -101,7 +96,6 @@ class DATA_PT_ghost(DataButtonsPanel): split = layout.split() sub = split.column() - sub.itemR(arm, "ghost_type", text="Scope") if arm.ghost_type == 'RANGE': sub.itemR(arm, "ghost_start_frame", text="Start") @@ -112,10 +106,9 @@ class DATA_PT_ghost(DataButtonsPanel): sub.itemR(arm, "ghost_size", text="Step") sub = split.column() - sub.itemR(arm, "ghost_only_selected", text="Selected Only") bpy.types.register(DATA_PT_skeleton) bpy.types.register(DATA_PT_display) bpy.types.register(DATA_PT_paths) -bpy.types.register(DATA_PT_ghost) +bpy.types.register(DATA_PT_ghost)
\ No newline at end of file diff --git a/release/ui/buttons_data_bone.py b/release/ui/buttons_data_bone.py index 6982b9beecb..ea9fc3639f1 100644 --- a/release/ui/buttons_data_bone.py +++ b/release/ui/buttons_data_bone.py @@ -15,7 +15,7 @@ class DATA_PT_bone(DataButtonsPanel): __label__ = "Bone" def draw(self, context): - bone = context.main.armatures[0].bones[0] + bone = context.active_object.data.bones[0] layout = self.layout split = layout.split() @@ -26,7 +26,6 @@ class DATA_PT_bone(DataButtonsPanel): sub.itemR(bone, "connected") sub.itemR(bone, "deform") - sub.itemL(text="Inherit:") sub.itemR(bone, "hinge") sub.itemR(bone, "inherit_scale") @@ -48,20 +47,18 @@ class DATA_PT_bone(DataButtonsPanel): sub.itemR(bone, "bbone_in", text="Ease In") sub.itemR(bone, "bbone_out", text="Ease Out") - sub.itemR(bone, "cyclic_offset") - class DATA_PT_constraints(DataButtonsPanel): __idname__ = "DATA_PT_constraints" __label__ = "Constraints" def draw(self, context): - bone = context.main.armatures[0].bones[0] + bone = context.active_object.data.bones[0] layout = self.layout split = layout.split() sub = split.column() bpy.types.register(DATA_PT_bone) -bpy.types.register(DATA_PT_constraints) +#bpy.types.register(DATA_PT_constraints)
\ No newline at end of file diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py index b41293758ea..9770fdaf8eb 100644 --- a/release/ui/buttons_data_camera.py +++ b/release/ui/buttons_data_camera.py @@ -18,19 +18,16 @@ class DATA_PT_cameralens(DataButtonsPanel): cam = context.active_object.data layout = self.layout - if not cam: - return - layout.itemR(cam, "type", expand=True) row = layout.row(align=True) if cam.type == 'PERSP': + row.itemR(cam, "lens_unit", text="") if cam.lens_unit == 'MILLIMETERS': row.itemR(cam, "lens", text="Angle") elif cam.lens_unit == 'DEGREES': row.itemR(cam, "angle") - row.itemR(cam, "lens_unit", text="") elif cam.type == 'ORTHO': row.itemR(cam, "ortho_scale") @@ -58,9 +55,6 @@ class DATA_PT_cameradisplay(DataButtonsPanel): cam = context.active_object.data layout = self.layout - if not cam: - return - split = layout.split() sub = split.column() @@ -76,6 +70,4 @@ class DATA_PT_cameradisplay(DataButtonsPanel): sub.itemR(cam, "draw_size", text="Size") bpy.types.register(DATA_PT_cameralens) -bpy.types.register(DATA_PT_cameradisplay) - - +bpy.types.register(DATA_PT_cameradisplay)
\ No newline at end of file diff --git a/release/ui/buttons_data_curve.py b/release/ui/buttons_data_curve.py index a51ce50b047..12a1fefd478 100644 --- a/release/ui/buttons_data_curve.py +++ b/release/ui/buttons_data_curve.py @@ -9,20 +9,16 @@ class DataButtonsPanel(bpy.types.Panel): def poll(self, context): ob = context.active_object return (ob and ob.type == 'CURVE') - class DATA_PT_shape_curve(DataButtonsPanel): __idname__ = "DATA_PT_shape_curve" __label__ = "Shape" def draw(self, context): - curve = context.main.curves[0] + curve = context.active_object.data layout = self.layout - if not curve: - return - row = layout.row() - row.itemR(curve, "curve_2d") + layout.itemR(curve, "curve_2d") split = layout.split() @@ -47,19 +43,14 @@ class DATA_PT_shape_curve(DataButtonsPanel): sub.itemL(text="NORMALS") sub.itemR(curve, "vertex_normal_flip") - class DATA_PT_geometry(DataButtonsPanel): __idname__ = "DATA_PT_geometry" __label__ = "Geometry" def draw(self, context): - curve = context.main.curves[0] + curve = context.active_object.data layout = self.layout - if not curve: - return - - split = layout.split() sub = split.column() @@ -67,33 +58,25 @@ class DATA_PT_geometry(DataButtonsPanel): sub.itemR(curve, "width") sub.itemR(curve, "extrude") sub.itemR(curve, "taper_object") + sub = split.column() sub.itemL(text="Bevel:") sub.itemR(curve, "bevel_depth", text="Depth") sub.itemR(curve, "bevel_resolution", text="Resolution") sub.itemR(curve, "bevel_object") - - - class DATA_PT_pathanim(DataButtonsPanel): __idname__ = "DATA_PT_pathanim" __label__ = "Path Animation" def draw(self, context): - curve = context.main.curves[0] + curve = context.active_object.data layout = self.layout - if not curve: - return - - - split = layout.split() - sub = split.column(1) - sub.itemR(curve, "path", text="Enable") - + layout.itemR(curve, "path", text="Enable") split = layout.split() + sub = split.column() sub.itemR(curve, "path_length", text="Frames") sub.itemR(curve, "follow") @@ -101,19 +84,15 @@ class DATA_PT_pathanim(DataButtonsPanel): sub = split.column() sub.itemR(curve, "stretch") sub.itemR(curve, "offset_path_distance", text="Offset Children") - - + class DATA_PT_current_curve(DataButtonsPanel): __idname__ = "DATA_PT_current_curve" __label__ = "Current Curve" def draw(self, context): - currentcurve = context.main.curves[0].curves[0] + currentcurve = context.active_object.data.curves[0] layout = self.layout - if not currentcurve: - return - split = layout.split() sub = split.column() @@ -129,6 +108,7 @@ class DATA_PT_current_curve(DataButtonsPanel): sub.itemL(text="Endpoints:") sub.itemR(currentcurve, "endpoint_u", text="U") sub.itemR(currentcurve, "endpoint_v", text="V") + sub = split.column() sub.itemL(text="Bezier:") sub.itemR(currentcurve, "bezier_u", text="U") @@ -144,4 +124,4 @@ class DATA_PT_current_curve(DataButtonsPanel): bpy.types.register(DATA_PT_shape_curve) bpy.types.register(DATA_PT_geometry) bpy.types.register(DATA_PT_pathanim) -bpy.types.register(DATA_PT_current_curve) +bpy.types.register(DATA_PT_current_curve)
\ No newline at end of file diff --git a/release/ui/buttons_data_empty.py b/release/ui/buttons_data_empty.py index 5fe1e943f1f..94caa4ed700 100644 --- a/release/ui/buttons_data_empty.py +++ b/release/ui/buttons_data_empty.py @@ -18,10 +18,7 @@ class DATA_PT_empty(DataButtonsPanel): ob = context.active_object layout = self.layout - if not ob: - return - layout.itemR(ob, "empty_draw_type") layout.itemR(ob, "empty_draw_size") -bpy.types.register(DATA_PT_empty) +bpy.types.register(DATA_PT_empty)
\ No newline at end of file diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py index e23215da931..157a89eb2c7 100644 --- a/release/ui/buttons_data_lamp.py +++ b/release/ui/buttons_data_lamp.py @@ -18,11 +18,7 @@ class DATA_PT_lamp(DataButtonsPanel): lamp = context.active_object.data layout = self.layout - if not lamp: - return - - row = layout.row() - row.itemR(lamp, "type", expand=True) + layout.itemR(lamp, "type", expand=True) split = layout.split() @@ -64,12 +60,9 @@ class DATA_PT_sunsky(DataButtonsPanel): return (ob.type == 'LAMP' and ob.data.type == 'SUN') def draw(self, context): - lamp = context.active_object.data + lamp = context.active_object.data.sky layout = self.layout - if not lamp: - return - row = layout.row() row.itemR(lamp, "sky") row.itemR(lamp, "atmosphere") @@ -86,6 +79,7 @@ class DATA_PT_sunsky(DataButtonsPanel): sub.itemR(lamp, "sky_blend") sub.itemR(lamp, "sky_color_space", text="Color Space") sub.itemR(lamp, "sky_exposure") + sub = col.column() sub.itemR(lamp, "horizon_brightness", text="Hor Bright") sub.itemR(lamp, "spread", text="Hor Spread") @@ -112,9 +106,6 @@ class DATA_PT_shadow(DataButtonsPanel): lamp = context.active_object.data layout = self.layout - if not lamp: - return - layout.itemR(lamp, "shadow_method", expand=True) if lamp.shadow_method in ('BUFFER_SHADOW', 'RAY_SHADOW'): @@ -194,9 +185,6 @@ class DATA_PT_spot(DataButtonsPanel): lamp = context.active_object.data layout = self.layout - if not lamp: - return - split = layout.split() sub = split.column() @@ -214,4 +202,4 @@ class DATA_PT_spot(DataButtonsPanel): bpy.types.register(DATA_PT_lamp) bpy.types.register(DATA_PT_shadow) bpy.types.register(DATA_PT_sunsky) -bpy.types.register(DATA_PT_spot) +bpy.types.register(DATA_PT_spot)
\ No newline at end of file diff --git a/release/ui/buttons_data_lattice.py b/release/ui/buttons_data_lattice.py index c7d5b9cfe4a..4bcff9f5389 100644 --- a/release/ui/buttons_data_lattice.py +++ b/release/ui/buttons_data_lattice.py @@ -18,9 +18,6 @@ class DATA_PT_lattice(DataButtonsPanel): lat = context.active_object.data layout = self.layout - if not lat: - return - row = layout.row() row.itemR(lat, "points_u") row.itemR(lat, "interpolation_type_u", expand=True) @@ -37,4 +34,4 @@ class DATA_PT_lattice(DataButtonsPanel): row.itemR(lat, "outside") row.itemR(lat, "shape_keys") -bpy.types.register(DATA_PT_lattice) +bpy.types.register(DATA_PT_lattice)
\ No newline at end of file diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index e52bc8cb957..44a48dcc534 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -9,18 +9,15 @@ class DataButtonsPanel(bpy.types.Panel): def poll(self, context): ob = context.active_object return (ob and ob.type == 'MESH') - class DATA_PT_surface(DataButtonsPanel): __idname__ = "DATA_PT_surface" __label__ = "Surface" def draw(self, context): - mesh = context.main.meshes[0] + mesh = context.active_object.data layout = self.layout - if not mesh: - return split = layout.split() sub = split.column() @@ -29,7 +26,7 @@ class DATA_PT_surface(DataButtonsPanel): sub = split.column() sub.itemR(mesh, "vertex_normal_flip") sub.itemR(mesh, "double_sided") - row = layout.row() - row.itemR(mesh, "texco_mesh") + + layout.itemR(mesh, "texco_mesh") bpy.types.register(DATA_PT_surface)
\ No newline at end of file diff --git a/release/ui/buttons_data_modifier.py b/release/ui/buttons_data_modifier.py index 7167727ea53..d60df5df528 100644 --- a/release/ui/buttons_data_modifier.py +++ b/release/ui/buttons_data_modifier.py @@ -18,9 +18,6 @@ class DATA_PT_modifiers(DataButtonsPanel): ob = context.active_object layout = self.layout - if not ob: - return - row = layout.row() row.item_menu_enumO("OBJECT_OT_modifier_add", "type") row.itemL(); @@ -383,5 +380,4 @@ class DATA_PT_modifiers(DataButtonsPanel): col.itemR(md, "width", slider=True) col.itemR(md, "narrowness", slider=True) -bpy.types.register(DATA_PT_modifiers) - +bpy.types.register(DATA_PT_modifiers)
\ No newline at end of file diff --git a/release/ui/buttons_data_text.py b/release/ui/buttons_data_text.py index 8db1d0316a9..96147270209 100644 --- a/release/ui/buttons_data_text.py +++ b/release/ui/buttons_data_text.py @@ -15,13 +15,10 @@ class DATA_PT_shape_text(DataButtonsPanel): __label__ = "Shape" def draw(self, context): - curve = context.main.curves[0] + curve = context.active_object.data layout = self.layout - if not curve: - return - row = layout.row() - row.itemR(curve, "curve_2d") + layout.itemR(curve, "curve_2d") split = layout.split() @@ -44,34 +41,29 @@ class DATA_PT_shape_text(DataButtonsPanel): sub.itemL(text="Display:") sub.itemR(curve, "fast") - class DATA_PT_font(DataButtonsPanel): __idname__ = "DATA_PT_font" __label__ = "Font" def draw(self, context): - text = context.main.curves[0] + text = context.active_object.data layout = self.layout - if not text: - return - layout.row() layout.itemR(text, "font") split = layout.split() sub = split.column() - # sub.itemR(text, "style") - sub.itemR(text, "bold") - sub.itemR(text, "italic") - sub.itemR(text, "underline") + # sub.itemR(text, "bold") + # sub.itemR(text, "italic") + # sub.itemR(text, "underline") + # ToDo: These settings are in a sub struct (Edit Format). sub.itemR(text, "text_size") sub.itemR(text, "shear") sub = split.column() - sub.itemR(text, "text_on_curve") sub.itemR(text, "family") sub.itemL(text="Underline:") @@ -80,30 +72,20 @@ class DATA_PT_font(DataButtonsPanel): # sub.itemR(text, "edit_format") - - - - class DATA_PT_paragraph(DataButtonsPanel): __idname__ = "DATA_PT_paragraph" __label__ = "Paragraph" def draw(self, context): - text = context.main.curves[0] + text = context.active_object.data layout = self.layout - if not text: - return - - row = layout.row() - row.itemL(text="Align:") - row = layout.row() - row.itemR(text, "spacemode", expand=True) + layout.itemL(text="Align:") + layout.itemR(text, "spacemode", expand=True) split = layout.split() sub = split.column() - sub.itemL(text="Spacing:") sub.itemR(text, "spacing", text="Character") sub.itemR(text, "word_spacing", text="Word") @@ -120,16 +102,10 @@ class DATA_PT_textboxes(DataButtonsPanel): __label__ = "Text Boxes" def draw(self, context): - text = context.main.curves[0] + text = context.active_object.data layout = self.layout - if not text: - return - - - bpy.types.register(DATA_PT_shape_text) bpy.types.register(DATA_PT_font) bpy.types.register(DATA_PT_paragraph) -bpy.types.register(DATA_PT_textboxes) - +#bpy.types.register(DATA_PT_textboxes)
\ No newline at end of file diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py index 63e1624d6db..a468a55efba 100644 --- a/release/ui/buttons_material.py +++ b/release/ui/buttons_material.py @@ -18,16 +18,14 @@ class MATERIAL_PT_material(MaterialButtonsPanel): layout = self.layout mat = context.active_object.active_material - row = layout.row() - row.itemR(mat, "type", expand=True) + layout.itemR(mat, "type", expand=True) row = layout.row() row.column().itemR(mat, "diffuse_color") row.column().itemR(mat, "specular_color") row.column().itemR(mat, "mirror_color") - row = layout.row() - row.itemR(mat, "alpha", slider=True) + layout.itemR(mat, "alpha", slider=True) class MATERIAL_PT_sss(MaterialButtonsPanel): __idname__= "MATERIAL_PT_sss" @@ -93,10 +91,11 @@ class MATERIAL_PT_raymir(MaterialButtonsPanel): sub.itemR(raym, "gloss_samples") sub.itemR(raym, "gloss_anisotropic", slider=True) - flow = layout.column_flow() - flow.itemR(raym, "distance", text="Max Dist") - flow.itemR(raym, "depth") - flow.itemR(raym, "fade_to") + row = layout.row() + row.itemR(raym, "distance", text="Max Dist") + row.itemR(raym, "depth") + + layout.itemR(raym, "fade_to") class MATERIAL_PT_raytransp(MaterialButtonsPanel): __idname__= "MATERIAL_PT_raytransp" @@ -193,4 +192,4 @@ bpy.types.register(MATERIAL_PT_material) bpy.types.register(MATERIAL_PT_raymir) bpy.types.register(MATERIAL_PT_raytransp) bpy.types.register(MATERIAL_PT_sss) -bpy.types.register(MATERIAL_PT_halo) +bpy.types.register(MATERIAL_PT_halo)
\ No newline at end of file diff --git a/release/ui/buttons_objects.py b/release/ui/buttons_objects.py index c0e1f439df8..8f02a015eac 100644 --- a/release/ui/buttons_objects.py +++ b/release/ui/buttons_objects.py @@ -77,10 +77,9 @@ class OBJECT_PT_duplication(ObjectButtonsPanel): ob = context.active_object layout = self.layout - row = layout.row() - row.itemR(ob, "dupli_type", expand=True) + layout.itemR(ob, "dupli_type", expand=True) - if ob.dupli_type == "FRAMES": + if ob.dupli_type == 'FRAMES': split = layout.split() sub = split.column(align=True) @@ -91,29 +90,18 @@ class OBJECT_PT_duplication(ObjectButtonsPanel): sub.itemR(ob, "dupli_frames_on", text="On") sub.itemR(ob, "dupli_frames_off", text="Off") - split = layout.split() - sub = split.column() - sub.itemR(ob, "dupli_frames_no_speed", text="No Speed") + layout.itemR(ob, "dupli_frames_no_speed", text="No Speed") - elif ob.dupli_type == "VERTS": - split = layout.split() - - sub = split.column(align=True) - sub.itemR(ob, "dupli_verts_rotation", text="Rotation") + elif ob.dupli_type == 'VERTS': + layout.itemR(ob, "dupli_verts_rotation", text="Rotation") - elif ob.dupli_type == "FACES": - split = layout.split() - - sub = split.column() - sub.itemR(ob, "dupli_faces_scale", text="Scale") - sub = split.column() - sub.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale") + elif ob.dupli_type == 'FACES': + row = layout.row() + row.itemR(ob, "dupli_faces_scale", text="Scale") + row.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale") - elif ob.dupli_type == "GROUP": - split = layout.split() - - sub = split.column(align=True) - sub.itemR(ob, "dupli_group", text="Group") + elif ob.dupli_type == 'GROUP': + layout.itemR(ob, "dupli_group", text="Group") class OBJECT_PT_animation(ObjectButtonsPanel): __idname__ = "OBJECT_PT_animation" @@ -122,10 +110,10 @@ class OBJECT_PT_animation(ObjectButtonsPanel): def draw(self, context): ob = context.active_object layout = self.layout - - row = layout.row() - sub = row.column() + split = layout.split() + + sub = split.column() sub.itemL(text="Time Offset:") sub.itemR(ob, "time_offset_edit", text="Edit") sub.itemR(ob, "time_offset_particle", text="Particle") @@ -133,7 +121,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel): sub.itemR(ob, "slow_parent") sub.itemR(ob, "time_offset", text="Offset") - sub = row.column() + sub = split.column() sub.itemL(text="Tracking:") sub.itemR(ob, "track_axis", text="Axis") sub.itemR(ob, "up_axis", text="Up Axis") @@ -143,5 +131,4 @@ bpy.types.register(OBJECT_PT_transform) bpy.types.register(OBJECT_PT_groups) bpy.types.register(OBJECT_PT_display) bpy.types.register(OBJECT_PT_duplication) -bpy.types.register(OBJECT_PT_animation) - +bpy.types.register(OBJECT_PT_animation)
\ No newline at end of file diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index 9682eabbccf..a9f25fd625d 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -37,8 +37,7 @@ class RENDER_PT_output(RenderButtonsPanel): rd = scene.render_data - col = layout.column() - col.itemR(rd, "output_path") + layout.itemR(rd, "output_path") split = layout.split() @@ -65,8 +64,7 @@ class RENDER_PT_output(RenderButtonsPanel): if rd.fields: sub.itemR(rd, "fields_still", text="Still") sub.row().itemR(rd, "field_order", expand=True) - - + class RENDER_PT_antialiasing(RenderButtonsPanel): __label__ = "Anti-Aliasing" @@ -174,4 +172,4 @@ bpy.types.register(RENDER_PT_render) bpy.types.register(RENDER_PT_dimensions) bpy.types.register(RENDER_PT_antialiasing) bpy.types.register(RENDER_PT_shading) -bpy.types.register(RENDER_PT_output) +bpy.types.register(RENDER_PT_output)
\ No newline at end of file diff --git a/release/ui/buttons_world.py b/release/ui/buttons_world.py index 0bcd466366a..401fbcb0c22 100644 --- a/release/ui/buttons_world.py +++ b/release/ui/buttons_world.py @@ -93,16 +93,14 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): ao = world.ambient_occlusion - row = layout.row() - row.itemR(ao, "gather_method", expand=True) + layout.itemR(ao, "gather_method", expand=True) if ao.gather_method == 'RAYTRACE': row = layout.row() row.itemR(ao, "samples") row.itemR(ao, "distance") - row = layout.row() - row.itemR(ao, "sample_method") + layout.itemR(ao, "sample_method") if ao.sample_method == 'ADAPTIVE_QMC': row = layout.row() row.itemR(ao, "threshold") @@ -113,18 +111,13 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): row.itemR(ao, "bias") if ao.gather_method == 'APPROXIMATE': - row = layout.row() - row.itemR(ao, "passes") - row.itemR(ao, "error_tolerance", text="Error") - - row = layout.row() - row.itemR(ao, "correction") - row.itemR(ao, "pixel_cache") + col = layout.column_flow() + col.itemR(ao, "passes") + col.itemR(ao, "error_tolerance", text="Error") + col.itemR(ao, "correction") + col.itemR(ao, "pixel_cache") row = layout.row() - row.itemS() - - row = layout.row() row.itemR(ao, "falloff") row.itemR(ao, "strength") @@ -137,5 +130,4 @@ bpy.types.register(WORLD_PT_world) bpy.types.register(WORLD_PT_ambient_occlusion) bpy.types.register(WORLD_PT_mist) bpy.types.register(WORLD_PT_stars) -bpy.types.register(WORLD_PT_color_correction) - +bpy.types.register(WORLD_PT_color_correction)
\ No newline at end of file |