【发布时间】:2011-03-07 12:03:59
【问题描述】:
我已经设法从 Python 插入形状键:
ob = Scene.GetCurrent().object.active;
if(ob.activeShape == 0):
ob.insertShapeKey()
ob.insertShapeKey()
现在如何更改键值?
【问题讨论】:
标签: python 3d blender bpython bpy
我已经设法从 Python 插入形状键:
ob = Scene.GetCurrent().object.active;
if(ob.activeShape == 0):
ob.insertShapeKey()
ob.insertShapeKey()
现在如何更改键值?
【问题讨论】:
标签: python 3d blender bpython bpy
好的,我就是这样做的:
#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))
就是这样。 插入的第一个 ShapeKey 创建“基础”,然后添加键, “键 1”是默认名称
【讨论】: