diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2011-09-09 16:21:41 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2011-09-09 16:21:41 +0400 |
commit | c1c4743696c67f562eda31e90d03c72eaec04567 (patch) | |
tree | 12c992e4160d7ff878f05f33549ff24b0ae3faa1 /release | |
parent | dbd6658d737b1592a633ddf6397be14e50e434d9 (diff) | |
parent | 01744abd8187d1566b336bf38033673aa05b6786 (diff) |
svn merge -r 39975:40061 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'release')
-rw-r--r-- | release/datafiles/blenderbuttons | bin | 215334 -> 214916 bytes | |||
-rw-r--r-- | release/scripts/modules/bpy_types.py | 26 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/animsys_update.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/nla.py | 9 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_armature.py | 12 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_modifier.py | 155 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_speaker.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 13 |
9 files changed, 180 insertions, 40 deletions
diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons Binary files differindex 4c064182a8c..a68a1f8394c 100644 --- a/release/datafiles/blenderbuttons +++ b/release/datafiles/blenderbuttons diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 101416f4943..b3127733c1e 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -356,7 +356,7 @@ 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 [ed.key for ed in self.edges] class MeshEdge(StructRNA): @@ -376,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 dc6b5401168..510cab879ec 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -616,32 +616,31 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.label(text="Settings can be found inside the Physics context") def UV_PROJECT(self, layout, ob, md): - if ob.type == 'MESH': - split = layout.split() + split = layout.split() - col = split.column() - col.label(text="Image:") - col.prop(md, "image", text="") + col = split.column() + col.label(text="Image:") + col.prop(md, "image", text="") - col = split.column() - col.label(text="UV Layer:") - col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="") + col = split.column() + col.label(text="UV Layer:") + col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="") - split = layout.split() - col = split.column() - col.prop(md, "use_image_override") - col.prop(md, "projector_count", text="Projectors") - for proj in md.projectors: - col.prop(proj, "object", text="") + split = layout.split() + col = split.column() + col.prop(md, "use_image_override") + col.prop(md, "projector_count", text="Projectors") + for proj in md.projectors: + col.prop(proj, "object", text="") - col = split.column() - sub = col.column(align=True) - sub.prop(md, "aspect_x", text="Aspect X") - sub.prop(md, "aspect_y", text="Aspect Y") + col = split.column() + sub = col.column(align=True) + sub.prop(md, "aspect_x", text="Aspect X") + sub.prop(md, "aspect_y", text="Aspect Y") - sub = col.column(align=True) - sub.prop(md, "scale_x", text="Scale X") - sub.prop(md, "scale_y", text="Scale Y") + sub = col.column(align=True) + sub.prop(md, "scale_x", text="Scale X") + sub.prop(md, "scale_y", text="Scale Y") def WARP(self, layout, ob, md): use_falloff = (md.falloff_type != 'NONE') @@ -745,5 +744,119 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "width", slider=True) col.prop(md, "narrowness", slider=True) + @staticmethod + def vertex_weight_mask(layout, ob, md): + layout.label(text="Influence/Mask Options:") + + split = layout.split(percentage=0.4) + split.label(text="Global Influence:") + split.prop(md, "mask_constant", text="") + + if not md.mask_texture: + 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: + 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() + col.label(text="Texture Coordinates:") + col.prop(md, "mask_tex_mapping", text="") + + col = split.column() + col.label(text="Use Channel:") + col.prop(md, "mask_tex_use_channel", text="") + + if md.mask_tex_mapping == 'OBJECT': + layout.prop(md, "mask_tex_map_object", text="Object") + elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH': + layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures") + + def VERTEX_WEIGHT_EDIT(self, layout, ob, md): + split = layout.split() + col = split.column() + col.label(text="Vertex Group:") + col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + + col = split.column() + col.label(text="Default Weight:") + col.prop(md, "default_weight", text="") + + layout.prop(md, "falloff_type") + if md.falloff_type == 'CURVE': + col = layout.column() + col.template_curve_mapping(md, "map_curve") + + 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.vertex_weight_mask(layout, ob, md) + + def VERTEX_WEIGHT_MIX(self, layout, ob, md): + split = layout.split() + + col = split.column() + col.label(text="Vertex Group A:") + col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="") + col.label(text="Default Weight A:") + col.prop(md, "default_weight_a", text="") + + col.label(text="Mix Mode:") + col.prop(md, "mix_mode", text="") + + col = split.column() + col.label(text="Vertex Group B:") + col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="") + col.label(text="Default Weight B:") + col.prop(md, "default_weight_b", text="") + + col.label(text="Mix Set:") + col.prop(md, "mix_set", text="") + + # Common mask options + layout.separator() + self.vertex_weight_mask(layout, ob, md) + + def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md): + split = layout.split() + + col = split.column() + col.label(text="Vertex Group:") + col.prop_search(md, "vertex_group", ob, "vertex_groups", text="") + + col = split.column() + col.label(text="Target Object:") + col.prop(md, "target", text="") + + layout.row().prop(md, "proximity_mode", expand=True) + if md.proximity_mode == 'GEOMETRY': + layout.row().prop(md, "proximity_geometry", expand=True) + + row = layout.row() + row.prop(md, "min_dist") + row.prop(md, "max_dist") + + layout.prop(md, "falloff_type") + + # Common mask options + layout.separator() + 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 16c7adbe5ff..51f2ece72b8 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -369,7 +369,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") |