Page MenuHome

Animated material : Drivers broken when duplicating object or appending from other file
Closed, ArchivedPublic


Animated material : Drivers are broken when duplicating an object object or appending an object supporting a driver from an other file.

Blender 2.63 and previous.

Hello, it is a pity that I can connect only today when 2.63 official is out !
I desperately tried to report this problem in the past two weeks before the release of the official 2.63, but never achieved to login on the Bugtracker (always got an HTTP 500 internal server error).

Someone gave me a trick to turnaround the problem, but it is tedious to apply when managing with many objects.

The problem is described in the tread below :

Example files to experiment with (try to duplicate/append object and get the random color system controlled by drivers work individually) :

System : Win7x64pro. Intel QX9650-3GHz - RAM 8GB - Geforce GTX260 - Motherboard Asus P5K.

Thanks for reading.

Best regards,

Philippe Roubal.


To Do

Event Timeline

This is a bit of a tricky setup, how did you create the drivers? I wouldn't expect such a driver path to be possible to create without typing it in manually, usually drivers should only control properties on the same datablock that the driver is attached to. If it's possible to create such a setup by just clicking, probably that would be considered a bug.

The material datablock exists separately from the object, so when you create a driver on the object that changes something in the material datablock, and then duplicate the object, both those drivers will be changing the same material. Which of the two then writes last determines which color the material gets, quite random.

When you make the material single user, its name changes, and you need to change the driver path to be "Material.001" instead of "Material", and click Update Dependencies a bit lower in the graph editor to refresh.

When you append and there's a material with the same name in the file already, the Material also gets renamed, so the driver path again needs to be changed. Linking will go ok in this case.

It's no clear to me what exactly then the bug is here. If it's possible to create such setups through the UI, that should probably be fixed. But the file as it was setup seems to be behaving correct under duplicating/append, we can't really support such driver setups to work totally reliable, even if we allow such manually created driver setups for advanced users.

Thank you for your response.

Just consider the example file below, and forget the other one that is more complicated and not actually usefull in my current project.

The setup has been made through the UI. I don't understand what you mean. I am totally hopeless at coding, so I never script and use Blender functions as they are without coding anything. So, I used only the UI. Someone gave me a trick to correct manually the materials slots by typing in the Drivers RNA field, but this is not used in the provided file. It seems to not be possible to type in the RNA field before the problem occurs (after duplicating and making Single Users). If it was possible to type the good parameters when creating the Driver, it could solve the problem, but I didn't found how to. I think that it could be possible in the Outliner, but I haven't found the right RNA branch.

The behaviour of the setup as shown doesn't behave as expected : currently, if you duplicate the cube, the duplicated cube has exact color as the original one, and moving either of them changes the colors of the two cubes in the same way. After Making the copy Single User, its driver doesn't work at all.

The expected thing is that the duplicated cube should show different colors than the original one, as the drivers use the individual cube location.

As a reminder, the goal of the system is allowing a new set of materials colors for characters clothes in a crowd, each time you duplicate a character and move its starting point. The goal is to get a large diversity of cloth colors without any effort for the user. Each character of group of characters is parented to a reference object (a Curve or an Empty) also used as Driver target.

There's too much complexity in this report - ok it's late already :)

Is this summary correct:

Duplication of objects causes drivers to not work, because the object name changed, and it does not correct this in the RNA paths elsewhere.

Hi Ton, Thank you for giving an eye to this report. I have left this problem aside for a while, because I had to go forward, and I decided that characters will be added at the end of the project.

I think that the formulation is right :

Duplication of objects causes drivers to not work, because the object name changed, and it does not correct this in the RNA paths elsewhere.

Best regards,


OK: but then I have to mark this as a todo item.
Such manipulations of RNA paths is nowhere in our code afaik, it would need to be coded very carefully - things easily can go bad.

This is why brecht suggested to keep rna paths local - starting at its own base ID.

Added a note for future developers here:

Ton Roosendaal (ton) closed this task as Archived.Oct 25 2012, 1:44 PM

Thank you very much for the response. And congratulations for Tears of Steel ! I have received the DVD two days ago. Well done, one more time !o)