mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Add key frames for all shape keys.
This commit is contained in:
parent
94ac2fa675
commit
c65522b5cf
1 changed files with 11 additions and 0 deletions
|
@ -313,6 +313,7 @@ def build_actions(mdl):
|
|||
sk.animation_data.action = bpy.data.actions.new(frame.name)
|
||||
act=sk.animation_data.action
|
||||
data = []
|
||||
other_keys = mdl.keys[:]
|
||||
if frame.type:
|
||||
for j in range(frame.numframes):
|
||||
co = []
|
||||
|
@ -326,8 +327,18 @@ def build_actions(mdl):
|
|||
if j < frame.numframes - 1:
|
||||
co.append ((frame.numframes * 1.0, 0.0))
|
||||
data.append((frame.frames[j].key, co))
|
||||
if frame.frames[j].key in other_keys:
|
||||
del(other_keys[other_keys.index(frame.frames[j].key)])
|
||||
co = [(1.0, 0.0), (frame.numframes * 1.0, 0.0)]
|
||||
for k in other_keys:
|
||||
data.append((k, co))
|
||||
else:
|
||||
data.append((frame.key, [(1.0, 1.0)]))
|
||||
if frame.key in other_keys:
|
||||
del(other_keys[other_keys.index(frame.key)])
|
||||
co = [(1.0, 0.0)]
|
||||
for k in other_keys:
|
||||
data.append((k, co))
|
||||
set_keys (act, data)
|
||||
|
||||
def get_base(name):
|
||||
|
|
Loading…
Reference in a new issue