2
$\begingroup$

I have an object called "Template" and it has several shape keys, one of which is called "Speaking". Another is called "[AVERAGE]", which I want to be the value of the average of all its other shape keys. This is for animation.

Where I'm running into the problem is with the RNA syntax.

Here is where I am trying to add the variable for the Shape Key named "Speaking" to the Driver of the Shape Key named "[AVERAGE]" and as you can see by the red - it's not a valid path:rm

RNA path invalid

Here is where I have found the RNA path of the object in the Outliner:

Object RNA path

What am I doing wrong? I have tried various variations of syntax, but nothing has worked.

Thanks

$\endgroup$
2
$\begingroup$

The data_path on a driver variable is relative to the ID object you select, in your case objects "Template". The location x path from here would be "location.x" or "location[0]" for example.

Select key as an ID object instead and your keyset. An example path to "Key 1" key's value is demonstrated in image.

enter image description here

Alternatively from the mesh bpy.context.object.data.shape_keys which returns a pointer to a bpy.data.shape_keys keyblock.

enter image description here

Screenshot of average shapekey driver setup

enter image description here

PS. The panel on RHS is a shameless plug for my Driver Manager Addon.

$\endgroup$
  • $\begingroup$ You rock! Thank you. I found what appears to be a download page for your add-ons but the page is blank when I visit it. Also, from your screen shot it looks like the button sizes are hard-coded and therefor not displaying correctly on Retina Display. Maybe looking at this bug report will be helpful to you - the same problem occurred in Blender's standard UI and was fixed. $\endgroup$ – Mentalist Nov 24 '15 at 11:25
  • $\begingroup$ @Mentalist github.com/batFINGER/batFINGER-blender-addons drop the folder sound_drivers into an addons folder. I've hardcoded in some scale_x and scale_y values on my interface to squeeze more info in. $\endgroup$ – batFINGER Nov 24 '15 at 11:42
1
$\begingroup$

Please consider

[New Shape From Mix]

available from the Shape Keys panel. The menu below the plus + and minus -.

enter image description here

I suggest you use only the facilities of the shape key mechanism. Create a new shape key from some combination of two or more existing ones. This is a feature of shape keys that exists already.

When [Relative] is enabled the value [Value] can be animated. Influence or weight might have been a better name for discussion purposes.

If that does not provide enough flexibility or ease of expression you might consider creating another object001 which is not rendered. This object001 has has a simple property such as x-rotation that is used to control the influences of multiple shape keys. This paragraph is motivated by your comment below.

I believe you cannot put an arbitrary expression as a path.

$\endgroup$
  • $\begingroup$ Ah, but you see... (and I should have mentioned this) this needs to animate. So creating a new shape key will not solve this. $\endgroup$ – Mentalist Nov 24 '15 at 8:03
  • $\begingroup$ Shape keys have weights which can be animated. Will that work to any degree? I am calling the Value on the panel under Relative ... the weight. Linear interpolation as one example. $\endgroup$ – atomicbezierslinger Nov 24 '15 at 8:06
  • $\begingroup$ Well the goal is to have a Shape Key that will react to the others when they are animated. For example, imagine there is a Shape Key for bass and another for treble, and then a third driven one that displays the averaged volume. So as the song plays, this averaging Shape Key is adjusting its position based on the waveforms of the bass and treble Shape Keys. I'm just picking a musical example because I think it's easy to imagine (my mesh uses other values, not musical waveforms). $\endgroup$ – Mentalist Nov 24 '15 at 8:37
  • $\begingroup$ See notes above please. $\endgroup$ – atomicbezierslinger Nov 24 '15 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.