Switching Curve Shapekeys in Edit Mode go haywire if relative to one another #78701

Open
opened 2020-07-07 12:55:06 +02:00 by Sven Hollesen · 14 comments

System Information
Operating system:
Linux

Blender Version
Broken in 2.79 onwards
Worked in 2.78

Possibly caused by
6f1493f68f
5e1d4714fe

Short description of error
Shapekeys on curves do not reset properly when switching between them in edit mode, and one shapekey is relative to another.

Exact steps for others to reproduce the error
Select the circle and enter edit mode. Repeatedly switch between shapekeys 'Key 1' and 'Key 2' while staying in edit mode. 'Key 2' will change over time from just this.
bug_report_shapekeys_curve.blend

How to reproduce the scene
Create a Curve object. Add Basis, Key 1, Key 2 shapekeys. Set 'Key 2' relative to 'Key 1'. Select 'Key 1' and translate/scale it.

**System Information** Operating system: Linux **Blender Version** Broken in 2.79 onwards Worked in 2.78 Possibly caused by 6f1493f68f 5e1d4714fe **Short description of error** Shapekeys on curves do not reset properly when switching between them in edit mode, and one shapekey is relative to another. **Exact steps for others to reproduce the error** Select the circle and enter edit mode. Repeatedly switch between shapekeys 'Key 1' and 'Key 2' while staying in edit mode. 'Key 2' will change over time from just this. [bug_report_shapekeys_curve.blend](https://archive.blender.org/developer/F8675243/bug_report_shapekeys_curve.blend) **How to reproduce the scene** Create a Curve object. Add Basis, Key 1, Key 2 shapekeys. Set 'Key 2' relative to 'Key 1'. Select 'Key 1' and translate/scale it.
Author

Added subscriber: @kiriri-1

Added subscriber: @kiriri-1

#81322 was marked as duplicate of this issue

#81322 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm, this dates back to 2.79 even.

Can confirm, this dates back to 2.79 even.
Member

Added subscriber: @mont29

Added subscriber: @mont29
Member

Probably related to
6f1493f68f
5e1d4714fe

rna_Object_active_shape_update also calls ED_curve_editnurb_load / calc_shapeKeys, that might cause the unwanted sideeffects?
(not sure if it should restore to editcurve in that case? -- had a quick try, without luck though.)

@mont29 might be more familiar here?

Probably related to 6f1493f68f 5e1d4714fe `rna_Object_active_shape_update` also calls `ED_curve_editnurb_load` / `calc_shapeKeys`, that might cause the unwanted sideeffects? (not sure if it should restore to editcurve in that case? -- had a quick try, without luck though.) @mont29 might be more familiar here?
Author

The cause is indeed in calc_shapeKeys . Another related bug : Modifying 'Key 1' if 'Key 2' is related to 'Key 1' and 'Key 3' is related to 'Key2' will not modify 'Key 3' at all, unless 'Key 2' has been selected after 'Key 1'.
There's a fundamental design flaw in the first part of calc_shapeKeys, where it only checks directly related keys for updates. I don't want to open a new report for this, since it's the same code that's causing it.

The cause is indeed in calc_shapeKeys . Another related bug : Modifying 'Key 1' if 'Key 2' is related to 'Key 1' and 'Key 3' is related to 'Key2' will not modify 'Key 3' at all, unless 'Key 2' has been selected after 'Key 1'. There's a fundamental design flaw in the first part of calc_shapeKeys, where it only checks directly related keys for updates. I don't want to open a new report for this, since it's the same code that's causing it.
Author

I have a fix for the transitivity problem I mentioned today.
Still don't understand what's causing the initial issue though.
I can provide a patch if the initial issue gets solved.

I have a fix for the transitivity problem I mentioned today. Still don't understand what's causing the initial issue though. I can provide a patch if the initial issue gets solved.
Sven Hollesen self-assigned this 2020-07-10 20:15:55 +02:00
Author

This issue is a bottleneck for our current project. I'm rewriting calc_shapeKeys from the ground up and have a working prototype. I don't think a simple fix would cut it.

This issue is a bottleneck for our current project. I'm rewriting calc_shapeKeys from the ground up and have a working prototype. I don't think a simple fix would cut it.
Member

In #78701#976971, @kiriri-1 wrote:
This issue is a bottleneck for our current project. I'm rewriting calc_shapeKeys from the ground up and have a working prototype. I don't think a simple fix would cut it.

That is great to hear [the fact that you have working version - not so that you ran into this issue in the first place].
If you think you can share, please post a diff.

> In #78701#976971, @kiriri-1 wrote: > This issue is a bottleneck for our current project. I'm rewriting calc_shapeKeys from the ground up and have a working prototype. I don't think a simple fix would cut it. That is great to hear [the fact that you have working version - not so that you ran into this issue in the first place]. If you think you can share, please post a diff.
Member

Added subscriber: @NKO

Added subscriber: @NKO
Author

curve_haywire_fix.diff
Some relevant code comments claim issues with animation if the changes in this patch were to be applied. I assume something like animall point animation was meant, but could not replicate any issues. Any idea who wrote those?

[curve_haywire_fix.diff](https://archive.blender.org/developer/F9607728/curve_haywire_fix.diff) Some relevant code comments claim issues with animation if the changes in this patch were to be applied. I assume something like animall point animation was meant, but could not replicate any issues. Any idea who wrote those?

Added subscriber: @Mysteryem-2

Added subscriber: @Mysteryem-2
Philipp Oeser removed the
Interest
Modeling
label 2023-02-09 15:29:11 +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
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#78701
No description provided.