Problem with python and driver

posted to: Wheel Drivers

Hi Wayne,

I use Blender 3.6 and I a problem with the driver "DEF-Wheel_Front.L" (and the others 3 bones) when I write "auto_rotate(0)" in the driver: error Python.

  • Martin Bergwerf replied

    Hi Massimiliano mmazinga ,

    That could be almost anything...

    Can you please provide a link to your .blend file (after uploading it to Dropbox, Googledrive, or so)?

  • Massimiliano Grasso(mazinga) replied

    Thank you Martin,

    here is the file: https://www.dropbox.com/s/d2bjglqffybm2fh/32%20-%20monster-truck_model.21.blend.zip?dl=0


    1 love
  • Adrian Bellworthy replied
    Solution

    The issue is in the naming, it usually is.
    The names used in the script need to match exactly to the names of the rig/bones.

    Check your spelling of Monster_Truck_RIG, I see an extra t, Montster in several places.
    Once you go through and check the spelling of each Monster in the outliner,
    right click the y rotation (purple) for each DEF-Wheel, select edit driver, check the expression is correct for each wheel, then click update dependencies.

    The wheel rotation should now work correctly.

    • Thanks Adrian!
    1 love
  • Massimiliano Grasso(mazinga) replied

    Thank you very much

    you are right, I had made a lot of mistakes, the fault of my bad English.

    Now it works.

    • πŸ‘
    1 love
  • Wayne Dixon replied

    I'm glad you all got it working.

    Tu sei Englese non cativo ma il mio italiano e molte cativo!

    (I'm guessing you are Italian, and that you can read my bad grammar and spelling - I may be wrong on both of those things.)

    • πŸ€œπŸ€›
    2 loves
  • Adrian Bellworthy replied

    I would never have been able to help solve this problem without your courses Wayne!

    1 love
  • Igor Albuquerque(IgorGustavo) replied
    I had a similar naming issue, and maybe it’s a good idea to document it here so others can benefit from this in the future.

    My general spelling was correct, but somehow, in the lesson "Rigging the Wheels", I forgot to include the word "Direction" in every bone name. This was a mistake from the past, so it was quite hard to figure out where the problem was, especially since the Drivers tab didn’t display anything other than "Python error."

    To identify where your mistake is, you can go to the Window tab and select "Toggle System Console." Follow the steps in the video, and this console window will show you exactly where your error is.

    • πŸͺπŸ™Œ
    • πŸ‘
    1 love