Domanda

Sono riuscito a inserire le chiavi di forma da Python usando:

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

Ora come posso cambiare un valore chiave?

È stato utile?

Soluzione

Ok ecco come l'ho fatto:

#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))

E questo è tutto. Il primo ShapeKey inserito crea "Base", quindi vengono aggiunti i tasti, "Chiave 1" è il nome predefinito

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top