Drivers are not re-linking data when duplicating objects #36626

Closed
opened 2013-09-01 12:18:38 +02:00 by chaos · 8 comments
Member

Duplicates: #31161

%%%--- Operating System, Graphics card ---
RAM: 2GB
CPU: AMD Athlon X2 4800+
GFX: Nvidia GeForce 8400GS
Driver: 310.14
OS: LinuxMint 14 64 bits

- Blender version with error ---

Blender 2.68a (r58536)

- Short description of error ---

It just happens with some of them. Re-linking is working well with general purpose drivers, like those available for Loc, Rot, Scale, Modifiers or Constraints, but there are still some of them that get ignored when duplicating objects. Those are some inherent drivers that should be duplicated, like the value for Shapes in Meshes and Curves, or Extrusion and Offset for Curves.

Some drivers in which I've found this behaviour:

  • Meshes: Shape Keys (Value, Min and Max Ranges)

  • Curves: Shape Keys, Smooth (Twisting), Offset, Extrude, Depth, Resolution, Start-End Bevel Factor, Frames (Path Animation), Evaluation Time, Resolution

  • Surfaces: Shape Keys, Order (U and V), Resolution (U and V)

  • Metaballs: This isn't producing any driver at all. View, Render and Threshold aren't displaying in Drivers, in the Graph Editor, though is generating some empty Datablocks without Channels.

  • Text: Everything on texts doesn't duplicate drivers. Exact same case as Curves.

  • Lattices: Shape Keys. Drivers generated by Lattices aren't working for U, V and W values, even when they appear to be working in Graph Editor.

  • Armatures: All parameters for Armature Object and Bones.

  • Speakers: Like Metaballs, they do not generate any driver for Volume nor Pitch.

  • Camera: Everything on cameras doesn't duplicate drivers.

  • Lamps: Everything on lamps doesn't duplicate drivers.

    • Steps for others to reproduce the error (preferably based on attached .blend file) ---
      In the attached .blend, I show you two examples of driver duplication. There are two cubes on top of camera's view. The left of them is the original, which have a Property named 'prop', who drives the Z scaling of the same Object, so I can control it's Z Scale from the Custom Property on Object Context or from 3DView. To it's right is the duplicated cube who inherited the original driver and then re-linked the data to the newly created object. That's why I can control their Z Scaling independently. This is how all should work.
      Now, in the bottom of camera's view you'll see two deformed cubes. The left of them is the original. In this case, the object have a Shape Key named 'key 1' whose value is intended to be driven the same way as the example above. When we change the Property value it works ok, but when we duplicate the object (The deformed cube at right), it doesn't duplicate the drivers of the original cube, so when we want to drive the Shape Key for the second object using its own Property, it just does nothing, because one have to change the object data manually in the Graph Editor. By default, this behaviour makes the first Object's Property to drive both cubes at the same time, and this is very bad, specially with complex set-ups. So, everytime we need to duplicate an Object with Shape Keys, all data have to be manually re-linked along all its drivers.

If you want more details about the steps:

  1. Create a Shape Key for default Cube (Basis)
  2. Create a key 1, enter edit mode, move some vertices
  3. Add a driver for key 1 "Value"
  4. In Object Context and Custom Properties, add a new property (prop). Copy its value's data path
  5. In Graph Editor > Drivers, select key 1 and make Averaged Value, Single Property, assign the same object who owns the Property (Cube) and paste the Propery path. Now the key 1 value should be driven by the Property.
  6. Duplicate the object to the right and try to use its own Property to drive its Shape Key. Not possible, so you are forced to manually change that object in the Graph Editor (Cube.001). This should be automatically, as Loc, Rot, Scale drivers does.

Hope it helps, and sorry to extend so much about this topic.
Kind Regards.
%%%

**Duplicates**: #31161 %%%--- Operating System, Graphics card --- RAM: 2GB CPU: AMD Athlon X2 4800+ GFX: Nvidia GeForce 8400GS Driver: 310.14 OS: LinuxMint 14 64 bits - Blender version with error --- Blender 2.68a (r58536) - Short description of error --- It just happens with some of them. Re-linking is working well with general purpose drivers, like those available for Loc, Rot, Scale, Modifiers or Constraints, but there are still some of them that get ignored when duplicating objects. Those are some inherent drivers that should be duplicated, like the value for Shapes in Meshes and Curves, or Extrusion and Offset for Curves. Some drivers in which I've found this behaviour: - Meshes: Shape Keys (Value, Min and Max Ranges) - Curves: Shape Keys, Smooth (Twisting), Offset, Extrude, Depth, Resolution, Start-End Bevel Factor, Frames (Path Animation), Evaluation Time, Resolution - Surfaces: Shape Keys, Order (U and V), Resolution (U and V) - Metaballs: This isn't producing any driver at all. View, Render and Threshold aren't displaying in Drivers, in the Graph Editor, though is generating some empty Datablocks without Channels. - Text: Everything on texts doesn't duplicate drivers. Exact same case as Curves. - Lattices: Shape Keys. Drivers generated by Lattices aren't working for U, V and W values, even when they appear to be working in Graph Editor. - Armatures: All parameters for Armature Object and Bones. - Speakers: Like Metaballs, they do not generate any driver for Volume nor Pitch. - Camera: Everything on cameras doesn't duplicate drivers. - Lamps: Everything on lamps doesn't duplicate drivers. - Steps for others to reproduce the error (preferably based on attached .blend file) --- In the attached .blend, I show you two examples of driver duplication. There are two cubes on top of camera's view. The left of them is the original, which have a Property named 'prop', who drives the Z scaling of the same Object, so I can control it's Z Scale from the Custom Property on Object Context or from 3DView. To it's right is the duplicated cube who inherited the original driver and then re-linked the data to the newly created object. That's why I can control their Z Scaling independently. This is how all should work. Now, in the bottom of camera's view you'll see two deformed cubes. The left of them is the original. In this case, the object have a Shape Key named 'key 1' whose value is intended to be driven the same way as the example above. When we change the Property value it works ok, but when we duplicate the object (The deformed cube at right), it doesn't duplicate the drivers of the original cube, so when we want to drive the Shape Key for the second object using its own Property, it just does nothing, because one have to change the object data manually in the Graph Editor. By default, this behaviour makes the first Object's Property to drive both cubes at the same time, and this is very bad, specially with complex set-ups. So, everytime we need to duplicate an Object with Shape Keys, all data have to be manually re-linked along all its drivers. If you want more details about the steps: 1) Create a Shape Key for default Cube (Basis) 2) Create a key 1, enter edit mode, move some vertices 3) Add a driver for key 1 "Value" 4) In Object Context and Custom Properties, add a new property (prop). Copy its value's data path 5) In Graph Editor > Drivers, select key 1 and make Averaged Value, Single Property, assign the same object who owns the Property (Cube) and paste the Propery path. Now the key 1 value should be driven by the Property. 6) Duplicate the object to the right and try to use its own Property to drive its Shape Key. Not possible, so you are forced to manually change that object in the Graph Editor (Cube.001). This should be automatically, as Loc, Rot, Scale drivers does. Hope it helps, and sorry to extend so much about this topic. Kind Regards. %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Here's what seems to be happening:

  1. When duplicating an Object: BKE_object_relink is called, which in turn relinks the animdata of the Object data block. All drivers in this animdata will then be redirected to the duplicated data blocks, including the object itself as well as it's data (which is also duplicated).

  2. Using a driver on a different data block like shape keys or the object data (mesh, lamp, etc.) will NOT be relinked, even if associated to the duplicated object and duplicated along with it.

There just seems to be no concept for relinking data blocks in general, this feature is limited to Object atm. Need to discuss if it's feasible to implement.%%%

%%%Here's what seems to be happening: 1. When duplicating an Object: BKE_object_relink is called, which in turn relinks the animdata *of the Object data block*. All drivers in this animdata will then be redirected to the duplicated data blocks, including the object itself as well as it's data (which is also duplicated). 2. Using a driver on a *different* data block like shape keys or the object data (mesh, lamp, etc.) will NOT be relinked, even if associated to the duplicated object and duplicated along with it. There just seems to be no concept for relinking data blocks in general, this feature is limited to Object atm. Need to discuss if it's feasible to implement.%%%
Author
Member

%%%Duplicating Shape Keys drivers data when doing real duplications (Ctrl+D) would be the most logical thing. One more thing to remember is that Shape Keys aren't the only kind of per-object data that should de duplicated, at least from a user perspective. I understand this could be problematic in blender architecture, so take your time.%%%

%%%Duplicating Shape Keys drivers data when doing real duplications (Ctrl+D) would be the most logical thing. One more thing to remember is that Shape Keys aren't the only kind of per-object data that should de duplicated, at least from a user perspective. I understand this could be problematic in blender architecture, so take your time.%%%
Member

%%%There is already a Todo item for this:
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Animation_System%%%

%%%There is already a Todo item for this: http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Animation#Animation_System%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Added subscriber: @ZauberParacelsus

Added subscriber: @ZauberParacelsus

This issue also occurs with objects linked in from File->Link. Both with duplicating the linked instance, and with linking in a new instance from File->Link

This issue also occurs with objects linked in from File->Link. Both with duplicating the linked instance, and with linking in a new instance from File->Link

Added subscriber: @DavidJeske

Added subscriber: @DavidJeske
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
4 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#36626
No description provided.