mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-03 10:00:56 +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)
|
sk.animation_data.action = bpy.data.actions.new(frame.name)
|
||||||
act=sk.animation_data.action
|
act=sk.animation_data.action
|
||||||
data = []
|
data = []
|
||||||
|
other_keys = mdl.keys[:]
|
||||||
if frame.type:
|
if frame.type:
|
||||||
for j in range(frame.numframes):
|
for j in range(frame.numframes):
|
||||||
co = []
|
co = []
|
||||||
|
@ -326,8 +327,18 @@ def build_actions(mdl):
|
||||||
if j < frame.numframes - 1:
|
if j < frame.numframes - 1:
|
||||||
co.append ((frame.numframes * 1.0, 0.0))
|
co.append ((frame.numframes * 1.0, 0.0))
|
||||||
data.append((frame.frames[j].key, co))
|
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:
|
else:
|
||||||
data.append((frame.key, [(1.0, 1.0)]))
|
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)
|
set_keys (act, data)
|
||||||
|
|
||||||
def get_base(name):
|
def get_base(name):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue