Extensions:2.6/Py/Scripts/Rigging/Shape Key Drivers
< Extensions:2.6 | Py | Scripts | Rigging
2014年10月12日 (日) 07:47時点におけるwiki>Koilzによる版 (page refresh)
Shape Key Drivers
UI location | 3D View > Pose Mode > Properties > Shape Key Drivers | ||
---|---|---|---|
Usage | Rigging, Shape Keys, Drivers | ||
Version | 1.5 | Author(s) | Koilz |
Blender | 2.70.0 | License | GPL |
Category | Rigging | Distribution | Extern |
Note(s) | _ |
File name | shape_key_drivers_15.py |
---|---|
Current version download | shape_key_drivers_15.py |
Python modules | bpy, math |
External Python Modules or dependencies | _ |
Warning | _ |
---|---|
Links | T41944 |
Known Issues | Tested on 2.70a, 2.72tb1. |
目次
Description
- The addon adds shape keys with drivers to the selected mesh + active pose bone, saves time rigging.
- The addon can add shape key drivers for basic pose bone transformations.
- Also, the addon can generate 'node based drivers' for corrective shape keys.
- These type of shape keys are usually used to correct bad deformations on mesh objects when rotating pose bones.
Transform Workflow
Workflow for transform shape key drivers.
- Select an armature bone in Pose Mode.
- Go to 3D View > Properties > Shape Key Drivers.
- Select the mesh to add shape keys to.
- Select the desired transformation.
- Press Generate Transform.
- Modify the shape key.
Nodes Workflow
Workflow for node based shape key drivers.
Generate Nodes
- Select an armature bone in Pose Mode.
- Go to 3D View > Properties > Shape Key Drivers.
- Select the mesh to add shape keys to.
- Press Generate Nodes.
This should generate a sphere of 25 nodes and 25 shape keys each with driver. When you point the pose bone to the node, this should set the corresponding shape key value to 1.00.
After pressing Generate Nodes, if you switch to Object Mode, the selected nodes can moved to a different layer by pressing M.
Note that the transition between shape keys work best when the bones Y rotation is locked. Rotation can be locked in the Transform panel. If using an IK chain, check the IK panel in Properties > Bone.
Modify Shape Key
- If using an Armature Modifier on the target mesh, enable the settings for the Armature Modifier, Show in edit mode, Apply modifier cage during edit mode.
- Enable Apply shape keys in edit mode, this setting is useful for when multiple shape key values are > 0.0.
- First pose the bone so it point towards the node you want to make corrective shape key for.
- Select the corresponding shape key (The value should be near 1.0).
- In the 3D view, switch to edit mode, move the mesh vertices to a better position.
- When done, switch to object mode.
- Repeat the second set of steps for each corrective shape key.
- When finished, to save memory, you can remove unused shape keys, though this is not required.
Nodes Examples
- Addon not required to test.
ファイル:SKD example.blend ファイル:SKD example2.blend
Note, only some of the shape keys have been modified.
Versions
- 1.0 - shape_key_drivers.py - File download.
- Generate Nodes
- 1.1 - shape_key_drivers_11.py - Right click, save target as.
- Generate Transform
- Mesh object ID was not being used, works now.
- 1.2 - shape_key_drivers_12.py - Right click, save target as.
- Generate Nodes operator stopped working, works now.
- 1.3 - shape_key_drivers_13.py - File download.
- Fix - Some classes were being registered on unregister.
- Fix - Use mesh object from scene not data.
- Mod - Driver variable uses space enum return string.
- Mod - Rewrote node reparent code.
- Upd - Transform value is added to the end transform shape key.
- Upd - Mode is restored back to pose mode.
- 1.4 - shape_key_drivers_14.py - File download.
- Fix - Gen nodes, error if pose bone had no parent bone, added warning.
- Fix - Error when no mesh object selected, added warning.
- Fix - Active shape key error when selected mesh was on hidden 3d view layer, fixed.
- 1.5 - shape_key_drivers_15.py - File download.
- Fix - Removed node _0, its not required.
- Mod - Moved properties to pointer property.
- Upg - Scaled nodes based on bone length.
- Upg - Show node names by default.