Make the basis shape key active on import.

Blender must have an active shape key before shape key animation will work.
This fixes the models being locked to the first frame until a shape key is
selected via the UI.
This commit is contained in:
Bill Currie 2011-09-24 11:43:06 +09:00
parent bd840726c2
commit 3b33d8dade
1 changed files with 1 additions and 0 deletions

View File

@ -151,6 +151,7 @@ def make_shape_key(mdl, framenum, subframenum=0):
def build_shape_keys(mdl):
mdl.keys = []
mdl.obj.shape_key_add("Basis")
mdl.obj.active_shape_key_index = 0
for i, frame in enumerate(mdl.frames):
frame = mdl.frames[i]
if frame.type: