diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-08 12:29:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-08 12:29:49 +0400 |
commit | 61b6fcd80443691da77a918c5e50e06cc0998c1b (patch) | |
tree | 5d8dbcd1edcfe6ca4a23dd4886ed8eb9f7d0ad6c /release/scripts | |
parent | e7f21e58de3ac1c590a4a1180723a854e2a6e21a (diff) | |
parent | 1f0bb0e0353687c17738608d884077dc6779638d (diff) |
svn merge -r39991:40034 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'release/scripts')
8 files changed, 80 insertions, 46 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 4a5de9f9e57..1446e45e5f0 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -353,7 +353,10 @@ class Mesh(bpy_types.ID): @property def edge_keys(self): - return [edge_key for face in self.faces for edge_key in face.edge_keys] + return list({edge_key + for face in self.faces + for edge_key in face.edge_keys + }) class MeshEdge(StructRNA): @@ -373,17 +376,31 @@ class MeshFace(StructRNA): face_verts = self.vertices[:] mesh_verts = self.id_data.vertices if len(face_verts) == 3: - return (mesh_verts[face_verts[0]].co + mesh_verts[face_verts[1]].co + mesh_verts[face_verts[2]].co) / 3.0 + return (mesh_verts[face_verts[0]].co + + mesh_verts[face_verts[1]].co + + mesh_verts[face_verts[2]].co + ) / 3.0 else: - return (mesh_verts[face_verts[0]].co + mesh_verts[face_verts[1]].co + mesh_verts[face_verts[2]].co + mesh_verts[face_verts[3]].co) / 4.0 + return (mesh_verts[face_verts[0]].co + + mesh_verts[face_verts[1]].co + + mesh_verts[face_verts[2]].co + + mesh_verts[face_verts[3]].co + ) / 4.0 @property def edge_keys(self): verts = self.vertices[:] if len(verts) == 3: - return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[0]) - - return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[3]), ord_ind(verts[3], verts[0]) + return (ord_ind(verts[0], verts[1]), + ord_ind(verts[1], verts[2]), + ord_ind(verts[2], verts[0]), + ) + else: + return (ord_ind(verts[0], verts[1]), + ord_ind(verts[1], verts[2]), + ord_ind(verts[2], verts[3]), + ord_ind(verts[3], verts[0]), + ) class Text(bpy_types.ID): diff --git a/release/scripts/startup/bl_operators/animsys_update.py b/release/scripts/startup/bl_operators/animsys_update.py index 3710c57ac16..23b9cf13f07 100644 --- a/release/scripts/startup/bl_operators/animsys_update.py +++ b/release/scripts/startup/bl_operators/animsys_update.py @@ -685,7 +685,6 @@ data_path_update = [ ] -import bpy from bpy.types import Operator diff --git a/release/scripts/startup/bl_operators/nla.py b/release/scripts/startup/bl_operators/nla.py index c764f7d62f1..feb0016b1c7 100644 --- a/release/scripts/startup/bl_operators/nla.py +++ b/release/scripts/startup/bl_operators/nla.py @@ -271,7 +271,8 @@ class BakeAction(Operator): class ClearUselessActions(Operator): - '''Mark actions with no F-Curves for deletion after save+reload of file preserving "action libraries"''' + '''Mark actions with no F-Curves for deletion after save+reload of ''' \ + '''file preserving "action libraries"''' bl_idname = "anim.clear_useless_actions" bl_label = "Clear Useless Actions" bl_options = {'REGISTER', 'UNDO'} @@ -292,12 +293,14 @@ class ClearUselessActions(Operator): if ((self.only_unused is False) or (action.use_fake_user and action.users == 1)): - # if it has F-Curves, then it's a "action library" (i.e. walk, wave, jump, etc.) + # if it has F-Curves, then it's a "action library" + # (i.e. walk, wave, jump, etc.) # and should be left alone as that's what fake users are for! if not action.fcurves: # mark action for deletion action.user_clear() removed += 1 - self.report({'INFO'}, "Removed %d empty and/or fake-user only Actions" % (removed)) + self.report({'INFO'}, "Removed %d empty and/or fake-user only Actions" + % removed) return {'FINISHED'} diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 463ba84470f..61093abe814 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -74,6 +74,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel): if context.scene.render.engine == "BLENDER_GAME": layout.row().prop(arm, "vert_deformer", expand=True) + class DATA_PT_display(ArmatureButtonsPanel, Panel): bl_label = "Display" @@ -185,11 +186,10 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel): layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink") if poselib: - - # list of poses in pose library + # list of poses in pose library row = layout.row() row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5) - + # column of operators for active pose # - goes beside list col = row.column(align=True) @@ -206,9 +206,9 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel): if pose_marker_active is not None: col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = pose_marker_active.name col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index - - col.operator("poselib.action_sanitise", icon='HELP', text="") # XXX: put in menu? - + + col.operator("poselib.action_sanitise", icon='HELP', text="") # XXX: put in menu? + # properties for active marker if pose_marker_active is not None: layout.prop(pose_marker_active, "name") diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 875ace10c6d..c600debe935 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -742,22 +742,23 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "narrowness", slider=True) @staticmethod - def weight_vg_mask(layout, ob, md): + def vertex_weight_mask(layout, ob, md): layout.label(text="Influence/Mask Options:") - split = layout.split() - col1 = split.column() - col2 = split.column() + row = layout.row() - col1.label(text="Global Influence:") - col2.prop(md, "mask_constant", text="") + split = layout.split(percentage=0.4) + split.label(text="Global Influence:") + split.prop(md, "mask_constant", text="") if not md.mask_texture: - col1.label(text="Vertex Group Mask:") - col2.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="") + split = layout.split(percentage=0.4) + split.label(text="Vertex Group Mask:") + split.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="") if not md.mask_vertex_group: - col1.label(text="Texture Mask:") - col2.template_ID(md, "mask_texture", new="texture.new") + split = layout.split(percentage=0.4) + split.label(text="Texture Mask:") + split.template_ID(md, "mask_texture", new="texture.new") if md.mask_texture: split = layout.split() col = split.column() @@ -772,7 +773,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures") - def WEIGHT_VGEDIT(self, layout, ob, md): + def VERTEX_WEIGHT_EDIT(self, layout, ob, md): if ob.type == 'MESH': split = layout.split() col = split.column() @@ -783,25 +784,28 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.label(text="Default Weight:") col.prop(md, "default_weight", text="") - layout.prop(md, "mapping_mode") - if md.mapping_mode == 'CURVE': + layout.prop(md, "falloff_type") + if md.falloff_type == 'CURVE': col = layout.column() col.template_curve_mapping(md, "map_curve") - row = layout.row() - row.prop(md, "use_add") - row.prop(md, "use_remove") - row = layout.row() - if md.use_add: - row.prop(md, "add_threshold") - if md.use_remove: - row.prop(md, "remove_threshold") + split = layout.split(percentage=0.4) + split.prop(md, "use_add") + row = split.row() + row.active = md.use_add + row.prop(md, "add_threshold") + + split = layout.split(percentage=0.4) + split.prop(md, "use_remove") + row = split.row() + row.active = md.use_remove + row.prop(md, "remove_threshold") # Common mask options… layout.separator() - self.weight_vg_mask(layout, ob, md) + self.vertex_weight_mask(layout, ob, md) - def WEIGHT_VGMIX(self, layout, ob, md): + def VERTEX_WEIGHT_MIX(self, layout, ob, md): if ob.type == 'MESH': split = layout.split() col = split.column() @@ -824,9 +828,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): # Common mask options… layout.separator() - self.weight_vg_mask(layout, ob, md) + self.vertex_weight_mask(layout, ob, md) - def WEIGHT_VGPROXIMITY(self, layout, ob, md): + def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md): if ob.type == 'MESH': split = layout.split() col = split.column() @@ -847,11 +851,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.prop(md, "min_dist") row.prop(md, "max_dist") - layout.prop(md, "mapping_mode") + layout.prop(md, "falloff_type") # Common mask options… layout.separator() - self.weight_vg_mask(layout, ob, md) + self.vertex_weight_mask(layout, ob, md) if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py index 657c0fe652a..a1b86b51f5f 100644 --- a/release/scripts/startup/bl_ui/properties_data_speaker.py +++ b/release/scripts/startup/bl_ui/properties_data_speaker.py @@ -81,7 +81,7 @@ class DATA_PT_distance(DataButtonsPanel, bpy.types.Panel): speaker = context.speaker split = layout.split() - + col = split.column() col.label("Volume:") col.prop(speaker, "volume_min", text="Minimum") diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 161e4b10cff..5ea55d82471 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -344,7 +344,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, Panel): row = col.row() row.prop(gs, "use_frame_rate") row.prop(gs, "use_display_lists") - + col.prop(gs, "restrict_animation_updates") diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 13edc3471d2..67aca5eb4c1 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -773,7 +773,18 @@ class USERPREF_MT_ndof_settings(Menu): layout.separator() layout.label(text="orbit options") - layout.prop(input_prefs, "ndof_orbit_invert_axes") + if input_prefs.view_rotate_method == 'TRACKBALL': + layout.prop(input_prefs, "ndof_roll_invert_axis") + layout.prop(input_prefs, "ndof_tilt_invert_axis") + layout.prop(input_prefs, "ndof_rotate_invert_axis") + else: + layout.prop(input_prefs, "ndof_orbit_invert_axes") + + layout.separator() + layout.label(text="pan options") + layout.prop(input_prefs, "ndof_panx_invert_axis") + layout.prop(input_prefs, "ndof_pany_invert_axis") + layout.prop(input_prefs, "ndof_panz_invert_axis") layout.separator() layout.label(text="fly options") |