Certain drivers fail to copy when copying a full scene #66641

Closed
opened 2019-07-10 04:19:57 +02:00 by James Hopkins · 11 comments

System Information
Operating system: Linux-5.1.16-arch1-1-ARCH-x86_64-with-arch 64 Bits
Graphics card: GeForce GTX 750 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.26

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-03 19:06, hash: cc667854a9

Short description of error
When copying a scene with drivers using certain camera functions (unsure what, if any, other parameters are affected) the copied object's drivers will still target the original scene's driver's bones- unlike every other driver and parent object. Possibly only related to the camera object. In the .blend file provided the copied camera's "orthographic scale" driver and "passpartout" driver fail to update to the current scene's objects and instead refer to the original scene.

Exact steps for others to reproduce the error
Copy scene with drivers applied to camera object, select copied bone(s) and pose them, fail to update camera. Can be manually corrected.

system-info.txt

camera-driver-bug-cc.blend

**System Information** Operating system: Linux-5.1.16-arch1-1-ARCH-x86_64-with-arch 64 Bits Graphics card: GeForce GTX 750 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.26 **Blender Version** Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-03 19:06, hash: `cc667854a9` **Short description of error** When copying a scene with drivers using certain camera functions (unsure what, if any, other parameters are affected) the copied object's drivers will still target the original scene's driver's bones- unlike every other driver and parent object. Possibly only related to the camera object. In the .blend file provided the copied camera's "orthographic scale" driver and "passpartout" driver fail to update to the current scene's objects and instead refer to the original scene. **Exact steps for others to reproduce the error** Copy scene with drivers applied to camera object, select copied bone(s) and pose them, fail to update camera. Can be manually corrected. [system-info.txt](https://archive.blender.org/developer/F7580456/system-info.txt) [camera-driver-bug-cc.blend](https://archive.blender.org/developer/F7580457/camera-driver-bug-cc.blend)
Author

Added subscriber: @JamesHopkins-3

Added subscriber: @JamesHopkins-3

#47828 was marked as duplicate of this issue

#47828 was marked as duplicate of this issue

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

I copied the active scene from your example file (chose Full Copy), but can't reproduce the issue. The "sliders" still manipulate the camera in the same scene. Maybe re-test if this is still an issue in the most recent daily build?

I copied the active scene from your example file (chose Full Copy), but can't reproduce the issue. The "sliders" still manipulate the camera in the same scene. Maybe re-test if this is still an issue in the most recent daily build?
Author

In #66641#717154, @dr.sybren wrote:
I copied the active scene from your example file (chose Full Copy), but can't reproduce the issue. The "sliders" still manipulate the camera in the same scene. Maybe re-test if this is still an issue in the most recent daily build?

I downloaded my example file to test on today's current Windows build and the problem remains the same. I did not download the latest blender 2.8 build for Linux but did create a more concise example .blend file to demonstrate (hopefully) the problem. The main problem, that I'm finding, is that the parameters for the Object Data are not updating to the copied object when copying over to a full scene. When I manually copy the object (camera) and bone object, the drivers correctly update. This appears to be the case for all Object Data sliders, but I have not extensively tested that, nor if it happens to non-camera objects.

The .blend attached has four bones, the two left bones manipulate the X and Y position of the camera, and the other two bones manipulate the X and Y shift on the camera's Object Data. When copied from a full scene copy, the shift object drivers fail to update to the new scene's bones and instead refer to the original scene's bone object. (should be Armature.001, instead it is Armature on the copied scene)

I am sorry if my original explanation was vague or unclear, as I had only uploaded the original blend file and did not strip out unnecessary elements. Some bones in the original file do work as intended, and I did not properly point that out I feel. I hope this blend file is repeatable on your end.

driver-bug-cc.blend

> In #66641#717154, @dr.sybren wrote: > I copied the active scene from your example file (chose Full Copy), but can't reproduce the issue. The "sliders" still manipulate the camera in the same scene. Maybe re-test if this is still an issue in the most recent daily build? I downloaded my example file to test on today's current Windows build and the problem remains the same. I did not download the latest blender 2.8 build for Linux but did create a more concise example .blend file to demonstrate (hopefully) the problem. The main problem, that I'm finding, is that the parameters for the Object Data are not updating to the copied object when copying over to a full scene. When I manually copy the object (camera) and bone object, the drivers correctly update. This appears to be the case for all Object Data sliders, but I have not extensively tested that, nor if it happens to non-camera objects. The .blend attached has four bones, the two left bones manipulate the X and Y position of the camera, and the other two bones manipulate the X and Y shift on the camera's Object Data. When copied from a full scene copy, the shift object drivers fail to update to the new scene's bones and instead refer to the original scene's bone object. (should be Armature.001, instead it is Armature on the copied scene) I am sorry if my original explanation was vague or unclear, as I had only uploaded the original blend file and did not strip out unnecessary elements. Some bones in the original file do work as intended, and I did not properly point that out I feel. I hope this blend file is repeatable on your end. [driver-bug-cc.blend](https://archive.blender.org/developer/F7585220/driver-bug-cc.blend)

This is why a minimal example is so important (and it still isn't minimal, it has twice the number of bones necessary to show the problem, no need to do both X and Y).

I can confirm the bug though. It appears that drivers on objects are updated to point to the copied targets correctly, but drivers on object data are still pointing to the original targets.

To reproduce the bug:

  • Make a Full Copy of the scene.
  • Select the camera in the new scene.
  • Run this code:
print(C.object.animation_data.drivers[1].driver.variables[0].targets[0].id)
print(C.object.data.animation_data.drivers[1].driver.variables[0].targets[0].id)

Both should print <bpy_struct, Object("Armature.003")>, but the 2nd one prints <bpy_struct, Object("Armature")> instead.

This is why a *minimal* example is so important (and it still isn't minimal, it has twice the number of bones necessary to show the problem, no need to do both X and Y). I can confirm the bug though. It appears that drivers on objects are updated to point to the copied targets correctly, but drivers on object data are still pointing to the original targets. To reproduce the bug: - Make a Full Copy of the scene. - Select the camera in the new scene. - Run this code: ``` print(C.object.animation_data.drivers[1].driver.variables[0].targets[0].id) print(C.object.data.animation_data.drivers[1].driver.variables[0].targets[0].id) ``` Both should print `<bpy_struct, Object("Armature.003")>`, but the 2nd one prints `<bpy_struct, Object("Armature")>` instead.
Sybren A. Stüvel self-assigned this 2019-10-01 12:47:07 +02:00

Added subscriber: @mont29

Added subscriber: @mont29
Sybren A. Stüvel was unassigned by Bastien Montagne 2019-10-01 14:48:19 +02:00
Bastien Montagne self-assigned this 2019-10-01 14:48:19 +02:00

Will steel that one and commit a dirty band-aid that should fix that case and many other similar ones, but the whole 'make single user' (and scene copy) code needs a complete rewrite at some point to get a sane behavior…

Will steel that one and commit a dirty band-aid that should fix that case and many other similar ones, but the whole 'make single user' (and scene copy) code needs a complete rewrite at some point to get a sane behavior…

This issue was referenced by cba1bdc400

This issue was referenced by cba1bdc40071cbdb90122db121a643f761edeb36

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscribers: @FabienDevaux, @ideasman42, @Sergey

Added subscribers: @FabienDevaux, @ideasman42, @Sergey
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#66641
No description provided.