Question

J'ai réussi à insérer des touches de forme de Python en utilisant:

ob = Scene.GetCurrent().object.active;
if(ob.activeShape == 0):
   ob.insertShapeKey()
   ob.insertShapeKey()

Maintenant, comment modifier une valeur clé?

Était-ce utile?

La solution

Ok, voici comment je l'ai fait:

#get the key
k = ob.getData().getKey()
#create a new Ipo
ni = Ipo.New('Key','ni')
#if there check if there already a key by that name, otherwise add key
if(k.ipo['Key 1'] == None):   k.ipo.addCurve('Key 1')
#add a point to the 'Key 1' ipo curve
k.ipo['Key 1'].append(BezTriple.New(6.0,0.8,0.1))

Et c'est à peu près tout. La première forme de forme insérée crée la «base», puis les touches sont ajoutées, «Key 1» est le nom par défaut

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top