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:
2013-08-23 20:41:21 +00:00
parent 52eb61f84b
commit 5b83a89c81
28 changed files with 233 additions and 279 deletions

View File

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

View File

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

View File

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

View File

@@ -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_UP', text="").direction = 'UP'
col.operator("pose.group_move", icon='TRIA_DOWN', text="").direction = 'DOWN' col.operator("pose.group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
if group:
col = layout.column() col = layout.column()
col.active = (ob.proxy is None) col.active = (ob.proxy is None)
col.prop(group, "name") col.prop(group, "name")
@@ -211,7 +210,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.prop(pose_marker_active, "name") 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): class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
bl_label = "Ghost" bl_label = "Ghost"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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='ZOOMIN')
sub.operator("fluid.preset_add", text="", icon='ZOOMOUT').remove_active = True sub.operator("fluid.preset_add", text="", icon='ZOOMOUT').remove_active = True
subsub = col.column(align=True) sub = col.column(align=True)
subsub.prop(fluid, "viscosity_base", text="Base") sub.prop(fluid, "viscosity_base", text="Base")
subsub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True) sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
col.label(text="Optimization:") col.label(text="Optimization:")
col.prop(fluid, "grid_levels", slider=True) col.prop(fluid, "grid_levels", slider=True)

View File

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

View File

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

View File

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

View File

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

View File

@@ -94,7 +94,7 @@ class CLIP_HT_header(Header):
row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN', row.prop(sc, "show_filters", icon='DISCLOSURE_TRI_DOWN',
text="Filters") text="Filters")
sub = row.column() sub = row.row(align=True)
sub.active = clip.tracking.reconstruction.is_valid sub.active = clip.tracking.reconstruction.is_valid
sub.prop(sc, "show_graph_frames", icon='SEQUENCE', text="") 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 settings = clip.tracking.settings
col = layout.column(align=True) 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.detect_features")
col.operator("clip.delete_track") 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.menu('CLIP_MT_tracking_settings_presets', text=label)
row.operator("clip.tracking_settings_preset_add", row.operator("clip.tracking_settings_preset_add",
text="", icon='ZOOMIN') text="", icon='ZOOMIN')
props = row.operator("clip.tracking_settings_preset_add", row.operator("clip.tracking_settings_preset_add",
text="", icon='ZOOMOUT') text="", icon='ZOOMOUT').remove_active = True
props.remove_active = True
col.separator() col.separator()
@@ -295,19 +294,14 @@ class CLIP_PT_tools_tracking(CLIP_PT_tracking_panel, Panel):
col = layout.column() col = layout.column()
col.label(text="Refine:") col.label(text="Refine:")
row = col.row(align=True) row = col.row(align=True)
props = row.operator("clip.refine_markers", text="Backwards") row.operator("clip.refine_markers", text="Backwards").backwards = True
props.backwards = True row.operator("clip.refine_markers", text="Forwards").backwards = False
props = row.operator("clip.refine_markers", text="Forwards")
props.backwards = False
col = layout.column() col = layout.column()
col.label(text="Clear:") col.label(text="Clear:")
row = col.row(align=True) row = col.row(align=True)
props = row.operator("clip.clear_track_path", text="Before") row.operator("clip.clear_track_path", text="Before").action = 'UPTO'
props.action = 'UPTO' row.operator("clip.clear_track_path", text="After").action = 'REMAINED'
props = row.operator("clip.clear_track_path", text="After")
props.action = 'REMAINED'
layout.operator("clip.join_tracks", text="Join") 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.active = not settings.use_tripod_solver
col.prop(settings, "use_fallback_reconstruction", col.prop(settings, "use_fallback_reconstruction",
text="Allow Fallback") text="Allow Fallback")
sub = col.column() sub = col.column(align=True)
sub.active = settings.use_fallback_reconstruction sub.active = settings.use_fallback_reconstruction
sub.prop(settings, "reconstruction_success_threshold") 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 settings = sc.clip.tracking.settings
col = layout.column(align=True) col = layout.column(align=True)
row = col.row() row = col.row(align=True)
props = row.operator("clip.set_plane", text="Floor") row.operator("clip.set_plane", text="Floor").plane = 'FLOOR'
props.plane = 'FLOOR' row.operator("clip.set_plane", text="Wall").plane = 'WALL'
props = row.operator("clip.set_plane", text="Wall")
props.plane = 'WALL'
col.operator("clip.set_origin") 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 X Axis").axis = 'X'
row.operator("clip.set_axis", text="Set Y Axis").axis = 'Y' 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 = col.row(align=True)
row.operator("clip.set_scale") row.operator("clip.set_scale")
row.operator("clip.apply_solution_scale", text="Apply Scale") row.operator("clip.apply_solution_scale", text="Apply Scale")
col.prop(settings, "distance") 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="Poly").mode = 'DRAW_POLY'
row.operator("gpencil.draw", text="Erase").mode = 'ERASER' 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") 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") layout.template_track(sc, "scopes")
row = layout.row(align=True) 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_red_channel", text="R", toggle=True)
sub.prop(act_track, "use_green_channel", text="G", toggle=True) sub.prop(act_track, "use_green_channel", text="G", toggle=True)
sub.prop(act_track, "use_blue_channel", text="B", toggle=True) sub.prop(act_track, "use_blue_channel", text="B", toggle=True)
row.separator() row.separator()
sub = row.row() row.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
sub.prop(act_track, "use_grayscale_preview", text="B/W", toggle=True)
row.separator() row.separator()
sub = row.row() row.prop(act_track, "use_alpha_preview",
sub.prop(act_track, "use_alpha_preview",
text="", toggle=True, icon='IMAGE_ALPHA') text="", toggle=True, icon='IMAGE_ALPHA')
layout.separator() 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_presets', text=label)
row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT') row.menu('CLIP_MT_track_color_specials', text="", icon='DOWNARROW_HLT')
row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN') row.operator("clip.track_color_preset_add", text="", icon='ZOOMIN')
props = row.operator("clip.track_color_preset_add", row.operator("clip.track_color_preset_add",
text="", icon='ZOOMOUT') text="", icon='ZOOMOUT').remove_active = True
props.remove_active = True
row = layout.row() row = layout.row()
row.prop(act_track, "use_custom_color") 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 label = bpy.types.CLIP_MT_camera_presets.bl_label
row.menu('CLIP_MT_camera_presets', text=label) row.menu('CLIP_MT_camera_presets', text=label)
row.operator("clip.camera_preset_add", text="", icon='ZOOMIN') row.operator("clip.camera_preset_add", text="", icon='ZOOMIN')
props = row.operator("clip.camera_preset_add", text="", icon='ZOOMOUT') row.operator("clip.camera_preset_add", text="",
props.remove_active = True icon='ZOOMOUT').remove_active = True
row = layout.row(align=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': if clip.tracking.camera.units == 'MILLIMETERS':
sub.prop(clip.tracking.camera, "focal_length") sub.prop(clip.tracking.camera, "focal_length")
else: else:
@@ -706,15 +697,14 @@ class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
sc = context.space_data sc = context.space_data
row = layout.row(align=True) 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_red_channel", text="R", toggle=True)
sub.prop(sc, "show_green_channel", text="G", toggle=True) sub.prop(sc, "show_green_channel", text="G", toggle=True)
sub.prop(sc, "show_blue_channel", text="B", toggle=True) sub.prop(sc, "show_blue_channel", text="B", toggle=True)
row.separator() row.separator()
sub = row.row() row.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
sub.prop(sc, "use_grayscale_preview", text="B/W", toggle=True)
col = layout.column(align=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) 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_pattern", text="Pattern")
row.prop(sc, "show_marker_search", text="Search") row.prop(sc, "show_marker_search", text="Search")
col.prop(sc, "show_tiny_markers", text="Thin Markers") col.prop(sc, "show_tiny_markers", text="Thin Markers")
col.prop(sc, "show_track_path", text="Path") col.prop(sc, "show_track_path", text="Path")
row = col.row() row = col.row(align=True)
row.active = sc.show_track_path row.active = sc.show_track_path
row.prop(sc, "path_length", text="Length") row.prop(sc, "path_length", text="Length")
@@ -1034,15 +1024,14 @@ class CLIP_MT_track(Menu):
layout.operator("clip.solve_camera") layout.operator("clip.solve_camera")
layout.separator() layout.separator()
props = layout.operator("clip.clear_track_path", text="Clear After") layout.operator("clip.clear_track_path",
props.action = 'REMAINED' text="Clear After").action = 'REMAINED'
props = layout.operator("clip.clear_track_path", text="Clear Before") layout.operator("clip.clear_track_path",
props.action = 'UPTO' text="Clear Before").action = 'UPTO'
props = layout.operator("clip.clear_track_path", layout.operator("clip.clear_track_path",
text="Clear Track Path") text="Clear Track Path").action = 'ALL'
props.action = 'ALL'
layout.separator() layout.separator()
layout.operator("clip.join_tracks") layout.operator("clip.join_tracks")
@@ -1055,16 +1044,15 @@ class CLIP_MT_track(Menu):
layout.operator("clip.paste_tracks") layout.operator("clip.paste_tracks")
layout.separator() layout.separator()
props = layout.operator("clip.track_markers", layout.operator("clip.track_markers",
text="Track Frame Backwards") text="Track Frame Backwards").backwards = True
props.backwards = True
props = layout.operator("clip.track_markers", text="Track Backwards") props = layout.operator("clip.track_markers", text="Track Backwards")
props.backwards = True props.backwards = True
props.sequence = True props.sequence = True
props = layout.operator("clip.track_markers", text="Track Forwards") layout.operator("clip.track_markers",
props.sequence = True text="Track Forwards").sequence = True
layout.operator("clip.track_markers", text="Track Frame Forwards") layout.operator("clip.track_markers", text="Track Frame Forwards")
layout.separator() layout.separator()
@@ -1086,10 +1074,8 @@ class CLIP_MT_reconstruction(Menu):
layout = self.layout layout = self.layout
layout.operator("clip.set_origin") layout.operator("clip.set_origin")
props = layout.operator("clip.set_plane", text="Set Floor") layout.operator("clip.set_plane", text="Set Floor").plane = 'FLOOR'
props.plane = 'FLOOR' layout.operator("clip.set_plane", text="Set Wall").plane = 'WALL'
props = layout.operator("clip.set_plane", text="Set Wall")
props.plane = 'WALL'
layout.operator("clip.set_axis", text="Set X Axis").axis = "X" layout.operator("clip.set_axis", text="Set X Axis").axis = "X"
layout.operator("clip.set_axis", text="Set Y Axis").axis = "Y" 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_clear", text="Show Hidden")
layout.operator("clip.hide_tracks", text="Hide Selected") layout.operator("clip.hide_tracks", text="Hide Selected")
props = layout.operator("clip.hide_tracks", text="Hide Unselected") layout.operator("clip.hide_tracks",
props.unselected = True text="Hide Unselected").unselected = True
class CLIP_MT_track_transform(Menu): class CLIP_MT_track_transform(Menu):
@@ -1163,12 +1149,11 @@ class CLIP_MT_tracking_specials(Menu):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
props = layout.operator("clip.disable_markers", layout.operator("clip.disable_markers",
text="Enable Markers") text="Enable Markers").action = 'ENABLE'
props.action = 'ENABLE'
props = layout.operator("clip.disable_markers", text="Disable markers") layout.operator("clip.disable_markers",
props.action = 'DISABLE' text="Disable markers").action = 'DISABLE'
layout.separator() layout.separator()
layout.operator("clip.set_origin") 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.operator("clip.hide_tracks_clear", text="Show Tracks")
layout.separator() layout.separator()
props = layout.operator("clip.lock_tracks", text="Lock Tracks") layout.operator("clip.lock_tracks", text="Lock Tracks").action = 'LOCK'
props.action = 'LOCK'
props = layout.operator("clip.lock_tracks", text="Unlock Tracks") layout.operator("clip.lock_tracks",
props.action = 'UNLOCK' text="Unlock Tracks").action = 'UNLOCK'
class CLIP_MT_select_mode(Menu): class CLIP_MT_select_mode(Menu):

View File

@@ -183,17 +183,10 @@ class IMAGE_MT_image_invert(Menu):
layout.separator() layout.separator()
props = layout.operator("image.invert", text="Invert Red Channel") layout.operator("image.invert", text="Invert Red Channel").invert_r = True
props.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
props = layout.operator("image.invert", text="Invert Green Channel") layout.operator("image.invert", text="Invert Alpha Channel").invert_a = True
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
class IMAGE_MT_uvs_showhide(Menu): 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, "strength", slider=True, text="Strength")
self.prop_unified_strength(row, context, brush, "use_pressure_strength") self.prop_unified_strength(row, context, brush, "use_pressure_strength")
row = col.row(align=True)
col.prop(brush, "blend", text="Blend") col.prop(brush, "blend", text="Blend")
if brush.image_tool == 'CLONE': 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.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:") col.label(text="Overlay:")
row = col.row() row = col.row(align=True)
if tex_slot.map_mode != 'STENCIL': if tex_slot.map_mode != 'STENCIL':
if brush.use_primary_overlay: if brush.use_primary_overlay:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else: else:
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') 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, "texture_overlay_alpha", text="Alpha")
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA') 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.active = brush.brush_capabilities.has_overlay
col.label(text="Overlay:") col.label(text="Overlay:")
row = col.row() row = col.row(align=True)
if tex_slot_alpha.map_mode != 'STENCIL': if tex_slot_alpha.map_mode != 'STENCIL':
if brush.use_secondary_overlay: if brush.use_secondary_overlay:
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF') row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else: else:
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') 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, "mask_overlay_alpha", text="Alpha")
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA') sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')

View File

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

View File

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

View File

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

View File

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

View File

@@ -477,7 +477,7 @@ class USERPREF_PT_system(Panel):
column.prop(system, "language") column.prop(system, "language")
row = column.row() row = column.row()
row.label(text="Translate:", text_ctxt=i18n_contexts.id_windowmanager) 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_interface", text="Interface", toggle=True)
row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True) row.prop(system, "use_translate_tooltips", text="Tooltips", toggle=True)
row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True) row.prop(system, "use_translate_new_dataname", text="New Data", toggle=True)

View File

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

View File

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