diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-16 05:25:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-16 05:25:03 +0300 |
commit | fee5363912d93f3ef99f3a012f5d3d3f29abe8db (patch) | |
tree | 6f68ee5445b5e72dfd4062c2caf29bf9717e660b /release/scripts/ui | |
parent | 78c135d93efe758143d21f1808c0aa7d4d902c23 (diff) |
bugfix [#26094] Going to Bone Roll menu brings up python error
also correct for pep8 warnings.
Diffstat (limited to 'release/scripts/ui')
-rw-r--r-- | release/scripts/ui/properties_data_armature.py | 26 | ||||
-rw-r--r-- | release/scripts/ui/properties_data_modifier.py | 2 | ||||
-rw-r--r-- | release/scripts/ui/properties_particle.py | 4 | ||||
-rw-r--r-- | release/scripts/ui/properties_physics_common.py | 2 | ||||
-rw-r--r-- | release/scripts/ui/properties_texture.py | 16 | ||||
-rw-r--r-- | release/scripts/ui/space_nla.py | 1 | ||||
-rw-r--r-- | release/scripts/ui/space_userpref.py | 10 | ||||
-rw-r--r-- | release/scripts/ui/space_view3d.py | 3 |
8 files changed, 31 insertions, 33 deletions
diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 793b75d6d5a..4efb49ac6a8 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -157,20 +157,20 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel): class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel): bl_label = "Pose Library" bl_options = {'DEFAULT_CLOSED'} - + @classmethod def poll(cls, context): return (context.object and context.object.type == 'ARMATURE' and context.object.pose) - + def draw(self, context): layout = self.layout - + ob = context.object poselib = ob.pose_library - + row = layout.row() row.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink") - + if poselib: activePoseIndex = poselib.pose_markers.active_index if len(poselib.pose_markers): @@ -179,23 +179,23 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel): else: activePose = None activePoseName = None - + row = layout.row() row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5) - + col = row.column(align=True) col.active = (poselib.library is None) - - # invoke should still be used for 'add', as it is needed to allow + + # invoke should still be used for 'add', as it is needed to allow # add/replace options to be used properly col.operator("poselib.pose_add", icon='ZOOMIN', text="") - - col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing + + col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = activePoseName - + #col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so modal preview loop doesn't run col.operator("poselib.browse_interactive", icon='ZOOM_SELECTED', text="").pose_index = activePoseIndex - + # TODO: "validate action" operator to be restored diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py index e93b34fe055..564963130ac 100644 --- a/release/scripts/ui/properties_data_modifier.py +++ b/release/scripts/ui/properties_data_modifier.py @@ -383,7 +383,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): col.prop(md, "use_mirror_v", text="V") col = layout.column() - + if md.use_mirror_merge == True: col.prop(md, "merge_threshold") col.label(text="Mirror Object:") diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py index 4b470831716..b48e354f526 100644 --- a/release/scripts/ui/properties_particle.py +++ b/release/scripts/ui/properties_particle.py @@ -823,7 +823,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel): elif part.render_type == 'BILLBOARD': ob = context.object - + sub.label(text="Align:") row = layout.row() @@ -850,7 +850,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel): col = layout.column() col.active = part.billboard_uv_split > 1 col.prop_search(psys, "billboard_split_uv", ob.data, "uv_textures") - + row = col.row() row.label(text="Animate:") row.prop(part, "billboard_animation", text="") diff --git a/release/scripts/ui/properties_physics_common.py b/release/scripts/ui/properties_physics_common.py index e462bd958f7..c16a0df0167 100644 --- a/release/scripts/ui/properties_physics_common.py +++ b/release/scripts/ui/properties_physics_common.py @@ -274,7 +274,7 @@ def basic_force_field_falloff_ui(self, context, field): sub = row.row() 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="") diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py index ac3fc2d0b1d..8b652ba6e60 100644 --- a/release/scripts/ui/properties_texture.py +++ b/release/scripts/ui/properties_texture.py @@ -62,10 +62,10 @@ def context_tex_datablock(context): idblock = context.brush if idblock: return idblock - + if context.particle_system: idblock = context.particle_system.settings - + return idblock @@ -991,7 +991,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down") elif isinstance(idblock, bpy.types.ParticleSettings): split = layout.split() - + col = split.column() col.label(text="General:") factor_but(col, "use_map_time", "time_factor", "Time") @@ -1005,21 +1005,21 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel): factor_but(col, "use_map_damp", "damp_factor", "Damp") factor_but(col, "use_map_gravity", "gravity_factor", "Gravity") factor_but(col, "use_map_field", "field_factor", "Force Fields") - + layout.label(text="Hair:") - + split = layout.split() - + col = split.column() factor_but(col, "use_map_length", "length_factor", "Length") factor_but(col, "use_map_clump", "clump_factor", "Clump") - + col = split.column() factor_but(col, "use_map_kink", "kink_factor", "Kink") factor_but(col, "use_map_rough", "rough_factor", "Rough") layout.separator() - + if not isinstance(idblock, bpy.types.ParticleSettings): split = layout.split() diff --git a/release/scripts/ui/space_nla.py b/release/scripts/ui/space_nla.py index 3ebd8b1661e..7388a839d6d 100644 --- a/release/scripts/ui/space_nla.py +++ b/release/scripts/ui/space_nla.py @@ -98,7 +98,6 @@ class NLA_MT_select(bpy.types.Menu): layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT' - class NLA_MT_marker(bpy.types.Menu): bl_label = "Marker" diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 3f03647855c..e8d80f79ad8 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -638,11 +638,11 @@ class USERPREF_PT_theme(bpy.types.Panel): elif theme.theme_area == 'COLOR_SETS': col = split.column() - for i,ui in enumerate(theme.bone_color_sets): - col.label(text="Color Set %d:" % (i+1)) # i starts from 0 - + for i, ui in enumerate(theme.bone_color_sets): + col.label(text="Color Set %d:" % (i + 1)) # i starts from 0 + row = col.row() - + subsplit = row.split(percentage=0.95) padding = subsplit.split(percentage=0.15) @@ -651,7 +651,7 @@ class USERPREF_PT_theme(bpy.types.Panel): colsub.row().prop(ui, "normal") colsub.row().prop(ui, "select") colsub.row().prop(ui, "active") - + subsplit = row.split(percentage=0.85) padding = subsplit.split(percentage=0.15) diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 813539579b8..d401b779efb 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -1935,8 +1935,7 @@ class VIEW3D_MT_edit_armature_roll(bpy.types.Menu): def draw(self, context): layout = self.layout - layout.operator("armature.calculate_roll", text="Recalculate with Z-Axis Up").type = 'GLOBALUP' - layout.operator("armature.calculate_roll", text="Recalculate with Z-Axis to Cursor").type = 'CURSOR' + layout.operator_menu_enum("armature.calculate_roll", "type") layout.separator() |