System Information
Win8, GTX1070
Blender Version
Broken: 2.79
Short description of error
When trying to set the active shapekey by name using active_shape_key (from an object) I get an error: AttributeError: bpy_struct: attribute "active_shape_key" from "Object" is read-only
Setting the active shape key with an index using active_shape_key_index does work, so why can't you set the active shape key by name (string) using active_shape_key?
(If a string isn't desirable data.shape_keys.key_blocks[name] would be fine too)
Exact steps for others to reproduce the error
From default cube scene:
- Select the cube object and add two shape keys.
- Open the python console.
- Type C.selected_objects[0].active_shape_key = "Basis"
- You get the above error.
- Type C.selected_objects[0].active_shape_key_index = 0
- You successfully changed the active shape key.
Expected: both should have the same result.