fix [#26601] Python error when use of autocomplete

Was a naming collision with 'keys' python method, reserve keys/items/values/get for python.
Updated animsys_update.py for shapekey data paths.

renamed:
  Particle.hair --> hair_keys
  Particle.keys --> particle_keys
  Key.keys --> key_blocks
  EnumProperty.items --> enum_items
  KeyMap.items --> keymap_items 

noted:
  http://wiki.blender.org/index.php/Dev:2.5/Py/API/Updates#Since_2.56a
This commit is contained in:
Campbell Barton
2011-03-25 02:12:44 +00:00
parent b510019602
commit 0c03fa78c1
13 changed files with 270 additions and 253 deletions

View File

@@ -250,11 +250,11 @@ class ShapeTransfer(bpy.types.Operator):
def ob_add_shape(ob, name):
me = ob.data
key = ob.shape_key_add(from_mix=False)
if len(me.shape_keys.keys) == 1:
if len(me.shape_keys.key_blocks) == 1:
key.name = "Basis"
key = ob.shape_key_add(from_mix=False) # we need a rest
key.name = name
ob.active_shape_key_index = len(me.shape_keys.keys) - 1
ob.active_shape_key_index = len(me.shape_keys.key_blocks) - 1
ob.show_only_shape_key = True
from mathutils.geometry import barycentric_transform
@@ -270,7 +270,7 @@ class ShapeTransfer(bpy.types.Operator):
orig_normals = me_nos(me.vertices)
# orig_coords = me_cos(me.vertices) # the actual mverts location isnt as relyable as the base shape :S
orig_coords = me_cos(me.shape_keys.keys[0].data)
orig_coords = me_cos(me.shape_keys.key_blocks[0].data)
for ob_other in objects:
me_other = ob_other.data
@@ -280,7 +280,7 @@ class ShapeTransfer(bpy.types.Operator):
target_normals = me_nos(me_other.vertices)
if me_other.shape_keys:
target_coords = me_cos(me_other.shape_keys.keys[0].data)
target_coords = me_cos(me_other.shape_keys.key_blocks[0].data)
else:
target_coords = me_cos(me_other.vertices)