Page MenuHome

Drivers: duplication won't preserve targeted objects
Closed, ArchivedPublic


System Information
Windows 8.1 x64
Renderer: GeForce GTX 650/PCIe/SSE2
Vendor: NVIDIA Corporation
Version: 4.4.0

Blender Version
Broken: 2.69.8 36279af

Short description of error
Targeted objects are not preserved when duplicate with single driver.

Exact steps for others to reproduce the error

  1. Open blend file
  2. Select 1st object (3 drivers rotation) and duplicate it = driver targets are preserved
  3. Select 2nd object (1 driver location) and duplicate it = driver targets are not preserved
  4. Select last object and duplicate it = driver targets are not preserved

Here is the image of which targets I am talking about



Event Timeline

Mikhail Rachinskiy (alm) set Type to Bug.
Mikhail Rachinskiy (alm) created this task.
Mikhail Rachinskiy (alm) raised the priority of this task from to Needs Triage by Developer.
Lukas Toenne (lukastoenne) triaged this task as Normal priority.

What happens here is an automatic re-targetting of ID block references on duplicating:

Any pointer inside duplicated objects, which points to one of the duplicated objects, is set to the respective new object copy.

For a single object this means that only references from this object to itself are re-targetted.

  • The first object's drivers use the object itself -> gets re-targeted
  • The second object's driver uses *a different object* which is not duplicated along with it -> no re-targeting
  • The third object's driver uses a different object -> no re-targeting. The Shape Keys are actually a separate datablock which IIRC is not duplicated along with the object, so even if it referenced the same object that link may get lost / end up wrong.

It's not ideal, but can't think of an unambiguous way to do it better ...

Sorry I messed up with the example, yes the issue is appearing only with shapekeys.

Well this is a very serious flaw, with current system it is not possible to make simple animations with many objects in relation to the distance between empty and the object itself, like this:

@Lukas Toenne (lukastoenne), is it something solvable with current design or it's a limitation of it a rather a TODO?

I think this is not strictly speaking a bug. We could consider extending the duplication such that:

Any Object pointer referenced by a duplicated Object or a nested data block (i.e. shape keys) is redirected

However, this leads us into ambiguous territory. By their nature, data blocks such as shape keys can be shared among many different objects. Redirecting driver targets when any of these is duplicated might work in one case but have undesired results in others. It might be difficult to prevent circular references and such.

I would prefer to leave the system as it is now, only modify Object pointers directly inside Object data blocks.

@Mikhail Rachinskiy (alm): For the use case you describe, where a great number of objects need to be set up with correct drivers, it's preferable to write a specialized tool (i.e. a python script). The generic duplicate operator simply is not capable of guessing the desired outcome correctly.

@Lukas Toenne (lukastoenne) or implement a new object target selectors such as:
This object - pointing at current object, similar to jQuery $(this)
Parent object - pointing at parent object from current object, similar to jQuery $(this).parent()

Of course This object selector would not be possible for all modifiers or constraints, and it is no way to be implemented in the near future (or implemented at all). Just my thoughts on how selector system could be augmented, if you have intentions about it.

Sergey Sharybin (sergey) closed this task as Archived.May 19 2014, 5:27 PM
Sergey Sharybin (sergey) claimed this task.

Agree with Lukas. Moving to TODO

Thanks for the report, but closing it now.