9

I have learned a few minutes ago that you can type # into a numbutton to create a driver. So far the only value I know is frame. While this works nicely, it's still a bit limiting. What are the other possibilities I can input to create a driver on the fly which is a great feature btw?

Haunt_House
  • 16,049
  • 5
  • 48
  • 78

1 Answers1

8

frame is currently the only updated value in the driver namespace. The rest are functions, available for use in scripted expression driver through bpy.app.driver_namespace.

Several modules are already pre-imported to the driver namespace, like builtins, bpy, math, and mathutils.noise. So, other than frame, and unlike manually-registered functions, functions from these modules are available to scripted expression by default.

Adhi
  • 14,310
  • 1
  • 55
  • 62
  • 1
    Can we get more examples? #noise.random() is an option. I suspect other noise types might work if they return a float number value instead of a vector (x, y, z) value. docs.blender.org/api/current/mathutils.noise.html – Coby Randal Feb 22 '21 at 02:43