Animated material : Drivers broken when duplicating object or appending from other file #31161

Closed
opened 2012-04-28 17:25:01 +02:00 by Philippe Roubal · 8 comments

%%%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 :

http://blenderartists.org/forum/showthread.php?252718-Animated-material-Driver-broken-when-duplicating-object.

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

http://3d-synthesis.com/BlenderTests/ColorDriver_07.blend

http://3d-synthesis.com/BlenderTests/ColorDriver_08.blend

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

Thanks for reading.

Best regards,

Philippe Roubal.%%%

%%%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 : http://blenderartists.org/forum/showthread.php?252718-Animated-material-Driver-broken-when-duplicating-object. Example files to experiment with (try to duplicate/append object and get the random color system controlled by drivers work individually) : http://3d-synthesis.com/BlenderTests/ColorDriver_07.blend http://3d-synthesis.com/BlenderTests/ColorDriver_08.blend System : Win7x64pro. Intel QX9650-3GHz - RAM 8GB - Geforce GTX260 - Motherboard Asus P5K. Thanks for reading. Best regards, Philippe Roubal.%%%

Changed status to: 'Open'

Changed status to: 'Open'

%%%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.%%%

%%%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.

http://3d-synthesis.com/BlenderTests/ColorDriver_07.blend

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.

%%%

%%%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. http://3d-synthesis.com/BlenderTests/ColorDriver_07.blend 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. %%%
Member

%%%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.%%%

%%%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,

Philippe.%%%

%%%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, Philippe.%%%
Member

%%%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:
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Animation%%%

%%%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: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Animation%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

%%%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)%%%

%%%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)%%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#31161
No description provided.