1
$\begingroup$

I am trying to use sound to drive my animation like in the second section of this tutorial (https://www.youtube.com/watch?v=OAes-ITNaGA&ab_channel=quollism)

I have created a utility bone with 'bake sound into f curve' and I am trying to paste the property to my right arm bone. The utility bone moves as I would like but when I try to link it to the right arm bone, it does not work.

I have tried pasting the absolute path of the custom property while it is in Pose Mode, which is bpy.data.armatures["Armature.006"]["sound final"] but I am getting an ERROR: Invalid Python expression and my curve is still the default one as opposed to changing into the sound curve. I notice in the tutorial, it looks like the path is something like pose.bone["name"] but I am unable to get a path like that despite it being a single bone and in pose mode.

Is there something wrong with the Expression being var or my path?

Thanks so much!


driver path of arm bone: enter image description here

what I want the driver path to look like: enter image description here

$\endgroup$
1
$\begingroup$

Drive the pose bone custom property.

Please note, didn't see the image correctly, it appears you have baked sound onto armature bone (the structure). In most cases recommend using the pose bones, which belong to the rig object, not the rig. If you really want to use the armature bones, go to second part of answer

Check out examples here https://docs.blender.org/manual/en/latest/animation/drivers/workflow_examples.html#workflow-examples

Without checking the tute, you are going down the garden path. Am assuming this custom property is on a pose bone of the object (pose mode), not a bone of the objects armature data (edit mode).

In example below have a property "prop" on a pose bone named "Bone". This was set in pose mode, with bone selected in the Custom Properties Panel with Bone tab selected. Consider this the prop I have baked sound on. Change names to suit your case

enter image description here

The object of interest is

bpy.data.objects["Armature"]

not

bpy.data.armatures["Armature"]

which btw is

bpy.data.objects["Armature"].data

In driver variables we do not use this as the data path instead choose the ID object, be it an Object or an Armature, a Mesh etc etc.. It is an Object type in this case.

enter image description here

For a single property type driver variable the path is relative to object selected as the driver variable target. Hence in case above this is

bpy.data.objects["Armature"]

and the path to the custom property from here is

pose.bones["Bone"]["prop"]

This can be copied from the UI by right clicking over property and choosing "Copy Data Path" and pasting into path field of driver. Result of paste.

pose.bones["Bone"]["prop"]

Using the Armature bone

On closer inspection it appears you have driven the armature bone. Would suggest changing this to the pose bone for most use cases.

If it is the case, then select the armature from Armatures when creating driver variable and use

enter image description here

bones["Bone"]["prop"]

as the path. As can be copied from

enter image description here

in object mode.

$\endgroup$

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.