0
$\begingroup$

I am scaling a cube to 1.000 when it is close to a driver (empty placed in the center of the world). The cube has a driver with distance to the empty. See animation below and this works fine.

Issue

But let's say I have multiple object I wanted to animate, and I want to use a single parent to animate them it stops working. If I parent the cube to an empty or use a copy location constraint on the cube linked to the empty I want to animate it does not work.

The driver does not update the var or value (which is the distance from the cube to the empty in the centre) will stay 0. I can click the update dependencies button to mock the update but this is not a solution.

I tried to play with the Transform Spaces, placing them in any sort of combination.

Example

Example

Edit:

It shows a basic example with some default values for the driver attached to the cube. The cube has an empty object as parent. It does not scale the same as the animated gif shows.

My expectation is that the cube will scale the same with an empty as parent, so my question is. Is it possible to make the driver work?

$\endgroup$
2
  • $\begingroup$ i just tried it out...and it works. But if i look at your description and especially at your driver...you have a scripted expression there and "not just" a distance. So it would be a good idea to create a clean example, upload the blend file and try to describe in easy words what you have and what you expect so we can help you. $\endgroup$
    – Chris
    Oct 27, 2022 at 10:51
  • $\begingroup$ @Chris thank you for looking. I added a clean example in the edited question above. $\endgroup$
    – Bravebox
    Oct 27, 2022 at 12:30

2 Answers 2

0
$\begingroup$

The problem is that Blender skips the driver update because both objects (the cube and the empty target) have no change during the animation. So the solution to this problem is that we need to somehow tell the dependency graph that something has changed, please update the driver. So the only solution I can easily find is to insert a keyframe for an empty target or cube. If the object has some animation data, the dependency graph considers it changed during the animation and updates drivers linked to it.

$\endgroup$
1
  • $\begingroup$ Thanks for taking a look! Not really sure what you mean. But the cube has no animation. That is what I want the driver to be for. I thought setting any kind of Transform space would fix it. I tried adding keyframes as you suggested but no luck (it might be because of my inexperience :)). In the end I will have a small city of shapes and I thought animation a single Empty would be nicer. Thanks! $\endgroup$
    – Bravebox
    Nov 3, 2022 at 9:41
0
$\begingroup$

Adding a dummy driver, so that the parent is target, you can resolve the dependency problem.

enter image description here

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .