Followup to r59434 : py UI scripts edits.

Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
This commit is contained in:
Bastien Montagne 2013-08-23 20:41:21 +00:00
parent 52eb61f84b
commit 5b83a89c81
28 changed files with 233 additions and 279 deletions

@ -252,8 +252,8 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
col = split.column(align=True)
col.label(text="Threads:")
col.row().prop(rd, "threads_mode", expand=True)
sub = col.column()
col.row(align=True).prop(rd, "threads_mode", expand=True)
sub = col.column(align=True)
sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads")
@ -266,7 +266,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
sub.prop(cscene, "use_progressive_refine")
subsub = sub.column()
subsub = sub.column(align=True)
subsub.enabled = not rd.use_border
subsub.prop(rd, "use_save_buffers")

@ -150,18 +150,19 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
layout = self.layout
col = layout.column(align=True)
col.prop(self, 'view_align')
col = layout.column(align=True)
col = layout.column(align=True)
col.label(text="Location")
col.prop(self, 'location', text="")
col = layout.column(align=True)
col = layout.column(align=True)
col.label(text="Rotation")
col.prop(self, 'rotation', text="")
col = layout.column(align=True)
col.label(text="Major Segments")
col.prop(self, 'major_segments', text="")
col = layout.column(align=True)
col.label(text="Minor Segments")
col.prop(self, 'minor_segments', text="")
@ -174,6 +175,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
col = layout.column(align=True)
col.label(text="Major Radius")
col.prop(self, 'major_radius', text="")
col = layout.column(align=True)
col.label(text="Minor Radius")
col.prop(self, 'minor_radius', text="")
@ -181,6 +183,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
col = layout.column(align=True)
col.label(text="Exterior Radius")
col.prop(self, 'abso_major_rad', text="")
col = layout.column(align=True)
col.label(text="Interior Radius")
col.prop(self, 'abso_minor_rad', text="")

@ -161,14 +161,14 @@ class ConstraintButtonsPanel():
col = split.column()
row = col.row(align=True)
row.prop(con, "use_location", text="")
sub = row.row()
sub = row.row(align=True)
sub.active = con.use_location
sub.prop(con, "weight", text="Position", slider=True)
col = split.column()
row = col.row(align=True)
row.prop(con, "use_rotation", text="")
sub = row.row()
sub = row.row(align=True)
sub.active = con.use_rotation
sub.prop(con, "orient_weight", text="Rotation", slider=True)
@ -247,21 +247,21 @@ class ConstraintButtonsPanel():
col = split.column(align=True)
col.prop(con, "use_limit_x")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_limit_x
sub.prop(con, "min_x", text="Min")
sub.prop(con, "max_x", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_y")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_limit_y
sub.prop(con, "min_y", text="Min")
sub.prop(con, "max_y", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_z")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_limit_z
sub.prop(con, "min_z", text="Min")
sub.prop(con, "max_z", text="Max")
@ -577,21 +577,21 @@ class ConstraintButtonsPanel():
col = split.column(align=True)
col.prop(con, "use_limit_x", text="X")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_limit_x
sub.prop(con, "limit_min_x", text="Min")
sub.prop(con, "limit_max_x", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_y", text="Y")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_limit_y
sub.prop(con, "limit_min_y", text="Min")
sub.prop(con, "limit_max_y", text="Max")
col = split.column(align=True)
col.prop(con, "use_limit_z", text="Z")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_limit_z
sub.prop(con, "limit_min_z", text="Min")
sub.prop(con, "limit_max_z", text="Max")
@ -600,21 +600,21 @@ class ConstraintButtonsPanel():
col = split.column(align=True)
col.prop(con, "use_angular_limit_x", text="Angle X")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_angular_limit_x
sub.prop(con, "limit_angle_min_x", text="Min")
sub.prop(con, "limit_angle_max_x", text="Max")
col = split.column(align=True)
col.prop(con, "use_angular_limit_y", text="Angle Y")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_angular_limit_y
sub.prop(con, "limit_angle_min_y", text="Min")
sub.prop(con, "limit_angle_max_y", text="Max")
col = split.column(align=True)
col.prop(con, "use_angular_limit_z", text="Angle Z")
sub = col.column()
sub = col.column(align=True)
sub.active = con.use_angular_limit_z
sub.prop(con, "limit_angle_min_z", text="Min")
sub.prop(con, "limit_angle_max_z", text="Max")

@ -136,7 +136,6 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
col.operator("pose.group_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("pose.group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
if group:
col = layout.column()
col.active = (ob.proxy is None)
col.prop(group, "name")
@ -211,7 +210,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.prop(pose_marker_active, "name")
# TODO: this panel will soon be deprecated deprecated too
# TODO: this panel will soon be deprecated too
class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
bl_label = "Ghost"

@ -127,12 +127,15 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
col.label(text="Y:")
col.label(text="Z:")
col = split.row()
sub = col.row()
sub.active = not (bone.parent and bone.use_connect)
sub.column().prop(pchan, "lock_location", text="Location")
col.column().prop(pchan, "lock_rotation", text="Rotation")
col.column().prop(pchan, "lock_scale", text="Scale")
col = split.column()
col.active = not (bone.parent and bone.use_connect)
col.prop(pchan, "lock_location", text="Location")
col = split.column()
col.prop(pchan, "lock_rotation", text="Rotation")
col = split.column()
col.prop(pchan, "lock_scale", text="Scale")
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
row = layout.row()

@ -142,10 +142,10 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
if cam.sensor_fit == 'AUTO':
col.prop(cam, "sensor_width", text="Size")
else:
sub = col.column()
sub = col.column(align=True)
sub.active = cam.sensor_fit == 'HORIZONTAL'
sub.prop(cam, "sensor_width", text="Width")
sub = col.column()
sub = col.column(align=True)
sub.active = cam.sensor_fit == 'VERTICAL'
sub.prop(cam, "sensor_height", text="Height")

@ -81,7 +81,7 @@ class MESH_UL_shape_keys(UIList):
if self.layout_type in {'DEFAULT', 'COMPACT'}:
split = layout.split(0.66, False)
split.label(text=item.name, translate=False, icon_value=icon)
row = split.row(True)
row = split.row(align=True)
if key_block.mute or (obj.mode == 'EDIT' and not (obj.use_shape_key_edit_mode and obj.type == 'MESH')):
row.active = False
if not item.relative_key or index > 0:
@ -207,7 +207,6 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
if group:
row = layout.row()
row.prop(group, "name")

@ -780,7 +780,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
sub = col.column()
row = sub.split(align=True, percentage=0.4)
row.prop(md, "material_offset", text="")
row = row.row()
row = row.row(align=True)
row.active = md.use_rim
row.prop(md, "material_offset_rim", text="Rim")

@ -178,7 +178,7 @@ class RENDERLAYER_PT_freestyle_lineset(RenderLayerFreestyleEditorButtonsPanel, P
# draw edge type buttons
row = box.row(align=True)
row.prop(lineset, select_edge_type)
sub = row.column()
sub = row.column(align=True)
sub.prop(lineset, exclude_edge_type, text="")
sub.active = getattr(lineset, select_edge_type)

@ -96,11 +96,8 @@ class MASK_PT_layers:
if active_layer:
sub.separator()
props = sub.operator("mask.layer_move", icon='TRIA_UP', text="")
props.direction = 'UP'
props = sub.operator("mask.layer_move", icon='TRIA_DOWN', text="")
props.direction = 'DOWN'
sub.operator("mask.layer_move", icon='TRIA_UP', text="").direction = 'UP'
sub.operator("mask.layer_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
layout.prop(active_layer, "name")
@ -245,8 +242,7 @@ class MASK_PT_tools():
col.operator("transform.translate")
col.operator("transform.rotate")
col.operator("transform.resize", text="Scale")
props = col.operator("transform.transform", text="Scale Feather")
props.mode = 'MASK_SHRINKFATTEN'
col.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
col = layout.column(align=True)
col.label(text="Spline:")
@ -300,9 +296,7 @@ class MASK_MT_visibility(Menu):
layout.operator("mask.hide_view_clear", text="Show Hidden")
layout.operator("mask.hide_view_set", text="Hide Selected")
props = layout.operator("mask.hide_view_set", text="Hide Unselected")
props.unselected = True
layout.operator("mask.hide_view_set", text="Hide Unselected").unselected = True
class MASK_MT_transform(Menu):
@ -314,8 +308,7 @@ class MASK_MT_transform(Menu):
layout.operator("transform.translate")
layout.operator("transform.rotate")
layout.operator("transform.resize")
props = layout.operator("transform.transform", text="Scale Feather")
props.mode = 'MASK_SHRINKFATTEN'
layout.operator("transform.transform", text="Scale Feather").mode = 'MASK_SHRINKFATTEN'
class MASK_MT_animation(Menu):

@ -562,7 +562,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
def number_but(layout, toggle, number, name, color):
row = layout.row(align=True)
row.prop(halo, toggle, text="")
sub = row.column()
sub = row.column(align=True)
sub.active = getattr(halo, toggle)
sub.prop(halo, number, text=name, translate=False)
if not color == "":
@ -770,7 +770,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, Panel):
sub = col.column(align=True)
sub.label(text="Light Group:")
sub.prop(mat, "light_group", text="")
row = sub.row()
row = sub.row(align=True)
row.active = bool(mat.light_group)
row.prop(mat, "use_light_group_exclusive", text="Exclusive")
row.prop(mat, "use_light_group_local", text="Local")

@ -112,10 +112,9 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
col.label(text="Y:")
col.label(text="Z:")
col = split.row()
col.column().prop(ob, "lock_location", text="Location")
col.column().prop(ob, "lock_rotation", text="Rotation")
col.column().prop(ob, "lock_scale", text="Scale")
split.column().prop(ob, "lock_location", text="Location")
split.column().prop(ob, "lock_rotation", text="Rotation")
split.column().prop(ob, "lock_scale", text="Scale")
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
row = layout.row()

@ -599,20 +599,18 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
split = layout.split()
sub = split.column()
col = sub.column(align=True)
col = split.column(align=True)
col.active = boids.use_flight
col.prop(boids, "air_speed_max")
col.prop(boids, "air_speed_min", slider=True)
col.prop(boids, "air_acc_max", slider=True)
col.prop(boids, "air_ave_max", slider=True)
col.prop(boids, "air_personal_space")
row = col.row()
row = col.row(align=True)
row.active = (boids.use_land or boids.use_climb) and boids.use_flight
row.prop(boids, "land_smooth")
sub = split.column()
col = sub.column(align=True)
col = split.column(align=True)
col.active = boids.use_land or boids.use_climb
col.prop(boids, "land_speed_max")
col.prop(boids, "land_jump_speed")
@ -621,9 +619,9 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
col.prop(boids, "land_personal_space")
col.prop(boids, "land_stick_force")
row = layout.row()
split = layout.split()
col = row.column(align=True)
col = split.column(align=True)
col.label(text="Battle:")
col.prop(boids, "health")
col.prop(boids, "strength")
@ -631,7 +629,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
col.prop(boids, "accuracy")
col.prop(boids, "range")
col = row.column()
col = split.column()
col.label(text="Misc:")
col.prop(boids, "bank", slider=True)
col.prop(boids, "pitch", slider=True)
@ -1037,7 +1035,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
col = row.column(align=True)
col.label(text="Color:")
col.prop(part, "draw_color", text="")
sub = col.row()
sub = col.row(align=True)
sub.active = (part.draw_color in {'VELOCITY', 'ACCELERATION'})
sub.prop(part, "color_maximum", text="Max")
@ -1139,10 +1137,9 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
sub.prop(part, "kink_amplitude")
sub.prop(part, "kink_amplitude_clump", text="Clump", slider=True)
col.prop(part, "kink_flat", slider=True)
col = split.column()
sub = col.column(align=True)
sub.prop(part, "kink_frequency")
sub.prop(part, "kink_shape", slider=True)
col = split.column(align=True)
col.prop(part, "kink_frequency")
col.prop(part, "kink_shape", slider=True)
class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):

@ -35,23 +35,23 @@ class PhysicButtonsPanel():
def physics_add(self, layout, md, name, type, typeicon, toggles):
sub = layout.row(align=True)
row = layout.row(align=True)
if md:
sub.context_pointer_set("modifier", md)
sub.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
row.context_pointer_set("modifier", md)
row.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X')
if toggles:
sub.prop(md, "show_render", text="")
sub.prop(md, "show_viewport", text="")
row.prop(md, "show_render", text="")
row.prop(md, "show_viewport", text="")
else:
sub.operator("object.modifier_add", text=name, text_ctxt=i18n_contexts.default, icon=typeicon).type = type
row.operator("object.modifier_add", text=name, text_ctxt=i18n_contexts.default, icon=typeicon).type = type
def physics_add_special(self, layout, data, name, addop, removeop, typeicon):
sub = layout.row(align=True)
row = layout.row(align=True)
if data:
sub.operator(removeop, text=name, text_ctxt=i18n_contexts.default, icon='X')
row.operator(removeop, text=name, text_ctxt=i18n_contexts.default, icon='X')
else:
sub.operator(addop, text=name, text_ctxt=i18n_contexts.default, icon=typeicon)
row.operator(addop, text=name, text_ctxt=i18n_contexts.default, icon=typeicon)
class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
@ -301,14 +301,14 @@ def basic_force_field_falloff_ui(self, context, field):
col = split.column()
row = col.row(align=True)
row.prop(field, "use_min_distance", text="")
sub = row.row()
sub = row.row(align=True)
sub.active = field.use_min_distance
sub.prop(field, "distance_min", text="Minimum")
col = split.column()
row = col.row(align=True)
row.prop(field, "use_max_distance", text="")
sub = row.row()
sub = row.row(align=True)
sub.active = field.use_max_distance
sub.prop(field, "distance_max", text="Maximum")

@ -246,9 +246,9 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
sub.operator("fluid.preset_add", text="", icon='ZOOMIN')
sub.operator("fluid.preset_add", text="", icon='ZOOMOUT').remove_active = True
subsub = col.column(align=True)
subsub.prop(fluid, "viscosity_base", text="Base")
subsub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
sub = col.column(align=True)
sub.prop(fluid, "viscosity_base", text="Base")
sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
col.label(text="Optimization:")
col.prop(fluid, "grid_levels", slider=True)

@ -68,11 +68,11 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_z", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_ang_z
sub.prop(rbc, "limit_ang_z_lower", text="Lower")
sub.prop(rbc, "limit_ang_z_upper", text="Upper")
@ -81,11 +81,11 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_x", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_lin_x
sub.prop(rbc, "limit_lin_x_lower", text="Lower")
sub.prop(rbc, "limit_lin_x_upper", text="Upper")
@ -94,22 +94,22 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_x", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_lin_x
sub.prop(rbc, "limit_lin_x_lower", text="Lower")
sub.prop(rbc, "limit_lin_x_upper", text="Upper")
col = layout.column(align=True)
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_x", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_ang_x
sub.prop(rbc, "limit_ang_x_lower", text="Lower")
sub.prop(rbc, "limit_ang_x_upper", text="Upper")
@ -118,22 +118,22 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Linear motor:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_motor_lin", toggle=True, text="Enable")
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_motor_lin
sub.prop(rbc, "motor_lin_target_velocity", text="Target Velocity")
sub.prop(rbc, "motor_lin_max_impulse", text="Max Impulse")
col.label("Angular motor:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_motor_ang", toggle=True, text="Enable")
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_motor_ang
sub.prop(rbc, "motor_ang_target_velocity", text="Target Velocity")
sub.prop(rbc, "motor_ang_max_impulse", text="Max Impulse")
@ -142,58 +142,58 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Limits:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_x", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_lin_x
sub.prop(rbc, "limit_lin_x_lower", text="Lower")
sub.prop(rbc, "limit_lin_x_upper", text="Upper")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_y", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_lin_y
sub.prop(rbc, "limit_lin_y_lower", text="Lower")
sub.prop(rbc, "limit_lin_y_upper", text="Upper")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_lin_z", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_lin_z
sub.prop(rbc, "limit_lin_z_lower", text="Lower")
sub.prop(rbc, "limit_lin_z_upper", text="Upper")
col = layout.column(align=True)
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_x", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_ang_x
sub.prop(rbc, "limit_ang_x_lower", text="Lower")
sub.prop(rbc, "limit_ang_x_upper", text="Upper")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_y", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_ang_y
sub.prop(rbc, "limit_ang_y_lower", text="Lower")
sub.prop(rbc, "limit_ang_y_upper", text="Upper")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.5
sub.prop(rbc, "use_limit_ang_z", toggle=True)
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_limit_ang_z
sub.prop(rbc, "limit_ang_z_lower", text="Lower")
sub.prop(rbc, "limit_ang_z_upper", text="Upper")
@ -202,29 +202,29 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
col = layout.column(align=True)
col.label("Springs:")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.1
sub.prop(rbc, "use_spring_x", toggle=True, text="X")
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_spring_x
sub.prop(rbc, "spring_stiffness_x", text="Stiffness")
sub.prop(rbc, "spring_damping_x")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.1
sub.prop(rbc, "use_spring_y", toggle=True, text="Y")
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_spring_y
sub.prop(rbc, "spring_stiffness_y", text="Stiffness")
sub.prop(rbc, "spring_damping_y")
row = col.row()
sub = row.row()
row = col.row(align=True)
sub = row.row(align=True)
sub.scale_x = 0.1
sub.prop(rbc, "use_spring_z", toggle=True, text="Z")
sub = row.row()
sub = row.row(align=True)
sub.active = rbc.use_spring_z
sub.prop(rbc, "spring_stiffness_z", text="Stiffness")
sub.prop(rbc, "spring_damping_z")

@ -96,8 +96,8 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
col.prop(flow, "volume_density")
sub = col.column(align=True)
sub.prop(flow, "use_initial_velocity")
sub = sub.column()
sub.active = flow.use_initial_velocity
sub.prop(flow, "velocity_factor")

@ -257,18 +257,16 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
col = split.column(align=True)
col.label(text="Threads:")
col.row(align=True).prop(rd, "threads_mode", expand=True)
sub = col.column(align=True)
sub.label(text="Threads:")
sub.row().prop(rd, "threads_mode", expand=True)
subsub = sub.column()
subsub.enabled = rd.threads_mode == 'FIXED'
subsub.prop(rd, "threads")
sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads")
sub = col.column(align=True)
sub.label(text="Tile Size:")
sub.prop(rd, "tile_x", text="X")
sub.prop(rd, "tile_y", text="Y")
col.label(text="Tile Size:")
col.prop(rd, "tile_x", text="X")
col.prop(rd, "tile_y", text="Y")
col = split.column()
col.label(text="Memory:")

@ -555,17 +555,17 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
col = split.column(align=True)
col.label(text="Mirror:")
row = col.row()
row = col.row(align=True)
row.prop(tex, "use_mirror_x", text="X")
row.active = (tex.repeat_x > 1)
row = col.row()
row = col.row(align=True)
row.prop(tex, "use_mirror_y", text="Y")
row.active = (tex.repeat_y > 1)
layout.separator()
elif tex.extension == 'CHECKER':
col = split.column(align=True)
row = col.row()
row = col.row(align=True)
row.prop(tex, "use_checker_even", text="Even")
row.prop(tex, "use_checker_odd", text="Odd")
@ -1007,7 +1007,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
def factor_but(layout, toggle, factor, name):
row = layout.row(align=True)
row.prop(tex, toggle, text="")
sub = row.row()
sub = row.row(align=True)
sub.active = getattr(tex, toggle)
sub.prop(tex, factor, text=name, slider=True)
return sub # XXX, temp. use_map_normal needs to override.

@ -94,7 +94,7 @@ class CLIP_HT_header(Header):
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN',
text="Filters")
sub = row.column()
sub = row.row(align=True)
sub.active = clip.tracking.reconstruction.is_valid
sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="")
@ -211,7 +211,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
settings = clip.tracking.settings
col = layout.column(align=True)
props = col.operator("clip.add_marker_at_click", text="Add Marker")
col.operator("clip.add_marker_at_click", text="Add Marker")
col.operator("clip.detect_features")
col.operator("clip.delete_track")
@ -227,9 +227,8 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
row.menu('CLIP_MT_tracking_settings_presets', text=label)
row.operator("clip.tracking_settings_preset_add",
text="", icon='ZOOMIN')
props = row.operator("clip.tracking_settings_preset_add",
text="", icon='ZOOMOUT')
props.remove_active = True
row.operator("clip.tracking_settings_preset_add",
text="", icon='ZOOMOUT').remove_active = True
col.separator()
@ -295,19 +294,14 @@ class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
col = layout.column()
col.label(text="Refine:")
row = col.row(align=True)
props = row.operator("clip.refine_markers", text="Backwards")
props.backwards = True
props = row.operator("clip.refine_markers", text="Forwards")
props.backwards = False
row.operator("clip.refine_markers", text="Backwards").backwards = True
row.operator("clip.refine_markers", text="Forwards").backwards = False
col = layout.column()
col.label(text="Clear:")
row = col.row(align=True)
props = row.operator("clip.clear_track_path", text="Before")
props.action = 'UPTO'
props = row.operator("clip.clear_track_path", text="After")
props.action = 'REMAINED'
row.operator("clip.clear_track_path", text="Before").action = 'UPTO'
row.operator("clip.clear_track_path", text="After").action = 'REMAINED'
layout.operator("clip.join_tracks", text="Join")
@ -362,7 +356,7 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
col.active = not settings.use_tripod_solver
col.prop(settings, "use_fallback_reconstruction",
text="Allow Fallback")
sub = col.column()
sub = col.column(align=True)
sub.active = settings.use_fallback_reconstruction
sub.prop(settings, "reconstruction_success_threshold")
@ -407,14 +401,13 @@ class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
settings = sc.clip.tracking.settings
col = layout.column(align=True)
row = col.row()
props = row.operator("clip.set_plane", text="Floor")
props.plane = 'FLOOR'
props = row.operator("clip.set_plane", text="Wall")
props.plane = 'WALL'
row = col.row(align=True)
row.operator("clip.set_plane", text="Floor").plane = 'FLOOR'
row.operator("clip.set_plane", text="Wall").plane = 'WALL'
col.operator("clip.set_origin")
row = col.row()
row = col.row(align=True)
row.operator("clip.set_axis", text="Set X Axis").axis = 'X'
row.operator("clip.set_axis", text="Set Y Axis").axis = 'Y'
@ -424,6 +417,7 @@ class CLIP_PT_tools_orientation(CLIP_PT_reconstruction_panel, Panel):
row = col.row(align=True)
row.operator("clip.set_scale")
row.operator("clip.apply_solution_scale", text="Apply Scale")
col.prop(settings, "distance")
@ -495,7 +489,7 @@ class CLIP_PT_tools_grease_pencil(Panel):
row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
row = col.row()
row = col.row(align=True)
row.prop(context.tool_settings, "use_grease_pencil_sessions")
@ -555,19 +549,17 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
layout.template_track(sc, "scopes")
row = layout.row(align=True)
sub = row.row()
sub = row.row(align=True)
sub.prop(act_track, "use_red_channel", text="R", toggle=True)
sub.prop(act_track, "use_green_channel", text="G", toggle=True)
sub.prop(act_track, "use_blue_channel", text="B", toggle=True)
row.separator()
sub = row.row()
sub.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
row.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
row.separator()
sub = row.row()
sub.prop(act_track, "use_alpha_preview",
row.prop(act_track, "use_alpha_preview",
text="", toggle=True, icon='IMAGE_ALPHA')
layout.separator()
@ -577,9 +569,8 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel):
row.menu('CLIP_MT_track_color_presets', text=label)
row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT')
row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN')
props = row.operator("clip.track_color_preset_add",
text="", icon='ZOOMOUT')
props.remove_active = True
row.operator("clip.track_color_preset_add",
text="", icon='ZOOMOUT').remove_active = True
row = layout.row()
row.prop(act_track, "use_custom_color")
@ -667,11 +658,11 @@ class CLIP_PT_tracking_camera(Panel):
label = bpy.types.CLIP_MT_camera_presets.bl_label
row.menu('CLIP_MT_camera_presets', text=label)
row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT')
props.remove_active = True
row.operator("clip.camera_preset_add", text="",
icon='ZOOMOUT').remove_active = True
row = layout.row(align=True)
sub = row.split(percentage=0.65)
sub = row.split(percentage=0.65, align=True)
if clip.tracking.camera.units == 'MILLIMETERS':
sub.prop(clip.tracking.camera, "focal_length")
else:
@ -706,15 +697,14 @@ class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
sc = context.space_data
row = layout.row(align=True)
sub = row.row()
sub = row.row(align=True)
sub.prop(sc, "show_red_channel", text="R", toggle=True)
sub.prop(sc, "show_green_channel", text="G", toggle=True)
sub.prop(sc, "show_blue_channel", text="B", toggle=True)
row.separator()
sub = row.row()
sub.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
col = layout.column(align=True)
@ -759,14 +749,14 @@ class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
col = layout.column(align=True)
row = col.row()
row = col.row(align=True)
row.prop(sc, "show_marker_pattern", text="Pattern")
row.prop(sc, "show_marker_search", text="Search")
col.prop(sc, "show_tiny_markers", text="Thin Markers")
col.prop(sc, "show_track_path", text="Path")
row = col.row()
row = col.row(align=True)
row.active = sc.show_track_path
row.prop(sc, "path_length", text="Length")
@ -1034,15 +1024,14 @@ class CLIP_MT_track(Menu):
layout.operator("clip.solve_camera")
layout.separator()
props = layout.operator("clip.clear_track_path", text="Clear After")
props.action = 'REMAINED'
layout.operator("clip.clear_track_path",
text="Clear After").action = 'REMAINED'
props = layout.operator("clip.clear_track_path", text="Clear Before")
props.action = 'UPTO'
layout.operator("clip.clear_track_path",
text="Clear Before").action = 'UPTO'
props = layout.operator("clip.clear_track_path",
text="Clear Track Path")
props.action = 'ALL'
layout.operator("clip.clear_track_path",
text="Clear Track Path").action = 'ALL'
layout.separator()
layout.operator("clip.join_tracks")
@ -1055,16 +1044,15 @@ class CLIP_MT_track(Menu):
layout.operator("clip.paste_tracks")
layout.separator()
props = layout.operator("clip.track_markers",
text="Track Frame Backwards")
props.backwards = True
layout.operator("clip.track_markers",
text="Track Frame Backwards").backwards = True
props = layout.operator("clip.track_markers", text="Track Backwards")
props.backwards = True
props.sequence = True
props = layout.operator("clip.track_markers", text="Track Forwards")
props.sequence = True
layout.operator("clip.track_markers",
text="Track Forwards").sequence = True
layout.operator("clip.track_markers", text="Track Frame Forwards")
layout.separator()
@ -1086,10 +1074,8 @@ class CLIP_MT_reconstruction(Menu):
layout = self.layout
layout.operator("clip.set_origin")
props = layout.operator("clip.set_plane", text="Set Floor")
props.plane = 'FLOOR'
props = layout.operator("clip.set_plane", text="Set Wall")
props.plane = 'WALL'
layout.operator("clip.set_plane", text="Set Floor").plane = 'FLOOR'
layout.operator("clip.set_plane", text="Set Wall").plane = 'WALL'
layout.operator("clip.set_axis", text="Set X Axis").axis = "X"
layout.operator("clip.set_axis", text="Set Y Axis").axis = "Y"
@ -1111,8 +1097,8 @@ class CLIP_MT_track_visibility(Menu):
layout.operator("clip.hide_tracks_clear", text="Show Hidden")
layout.operator("clip.hide_tracks", text="Hide Selected")
props = layout.operator("clip.hide_tracks", text="Hide Unselected")
props.unselected = True
layout.operator("clip.hide_tracks",
text="Hide Unselected").unselected = True
class CLIP_MT_track_transform(Menu):
@ -1163,12 +1149,11 @@ class CLIP_MT_tracking_specials(Menu):
def draw(self, context):
layout = self.layout
props = layout.operator("clip.disable_markers",
text="Enable Markers")
props.action = 'ENABLE'
layout.operator("clip.disable_markers",
text="Enable Markers").action = 'ENABLE'
props = layout.operator("clip.disable_markers", text="Disable markers")
props.action = 'DISABLE'
layout.operator("clip.disable_markers",
text="Disable markers").action = 'DISABLE'
layout.separator()
layout.operator("clip.set_origin")
@ -1178,11 +1163,10 @@ class CLIP_MT_tracking_specials(Menu):
layout.operator("clip.hide_tracks_clear", text="Show Tracks")
layout.separator()
props = layout.operator("clip.lock_tracks", text="Lock Tracks")
props.action = 'LOCK'
layout.operator("clip.lock_tracks", text="Lock Tracks").action = 'LOCK'
props = layout.operator("clip.lock_tracks", text="Unlock Tracks")
props.action = 'UNLOCK'
layout.operator("clip.lock_tracks",
text="Unlock Tracks").action = 'UNLOCK'
class CLIP_MT_select_mode(Menu):

@ -183,17 +183,10 @@ class IMAGE_MT_image_invert(Menu):
layout.separator()
props = layout.operator("image.invert", text="Invert Red Channel")
props.invert_r = True
props = layout.operator("image.invert", text="Invert Green Channel")
props.invert_g = True
props = layout.operator("image.invert", text="Invert Blue Channel")
props.invert_b = True
props = layout.operator("image.invert", text="Invert Alpha Channel")
props.invert_a = True
layout.operator("image.invert", text="Invert Red Channel").invert_r = True
layout.operator("image.invert", text="Invert Green Channel").invert_g = True
layout.operator("image.invert", text="Invert Blue Channel").invert_b = True
layout.operator("image.invert", text="Invert Alpha Channel").invert_a = True
class IMAGE_MT_uvs_showhide(Menu):
@ -714,8 +707,6 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
col.prop(brush, "blend", text="Blend")
if brush.image_tool == 'CLONE':
@ -745,14 +736,14 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if tex_slot.map_mode != 'STENCIL':
if brush.use_primary_overlay:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@ -777,14 +768,14 @@ class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if tex_slot_alpha.map_mode != 'STENCIL':
if brush.use_secondary_overlay:
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "mask_overlay_alpha", text="Alpha")
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')

@ -53,14 +53,14 @@ class OUTLINER_HT_header(Header):
row.operator("outliner.keyingset_remove_selected", icon='ZOOMOUT', text="")
if ks:
row = layout.row(align=False)
row = layout.row()
row.prop_search(scene.keying_sets, "active", scene, "keying_sets", text="")
row = layout.row(align=True)
row.operator("anim.keyframe_insert", text="", icon='KEY_HLT')
row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT')
else:
row = layout.row(align=False)
row = layout.row()
row.label(text="No Keying Set active")

@ -104,8 +104,7 @@ class SEQUENCER_HT_header(Header):
row.prop(st, "overlay_type", text="")
row = layout.row(align=True)
props = row.operator("render.opengl", text="", icon='RENDER_STILL')
props.sequencer = True
row.operator("render.opengl", text="", icon='RENDER_STILL').sequencer = True
props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
props.animation = True
props.sequencer = True
@ -339,12 +338,11 @@ class SEQUENCER_MT_strip(Menu):
#}
layout.separator()
props = layout.operator("sequencer.reload", text="Reload Strips")
props.adjust_length = False
props = layout.operator("sequencer.reload", text="Reload Strips and Adjust Length")
props.adjust_length = True
layout.operator("sequencer.reload", text="Reload Strips").adjust_length = False
layout.operator("sequencer.reload", text="Reload Strips and Adjust Length").adjust_length = True
layout.operator("sequencer.reassign_inputs")
layout.operator("sequencer.swap_inputs")
layout.separator()
layout.operator("sequencer.lock")
layout.operator("sequencer.unlock")
@ -413,7 +411,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
split.prop(strip, "blend_type", text="")
row = layout.row(align=True)
sub = row.row()
sub = row.row(align=True)
sub.active = (not strip.mute)
sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
@ -427,10 +425,10 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
sub.prop(strip, "frame_final_duration")
col = layout.column(align=True)
row = col.row()
row = col.row(align=True)
row.label(text=iface_("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration),
translate=False)
row = col.row()
row = col.row(align=True)
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
row.label(text=iface_("Playhead: %d") % (frame_current - strip.frame_start), translate=False)
@ -549,7 +547,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
layout.prop(strip, "multicam_source")
row = layout.row(align=True)
sub = row.row()
sub = row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
@ -925,8 +923,7 @@ class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel):
props.name = mod.name
props.direction = 'DOWN'
props = row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False)
props.name = mod.name
row.operator("sequencer.strip_modifier_remove", text="", icon='X', emboss=False).name = mod.name
if mod.show_expanded:
row = box.row()

@ -45,7 +45,7 @@ class TEXT_HT_header(Header):
row.menu("TEXT_MT_templates")
if text and text.is_modified:
sub = row.row()
sub = row.row(align=True)
sub.alert = True
sub.operator("text.resolve_conflict", text="", icon='HELP')
@ -127,21 +127,21 @@ class TEXT_PT_find(Panel):
# find
col = layout.column(align=True)
row = col.row()
row = col.row(align=True)
row.prop(st, "find_text", text="")
row.operator("text.find_set_selected", text="", icon='TEXT')
col.operator("text.find")
# replace
col = layout.column(align=True)
row = col.row()
row = col.row(align=True)
row.prop(st, "replace_text", text="")
row.operator("text.replace_set_selected", text="", icon='TEXT')
col.operator("text.replace")
# settings
layout.prop(st, "use_match_case")
row = layout.row()
row = layout.row(align=True)
row.prop(st, "use_find_wrap", text="Wrap")
row.prop(st, "use_find_all", text="All")

@ -62,14 +62,14 @@ class TIME_HT_header(Header):
# hide the play-reversed button
# since JACK transport doesn't support reversed playback
if scene.sync_mode == 'AUDIO_SYNC' and context.user_preferences.system.audio_device == 'JACK':
sub = row.row()
sub = row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PLAY')
else:
row.operator("screen.animation_play", text="", icon='PLAY_REVERSE').reverse = True
row.operator("screen.animation_play", text="", icon='PLAY')
else:
sub = row.row()
sub = row.row(align=True)
sub.scale_x = 2.0
sub.operator("screen.animation_play", text="", icon='PAUSE')
row.operator("screen.keyframe_jump", text="", icon='NEXT_KEYFRAME').next = True
@ -85,7 +85,7 @@ class TIME_HT_header(Header):
row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True)
if screen.is_animation_playing:
subsub = row.row()
subsub = row.row(align=True)
subsub.prop(toolsettings, "use_record_with_nla", toggle=True)
row = layout.row(align=True)

@ -477,7 +477,7 @@ class USERPREF_PT_system(Panel):
column.prop(system, "language")
row = column.row()
row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager)
row = column.row(True)
row = column.row(align=True)
row.prop(system, "use_translate_interface", text="Interface", toggle=True)
row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True)
row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True)

@ -120,16 +120,14 @@ class VIEW3D_HT_header(Header):
# OpenGL render
row = layout.row(align=True)
row.operator("render.opengl", text="", icon='RENDER_STILL')
props = row.operator("render.opengl", text="", icon='RENDER_ANIMATION')
props.animation = True
row.operator("render.opengl", text="", icon='RENDER_ANIMATION').animation = True
# Pose
if obj and mode == 'POSE':
row = layout.row(align=True)
row.operator("pose.copy", text="", icon='COPYDOWN')
row.operator("pose.paste", text="", icon='PASTEDOWN')
props = row.operator("pose.paste", text="", icon='PASTEFLIPDOWN')
props.flipped = 1
row.operator("pose.paste", text="", icon='PASTEFLIPDOWN').flipped = 1
# ********** Menu **********
@ -293,10 +291,8 @@ class VIEW3D_MT_snap(Menu):
layout = self.layout
layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid")
props = layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor")
props.use_offset = False
props = layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor (Offset)")
props.use_offset = True
layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor").use_offset = False
layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor (Offset)").use_offset = True
layout.separator()
@ -2490,7 +2486,7 @@ class VIEW3D_PT_view3d_properties(Panel):
col.prop(view, "clip_start", text="Start")
col.prop(view, "clip_end", text="End")
subcol = col.column()
subcol = col.column(align=True)
subcol.enabled = not view.lock_camera_and_layers
subcol.label(text="Local Camera:")
subcol.prop(view, "camera", text="")
@ -2943,7 +2939,7 @@ class VIEW3D_PT_etch_a_ton(Panel):
colsub = col.column(align=True)
colsub.prop(toolsettings, "use_etch_autoname")
sub = colsub.column()
sub = colsub.column(align=True)
sub.enabled = not toolsettings.use_etch_autoname
sub.prop(toolsettings, "etch_number")
sub.prop(toolsettings, "etch_side")

@ -43,7 +43,7 @@ def draw_repeat_tools(context, layout):
def draw_keyframing_tools(context, layout):
col = layout.column(align=True)
col.label(text="Keyframes:")
row = col.row()
row = col.row(align=True)
row.operator("anim.keyframe_insert_menu", text="Insert")
row.operator("anim.keyframe_delete_v3d", text="Remove")
@ -54,15 +54,15 @@ def draw_gpencil_tools(context, layout):
col.label(text="Grease Pencil:")
row = col.row()
row = col.row(align=True)
row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
row = col.row()
row = col.row(align=True)
row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
row = col.row()
row = col.row(align=True)
row.prop(context.tool_settings, "use_grease_pencil_sessions")
col.operator("view3d.ruler")
@ -112,7 +112,6 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
draw_repeat_tools(context, layout)
draw_gpencil_tools(context, layout)
col = layout.column(align=True)
class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
@ -125,10 +124,10 @@ class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="Add/Remove:")
row = col.row()
row = col.row(align=True)
row.operator("rigidbody.objects_add", text="Add Active").type = 'ACTIVE'
row.operator("rigidbody.objects_add", text="Add Passive").type = 'PASSIVE'
row = col.row()
row = col.row(align=True)
row.operator("rigidbody.objects_remove", text="Remove")
col = layout.column(align=True)
@ -234,7 +233,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
col = layout.column(align=True)
col.prop(mesh, "use_mirror_x")
row = col.row()
row = col.row(align=True)
row.active = ob.data.use_mirror_x
row.prop(mesh, "use_mirror_topology")
@ -280,10 +279,10 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="Handles:")
row = col.row()
row = col.row(align=True)
row.operator("curve.handle_type_set", text="Auto").type = 'AUTOMATIC'
row.operator("curve.handle_type_set", text="Vector").type = 'VECTOR'
row = col.row()
row = col.row(align=True)
row.operator("curve.handle_type_set", text="Align").type = 'ALIGNED'
row.operator("curve.handle_type_set", text="Free").type = 'FREE_ALIGN'
@ -462,14 +461,14 @@ class VIEW3D_PT_tools_posemode(View3DPanel, Panel):
col = layout.column(align=True)
col.label(text="In-Between:")
row = col.row()
row = col.row(align=True)
row.operator("pose.push", text="Push")
row.operator("pose.relax", text="Relax")
col.operator("pose.breakdown", text="Breakdowner")
col = layout.column(align=True)
col.label(text="Pose:")
row = col.row()
row = col.row(align=True)
row.operator("pose.copy", text="Copy")
row.operator("pose.paste", text="Paste")
@ -608,8 +607,8 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
# use_original_normal and sculpt_plane
if capabilities.has_sculpt_plane:
row = col.row(align=True)
col.separator()
row = col.row(align=True)
if brush.use_original_normal:
row.prop(brush, "use_original_normal", toggle=True, text="", icon='LOCKED')
@ -675,13 +674,13 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if brush.use_cursor_overlay:
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@ -702,8 +701,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
col.prop(brush, "blend", text="Blend")
col = layout.column()
@ -713,13 +710,13 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if brush.use_cursor_overlay:
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@ -739,8 +736,6 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
self.prop_unified_strength(row, context, brush, "strength", text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
col.prop(brush, "vertex_tool", text="Blend")
col = layout.column()
@ -771,13 +766,13 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if brush.use_cursor_overlay:
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@ -810,14 +805,14 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if tex_slot.map_mode != 'STENCIL':
if brush.use_primary_overlay:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@ -848,14 +843,14 @@ class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel):
col.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:")
row = col.row()
row = col.row(align=True)
if tex_slot_alpha.map_mode != 'STENCIL':
if brush.use_secondary_overlay:
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
sub = row.row()
sub = row.row(align=True)
sub.prop(brush, "mask_overlay_alpha", text="Alpha")
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@ -1051,7 +1046,7 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
col = layout.column(align=True)
col.label(text="Mirror:")
row = col.row()
row = col.row(align=True)
row.prop(sculpt, "use_symmetry_x", text="X", toggle=True)
row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True)
row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True)
@ -1333,7 +1328,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
if pe.is_hair:
col.active = pe.is_editable
col.prop(pe, "use_emitter_deflect", text="Deflect emitter")
sub = col.row()
sub = col.row(align=True)
sub.active = pe.use_emitter_deflect
sub.prop(pe, "emitter_distance", text="Distance")
@ -1357,7 +1352,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
if pe.type == 'PARTICLES':
col.prop(pe, "show_particles", text="Particles")
col.prop(pe, "use_fade_time")
sub = col.row()
sub = col.row(align=True)
sub.active = pe.use_fade_time
sub.prop(pe, "fade_frames", slider=True)