Bone driver leading to cyclic dependency (used to work in 2.79) #64793

Open
opened 2019-05-18 13:06:14 +02:00 by lucas veber · 26 comments

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67

Blender Version
Broken: version: 2.80 (sub 69), branch: master, commit date: 2019-05-18 09:53, hash: 7fd015bb70
Worked: 2.79b

Short description of error
When the scale transform value of a bone is driven by its rotation value, a cyclic dependency is reported in the console (and it slows down script execution).
This scenario used to work in Blender 2.79 without cyclic dependency.

Exact steps for others to reproduce the error

**System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 419.67 **Blender Version** Broken: version: 2.80 (sub 69), branch: master, commit date: 2019-05-18 09:53, hash: `7fd015bb70` Worked: 2.79b **Short description of error** When the scale transform value of a bone is driven by its rotation value, a cyclic dependency is reported in the console (and it slows down script execution). This scenario used to work in Blender 2.79 without cyclic dependency. **Exact steps for others to reproduce the error** - Open the following blend file, it just contain a bone with a driver: rotation.x -> scale.y: [driven_bone_cyclic_dependency.blend](https://archive.blender.org/developer/F7045163/driven_bone_cyclic_dependency.blend) - See the error message in the console
Author

Added subscriber: @LucasVeber

Added subscriber: @LucasVeber

#73236 was marked as duplicate of this issue

#73236 was marked as duplicate of this issue

#69101 was marked as duplicate of this issue

#69101 was marked as duplicate of this issue

#72899 was marked as duplicate of this issue

#72899 was marked as duplicate of this issue

#71540 was marked as duplicate of this issue

#71540 was marked as duplicate of this issue

#66883 was marked as duplicate of this issue

#66883 was marked as duplicate of this issue

#65570 was marked as duplicate of this issue

#65570 was marked as duplicate of this issue

Added subscriber: @brecht

Added subscriber: @brecht
Sergey Sharybin was assigned by Brecht Van Lommel 2019-05-18 13:36:02 +02:00

As far as I know this case is not considered a bug. While in some situations it might work, in general there is an actual dependency cycle here both in 2.79 and 2.80.

As far as I know this case is not considered a bug. While in some situations it might work, in general there is an actual dependency cycle here both in 2.79 and 2.80.
Author

It would be sad if it's not considered as a bug. Most 3D softwares out there can do this... it would be quite a limitation for rigging :'-(
Blender riggers were so happy to hear that 2.8 dependency graph is supposed to be more powerful than Blender 2.79 one... In this case it would be a regression.

It would be sad if it's not considered as a bug. Most 3D softwares out there can do this... it would be quite a limitation for rigging :'-( Blender riggers were so happy to hear that 2.8 dependency graph is supposed to be more powerful than Blender 2.79 one... In this case it would be a regression.
Author

Added subscriber: @angavrilov

Added subscriber: @angavrilov
Author

@angavrilov , if I may ask, maybe you know a fix for this?

@angavrilov , if I may ask, maybe you know a fix for this?

Added subscribers: @aroefer, @Sergey, @JacquesLucke

Added subscribers: @aroefer, @Sergey, @JacquesLucke

Added subscribers: @christopher.burns, @mano-wii

Added subscribers: @christopher.burns, @mano-wii

Added subscriber: @NizarAmous

Added subscriber: @NizarAmous

Added subscribers: @piotr-14, @lichtwerk, @dr.sybren

Added subscribers: @piotr-14, @lichtwerk, @dr.sybren
Sergey Sharybin removed their assignment 2020-01-06 11:18:07 +01:00
Member

Added subscriber: @Chalouek

Added subscriber: @Chalouek

The dependency graph should treat any properties with a driver as separate evaluation nodes (like with custom properties), or treat the driver evaluation nodes themselves as representing it.

I.e. when another driver depends on such property, it should depend on the introduced placeholder node, or the driver node that actually generates the value, instead of depending on the nodes that actually evaluate the bone and don't influence the value of the property in any way. In general, it may be that all dependencies on 'animatable' properties should depend either on the input driver (if exists), the animation node, or just COW if it's not animated at all - but never on the bone nodes, because if the property is actually influenced by evaluating the bone, it should not be animatable.

There already is code to track which properties are animated, so it probably should not be that difficult to extend that system to this use?

The dependency graph should treat any properties with a driver as separate evaluation nodes (like with custom properties), or treat the driver evaluation nodes themselves as representing it. I.e. when another driver depends on such property, it should depend on the introduced placeholder node, or the driver node that actually generates the value, instead of depending on the nodes that actually evaluate the bone and don't influence the value of the property in any way. In general, it may be that all dependencies on 'animatable' properties should depend either on the input driver (if exists), the animation node, or just COW if it's not animated at all - but never on the bone nodes, because if the property is actually influenced by evaluating the bone, it should not be animatable. There already is code to track which properties are animated, so it probably should not be that difficult to extend that system to this use?

@angavrilov I agree, that would be a good way to go.

As it stands now, however, this seems to be a known limitation of the current design, rather than a bug. When I rotate the bone in the example blend file, the scale is updated via the driver as well, so in a sense it "works". The fact that 2.79 didn't detect/complain about this is a different thing.

@angavrilov I agree, that would be a good way to go. As it stands now, however, this seems to be a known limitation of the current design, rather than a bug. When I rotate the bone in the example blend file, the scale is updated via the driver as well, so in a sense it "works". The fact that 2.79 didn't detect/complain about this is a different thing.
Member

Added subscribers: @olsarxd, @EAW

Added subscribers: @olsarxd, @EAW
Member

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Member

Just a note: using self as a python expression fixes this. (or maybe just quiets it?)

driven_bone_cyclic_dependency_fixed_with_self_python_expression.blend

Just a note: using self as a python expression fixes this. (or maybe just quiets it?) [driven_bone_cyclic_dependency_fixed_with_self_python_expression.blend](https://archive.blender.org/developer/F8376517/driven_bone_cyclic_dependency_fixed_with_self_python_expression.blend)

I commented about this in another bug report (not sure which one). But I think part of the problem here is that we have no clear distinction between transform values before and after constraint evaluation.

We should have a transform channel input variable setttings that lets you use the transform before or after constraints Then you don't need to use RNA paths for this kind of setup at all.

For the RNA path in this file, I think that should be considered the transfrom before constraints, and probably the relation here is set up assuming it's the value after constraints (which would be a cyclic dependency in general)?

I commented about this in another bug report (not sure which one). But I think part of the problem here is that we have no clear distinction between transform values before and after constraint evaluation. We should have a transform channel input variable setttings that lets you use the transform before or after constraints Then you don't need to use RNA paths for this kind of setup at all. For the RNA path in this file, I think that should be considered the transfrom before constraints, and probably the relation here is set up assuming it's the value after constraints (which would be a cyclic dependency in general)?

Added subscriber: @KonstantinsVisnevskis

Added subscriber: @KonstantinsVisnevskis

Yeah, this is quite limiting in rigging. Having one transform channel dependent on another one is quite common - a jaw hinge or even simple rolling action. Having to create multi-bone rig for that seems wasteful.
It works however for some reason to use Self pointer (which often is an invaluable saver btw). But unfortunately, it requires allowing script execution regardless of what it tries to access, and that is a source of problems in collaborative projects, not to mention safety.

I'm totally blabbing here, but could a transformation channel driver that is not referring to any external (other object) variables be evaluated immediately after the transformation at all times? I don't know if it is possible, but from rigger's logic there's no use in treating driver as a separate evaluation node in case like this. I mean - if someone creates a loop this way - there's nothing anyone could do about that anyway.

Yeah, this is quite limiting in rigging. Having one transform channel dependent on another one is quite common - a jaw hinge or even simple rolling action. Having to create multi-bone rig for that seems wasteful. It works however for some reason to use Self pointer (which often is an invaluable saver btw). But unfortunately, it requires allowing script execution regardless of what it tries to access, and that is a source of problems in collaborative projects, not to mention safety. I'm totally blabbing here, but could a transformation channel driver that is not referring to any external (other object) variables be evaluated immediately after the transformation at all times? I don't know if it is possible, but from rigger's logic there's no use in treating driver as a separate evaluation node in case like this. I mean - if someone creates a loop this way - there's nothing anyone could do about that anyway.

Reclassifying this task from TODO to Design, as the task is not concrete enough to actually start implementation.
See the 2020-11-12 module meeting notes for more information.

Reclassifying this task from TODO to Design, as the task is not concrete enough to actually start implementation. See the [2020-11-12 module meeting notes](https://devtalk.blender.org/t/2020-11-12-animation-rigging-module-meeting/16092) for more information.
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:36:41 +01:00
Philipp Oeser added the
Interest
Core
label 2023-02-10 11:09:57 +01:00
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
9 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#64793
No description provided.