¿Cómo establezco un valor para un ShapeKey en Blender Python?
Pregunta
He logrado insertar teclas de forma de Python usando:
ob = Scene.GetCurrent().object.active;
if(ob.activeShape == 0):
ob.insertShapeKey()
ob.insertShapeKey()
Ahora, ¿cómo cambio un valor clave?
Solución
Ok, así es como lo hice:
#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))
Y eso es todo. La primera forma insertada crea 'base', luego se agregan teclas, 'clave 1' es el nombre predeterminado
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow