Cartoon Dog

@minoribus help I don’t think I would have made it.

Here is an update. I have been workin on some shape keys for Patches and I am having trouble with the driver for the chin.


Now I can’t seem to get his mouth to close. I have several more to do as you tell from the list. So please help me.

Thanks

It was my pleasure :slight_smile:

So, now you have a shape key to open his mouth, you have a bone to control the shape key, and you have set up a driver for it. The driver is bound to the control bone. Everything is fine. But it needs some different settings to make it work. I’m sure my settings aren’t the only possibility but at least they are one possibility.

  • Set the driver type to scripted expression.
  • Set the space attribute of the transform channel to transform space instead of world space.
  • Delete the modifier
  • In the expression field right below “scripted expression” type “var * -1”.

Then you should be done.


@minoribus thank you but now I am getting an error on this.
Did get the mouth closed but now I have this error

error on

“var * -1”.
What do i do now?


Try clicking update dependencies. Also go into the user preferences, File there is a section called ‘auto execution’ make sure ‘auto run python scripts’ is checked. Save the prefs.

Thanks Photox I went to the user preferences and updated that. But I am still getting the error Invalid python expression
which is located under Scripted Expression I have var * -1 but I thought changing it to var "-1 which didn’t work.
What is the correct var for this.

Try saving the blend, closing the blend, and reopening it. The expression looks correct, it’s a security thing I think.

There is a button in the header bar, which reads “reload trusted”. This is a new security feature since some versions. Scripts and scripted expressions in drivers aren’t executed automatically. After you pressed that button or after you enabled automatic script execution (which can be dangerous if someone sends you a malicious script) everything should work.

thanks Photox I had done that and I still am getting that error
Minribus I no longer have the

“reload trusted”
on the header bar.

Hm, your screenshot clearly shows the autorun error with scripts. What is the exact error message you are getting now? And where does the error show?

here is it is
when I go into edit he is selected and his mouth opens but not in pose mode and hit g to move that driver does nothing


Remove the double quote at the beginning it should read:
var * -1

Yes, that’s it.

I copied that from yours and it is still there.

Did you delete the double quote ( " ) ?

Move the bone again

Photox Yes I deleted the " and I clicked on that driver for mouth down and nothing happens. When I click on the neck bone in pose mode the head moves.

Spanishrose, we can only help you if you give us some information. In your first screenshot the error was about autorunning scripts. We fixed that. In your second screenshot there was a typo (the double quote does not belong there, no quotes at all) and with the line, that Photox posted this error should be also gone.

If there is still an error something else is happening. If you enter the information exactly as I showed in my screenshot in #42 no error should happen. I tested it in Blender, before I posted #42.

I clicked on that driver for mouth down and nothing happens. When I click on the neck bone in pose mode the head moves.

Hm, you open and close the mouth by moving the bone CTRL.chin, right?

Sorry about being such a pain about this. I appreciate your help minoribus and Photox
Here is the blend file

when you say bone are you talking about the driver? I have been clicking on the driver for the chin.

http://www.pasteall.org/blend/31475

OK, I got it.

The message “invalid python expression” comes from the fact that you have a blank behind the word var in the variable declaration. Therefore the scripted expression tries to operate on a non defined variable. For Python "var " is something else than “var”.

Remove that blank and just hop into the field for the scripted expression. Don’t change anything there and hop out of that field. The panel is updated then and the error is gone. You should also delete the modifier.

Yay, the second video I posted today :wink: Happy Blending!

minoribus Thank you so much for your help. I know nothing about python so I wasn’t sure what was going on.

Now Quesition I have several more to do and I know that I can copy/paste then go and click on ob/bone for each movement that I want Patches to do Should I copy/paste or should do one at a time.

Photox thanks for your help as well.

I would do one by one.

The benefit of bones driving shape keys is, that you can animate the character and its facial expressions by only animating the armature. But you know that you can animate shape keys also without a bone/driver setup? You can set keyframes directly for the values of shape keys. Although drivers can be handy, for example when you want to do corrective shape keys, they are not really necessary in your case.

So it’s up to you if you want to continue practising the setup of drivers or if you skip it this time.