Metlivi Studio

How to Repair a Blender Camera DOF Driver That Ignores an Empty’s Custom Property

To repair a Blender camera depth-of-field driver, connect the Empty’s numeric custom property through a Single Property driver variable, then check the camera setting receiving it. If you drive Focus Distance, clear the camera’s Focus Object: an assigned object disables the distance setting. Blender Manual: Cameras

This guide is for a scene creator who already has an Empty acting as a camera controller, but changing its custom property produces no apparent focus change. The procedure uses Blender 4.5 LTS documentation and follows one test signal from the controller to the rendered result. UI labels may show “Focal Distance” or “Focus Distance”; the underlying property is focus_distance.

1. Identify which depth-of-field setting the Empty should control

First decide what your custom property represents. A distance control moves the plane of focus; an aperture control changes how strongly out-of-focus areas blur. Blender exposes these separately as focus_distance and aperture_fstop, with use_dof enabling camera depth of field. Lower F-stop values produce more defocus. Blender Python API: CameraDOFSettings

For example, imagine a scene containing a small ceramic vase in front of a patterned box. A property named focus_distance should let you transfer focus between their surfaces. A property named aperture should adjust blur while preserving the chosen focal plane. Write down the intended destination before editing the driver.

Intended control Camera destination What to check first
Move focus using a number Focus Distance Clear Focus Object
Adjust blur strength Aperture → F-Stop Confirm the property is connected to F-Stop
Follow a positioned Empty Focus Object Move the assigned Empty to choose focus

An Empty’s position and its custom property are separate controls. Assigning the Empty as Focus Object does not tell Blender to read a custom numeric property on it. Choose the numeric-distance workflow below when you want an explicit distance slider; keep object-based focus when positioning a target is the intended task. Blender Manual: Cameras

2. Verify the source property before repairing the driver

Select the controller Empty and open its Object Properties → Custom Properties. For the example below, use an Empty named Focus_Control with a property named focus_distance. Configure it as a Float, then change its current value to 4.0. A floating-point property supports the fractional distances needed for fine adjustment. Blender’s custom-property editor also lets you configure its name, allowed range, default, and display precision. Blender Manual: Custom Properties

Use a positive range that covers your scene—for an illustrative small test, 0.1 through 20.0. These are example inputs, not recommended limits for every project. Confirm that typing 4.0 and then 8.0 actually changes the current property value.

Edit the displayed value during this test. Changing Default Value changes the value used by Reset to Default Value; it does not serve as the live focus adjustment. Also check that the property is a single number rather than a string or array. Blender Manual: Custom Properties

3. Reconnect the camera driver to the correct Empty and path

Select the camera whose image you intend to render. In Camera Data Properties → Depth of Field, enable depth of field. For a numeric Focus Distance driver, remove any assigned Focus Object before testing. Blender Python API: CameraDOFSettings

Right-click the distance field and choose Edit Driver. If the field has no driver, choose Add Driver. Blender provides these operations through the property’s context menu, along with access to the full Drivers Editor. Blender Manual: Usage

Configure the connection as follows. The RNA path is relative to the selected source ID; custom properties use bracket-and-quote notation. Blender Manual: Drivers Panel

Driver setting Example value
Type Scripted Expression
Variable name focus
Variable type Single Property
ID Type Object
ID The Empty Focus_Control
RNA Path ["focus_distance"]
Expression focus

Keep the property name and variable name distinct in your thinking: focus_distance is the key stored on the Empty; focus is the variable used in this driver’s expression. Replace the example key with the exact name of your existing property, including capitalization and spaces.

For a fresh one-to-one connection, Blender also offers Copy As New Driver on the source property, followed by Paste Driver on the destination. Use that shortcut only when replacing the destination driver is intentional; retain and edit an existing expression if it contains a mapping you still need. Blender Manual: Usage

4. Locate the failure with a two-value test

Test 4.0 and 8.0 on the Empty, watching the variable’s Value, the Driver Value, and the camera’s distance field. Blender exposes the first two specifically to inspect the driver’s input and result. If Fallback is enabled, temporarily disable it while diagnosing: a fallback can supply a constant when the path cannot resolve. Blender Manual: Drivers Panel

The following decision table is a diagnostic sequence derived from those observable stages. It helps you choose the next inspection without repeatedly rebuilding the entire connection.

Observation when changing 4.0 to 8.0 Next inspection
The Empty’s value does not change Check its property type and allowed range
The Empty changes, but the variable does not Recheck source ID, property spelling, and RNA path
The variable changes, but the driver result does not match Check the expression and variable name
The driver result changes, but the camera value differs Inspect the driver’s F-Curve mapping and modifiers
The camera distance changes, but focus appears unchanged Check Focus Object, DOF enablement, and the rendered comparison

Keep the first pass one-to-one: input 4.0 should produce distance 4.0, and input 8.0 should produce distance 8.0. Once that works, restore any deliberate scaling or offset. Testing a complex mapping first makes it harder to tell whether the source connection itself works.

5. Repair dependency updates and unintended curve processing

If the driver expression directly looks up the Empty through bpy.data, replace that lookup with the configured variable. Blender recommends accessing scene data through driver variables so dependencies are tracked correctly. After correcting the connection, use Update Dependencies, then repeat both test values. Blender Manual: Drivers Panel

Treat an apparent refresh after pressing the button as a reason to retest. The useful result is repeatable behavior: change the source value several times and confirm that the destination follows each change.

If the input and expression look correct but the final camera value is unexpected, open the Drivers Editor and inspect the selected channel’s curve and modifiers. Temporarily mute modifiers one at a time, recording the original setup. Blender’s F-Curve modifiers can reshape output: a Generator creates a polynomial function, while a Limits modifier can clamp values. Their header checkboxes let you disable them without deleting their settings. Blender Manual: F-Curve Modifiers

For example, if increasing the controller beyond a particular value stops increasing the camera distance, look for a Limits modifier with a maximum Y value. If the output follows a consistent but unintended scale or offset, inspect the Generator coefficients. Preserve any intentional mapping before making changes.

6. Prove the repair with a visible focus change

Use a controlled comparison after the numbers agree. In a duplicate scene or a separate test file, arrange a small patterned card about four scene units in front of a perspective camera and another about eight units away. Offset them sideways so both remain visible. Keep the camera stationary and use the same lighting and render settings for both images.

Use a moderate focal length such as 50 mm and an illustrative F-stop of 1.4. Clear Focus Object and render once with the controller at 4.0, then again at 8.0. Enable the camera’s Viewport Display → Limits to inspect the distance marker as an additional check. Blender documents both this marker and the stronger defocus produced by lower F-stop values. Blender Manual: Cameras

Look for a transfer of sharp detail between the near and far cards. Their exact sharpest distances depend on the surfaces you placed, so adjust the test distances if necessary. This is an illustrative verification setup, not a measured rendering result.

If the numbers track correctly but both images look similar, make the depth separation and surface detail easier to see before changing the driver again. Conversely, if the distance marker remains stationary, return to the numeric test. This separates a connection failure from a visual comparison that is too subtle.

7. Restore the intended controller behavior

Once the one-to-one distance test succeeds, restore the expression your scene actually needs. For example, a normalized controller named blend, deliberately limited to 0.0 through 1.0, can use the expression 4.0 + 4.0 * blend to map that range to distances from four through eight. This is an illustrative linear mapping: test its two endpoints and midpoint before animating it.

If your original destination was F-Stop, apply the same source-variable checks to that field, but judge the result by changing blur strength around a fixed focal plane. Focus Object may remain assigned in that workflow because it supplies focus while F-Stop controls defocus. Blender Python API: CameraDOFSettings

A repaired controller should pass both checks: its numeric output follows the intended mapping, and the rendered image responds in the intended way. Keep the two test values available until your original scene passes both; they give you a repeatable reference if later edits change the camera setup.

Sources