Variables in Blender

lately I asked myself if there is any possibility to define some kind of variables inside Blender.
What I want to do: I have a huge scene with very much beveled edges. All these edges are modeled by bevel-modifiers with 4 segments. To increase my render-time when rendering test-renders, I’d like to set all bevels to let’s say 2 segments. Is there any possibility to do this automatically? For example define some Variable n and tell all modifiers they should use n segments?

Such “variables” exist in the form of drivers. Any value in Blender that can be keyframed can also be driven. This includes the Segments property of the Bevel modifier.

Here’s an example blend file that demonstrates the setup. One of the cubes is already selected so you could see the driver set up in the graph editor: it has one variable named ‘var’ which gets its value from a custom property. That custom property belongs to an Empty object (WGT_BevelMaster) and is named “Bevel Segments”. If you select that Empty (which is in the center of the scene) you can see and change that property, and all the modifiers will follow along.

Note that when you open the file, you might get a warning at the top, and a button “Reload Trusted”. Press it: it’s Blender’s safety measure against autorunning Python scripts embedded in .blend files.

Great, thank you!

That’s exactly what I was looking for :slight_smile: