Animation not updated when the active shape index isnt set
Closed, ResolvedPublic

Description

See attached blend file. Follow instructions in the internal script "bug" to reproduce the bug.

After generating shape keys per python the shape keys appear in "object data / shape keys". But moving the time slider doesn't animate the object in the 3D view. You first have to click with the mouse into the shape key list box (object data / shape keys) and select one of them, which apparently triggers some internal update. This manual step is tedious / not practicable when you shape-animate many objects that way (which is usually the whole point of scripting).

System: Win 7 64bit
Blender versions tested: 2.64a, 2.65a





Details

Type
Bug

SOLUTION / WORKAROUND:

The problem does not occur if the shape keys (or at least one of them) are added via:

bpy.ops.object.shape_key_add

instead of of

bpy.context.object.shape_key_add

I wouldn't know what the difference is... but Campbell does!

bpy.ops.object.shape_key_add() is the call made by the add-button in the "object data / shape keys" panel. So I guess it performs some internal update.

bpy.context.object.shape_key_add() seems to modify the internal object data, without notifying the rest of the system about it.

Joshua Leung (aligorith) closed this task as "Resolved".Jan 5 2013, 1:48 PM

Add Comment