hi every body!
i’m not add a curve in a keyblock of a mesh object (a curve for animation for a especific key = shape)
from Blender import *
obj = Blender.getSelected() #select active object
mesh = obj.getData() # get mesh data of object
mykey = mesh.getKey() # get datablock of keyframes information
myIpo = myKey.getIpo() # get Ipo datablock for keys (vertex animation, each blue line is a shape)
consts_in_myIpo = myIpo.curveConsts # give me a list of names (strings) of shapes in Ipo key datablock
curves_in_myIpo = myIpo.getCurve() # give me all curves of animation (name of curve = name of shape) ipoCurve object
how can i ADD a curve into a shape (that not have one yet) ?
Shape Key Ipos are handled differently from other Ipos. The user can rename the curves, so string are used to access them instead of constants. The [Ipo.curveConsts](file:///media/usbdisk/CJD/Python/BPY%20API%20CVS%207-6-2006/BPY%20API/members.iinet.net.au/_cpbarton/ideasman/BPY_API/Ipo.Ipo-class.html#curveConsts) attribute for Shape Key Ipos returns a list of all defined key names.
dont work or i can’t understand it
download from http://claudiojd.googlepages.com/programacion “copy_all_shapes.py”