Addon - Shape Key Drivers

Generate shape key drivers for the active pose bone.

http://wiki.blender.org/uploads/7/70/Addon_SKD_12.PNG

More info + download: Shape Key Drivers

If you have any idears how to make your workflow better (Todo with generating shape key drivers), I may try code them in the future… No promises.

Hi dirty-stick,
this looks like a really nice addon. Unfortunately I am getting this error:

Traceback (most recent call last):
File “C:\blender-2.71-windows64\2.71\scripts\addons\shape_key_drivers_13.py”, line 333, in execute
op_gen_node_skd(self, context)
File “C:\blender-2.71-windows64\2.71\scripts\addons\shape_key_drivers_13.py”, line 181, in op_gen_node_skd
context.active_object.active_shape_key.name = nodes[i].name
AttributeError: ‘NoneType’ object has no attribute ‘active_shape_key’

I am getting this message after pressing “Generate Nodes”
Tested on Windows 7 64bit / Blender 2.70, 2.71, 2.72RC

Any ideas on what went wrong? Thanks a lot!
RC

hi. Thanks for bug.
Ive found it may be something todo with the selected mesh being on a hidden layer.
Ill try fix it for next release.

The script should work if you enable the layer the mesh object is on.
Shift+LMB, little squares in the 3d view header.

Release 1.4.
The error should be fixed.

Hi,
thanks for the info - it is true that the mesh was on a hidden layer and unhiding it solved the problem. I have a few questions now that I have tried the addon:

1 - the node based workflow creates a lot of shape keys. I presume that it can grow the scene a lot in terms of file size etc. And I assume that sometimes a lot of those nodes/shape keys are not necessary to achieve the desired correction. Wouldn’t it make sense to have some easy way to delete the unnecessary nodes and shape keys?

2 - I made a simple test of the functionality (Example.blend (1.27 MB)). The basic pose is in frame 0, the modified shape key is fully active at frame 1. I would expect it to be fully inactive at frame 2 (when the bone is facing another node), just like it is on frame 3 - but that is not the case here.

3 - One workflow idea:
1: User creates mesh and armature and sets up armature deformation.
2: User selects and rotates a armature bone as necessary
3: User activates function (“make node”)
4: Blender creates a node based on the armature bone current rotation and creates a shape key with drivers for that position
5: User edits/sculpts the shape key

This way it would be possible to create only the necessary nodes and in custom places.

Once again thanks a lot for your help and generosity. Have a nice day!

RC

hi.

  1. Yea, thats correct.
    Though im not sure how to code such a way to delete or not create unused shape key drivers.
    One could limit nodes to an axis, i.e. dont create any for x axis. Though im not sure.
    Or maybe a list could be generated, then the user could deactive nodes in the tool settings panel.
    I havnt done such tests yet, but I guess I could try it sometime.
    I usually manually delete the emtpies and shape keys not used, which also deletes the drivers.

  2. I forgot to remove the _0 node again, from the code.
    The _0 is not really used, its the same as the Basis shape key.
    It doesnt seem to mess the deformations up, but its not really required.

  3. Ye, thats a cool idear.
    Ive been thinking about this one also, though it seem to become complicated.

Creating one node or driver is ok, because the distance or angle from the rest pose to the new rotation is known. i.e. 0.0* - 90.0*.
The problem is, when one creates the second node, the code has to update the driver settings for previous nodes.
I.e, if one creates a node at 90, then a node at 45, the nodes change from [0-90] to [0-45][45-90].
And if one creates a node at 90, then a node at 180, the nodes change from [0-90] to [0-90][90-180].
Its pretty wierd.

Maybe there is a way to solve this with a recalculation script, I dunno.
It is easy to implement such a thing for one node on each axis, -x, +x, -z, +z.

Thanks for trying the addon.

Hi,
1 - It may be a good idea to write a little about removal of unused nodes and shape keys in the addon description. It may save a megabyte here and there :slight_smile:

I really like the idea to simplify the shape key deformation process. At the moment it is IMHO rather complicated. I wish you the best of luck with that!

RC

Hello!
I was wondering, is it possible to create shapekeys using a lattice deformer? I’m attempting to animate a flattened pair of eyes using lattice deformers to deform a couple of spheres. In order to achieve a cartoony look while maintaining a 360 degree rotation I’ve been animating those eyes with the lattices applied. Unfortunately, I need to export these eyes as an FBX to be imported into a game engine, and I recently learned that the FBX format does not support lattices, but they do support shape keys. If I were to create shape keys with a deformer applied, would the shape key maintain the deformation when the lattice is removed? Is there a better way to go about this that would make my workflow a little bit faster?

I added some notes about removing shape keys on the wiki.

About the lattices, I dont know much about lattices.
I know the Lattice modifier has an option to Apply as Shape Key, though I think this only applies the current deformation.
For animation I guess you would keyframe the shape key value to get the lattice deformation.

The lattice modifier and shape key system is a bit different, though I guess you could get near the same visual effect if you wanted to.
Im not sure how could help with this, people on the animation sub forum could probably help more.
I guess you want to convert lattice deformations in to shape key deformations.

Might you please post the link, the wiki is actually quite confusing, mixed links to 2.49 and search impossible.

Thanks,
paolo

Thank you for your reply! I haven’t checked the animation sub forum yet but I will be sure to check there next. I would also love to take a look at the notes you posted when you get a chance to post a link. :slight_smile:

Sorry. I meant to say the addon description on the wiki, same link as the first post.
I added some notes to the Modify Shape Key section, about removing shape keys.

Heres a link.
#Modify_Shape_Key

Thank you dirty-stick

EDIT: On the page there’s a typo: “Desciption” instead of Description

paolo

Fixed, thanks.

Release 1.5.
Not much change, just some fixes.