Clear and Keep Transformation not working when keyed #97628

Closed
opened 2022-04-26 15:33:46 +02:00 by Julien Kaspar · 8 comments
Member

System Information
Operating system: Linux-5.4.0-109-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.103.01

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-26 06:51, hash: 2492d9852b
Worked: (newest version of Blender that worked as expected)

Short description of error
The issue that occurs here is when you have an object parented to another. If the parent has since then been transformed and the child has has the same transformation keyed, then it's not possible to unparent the child and keep the current transformations.
Instead the transforms will stay the same as the keyed value when unparenting,

My expected behaviour is that it will update the transform values just like when not keyed, but will require the user to key the new value. Otherwise the new value is lost once the current frame is moved.
Maybe this is too simple of a solution, but updating the entire animation would be too complicated.
But there should be an option to keep the transform anyway. Or at least a warning why it doesn't.

Exact steps for others to reproduce the error

  • Create 2 cubes
  • Parent one cube to the other (Now refereed to as parent & child)
  • Move, rotate or scale the parent
  • Key the same transform of the child
  • Select the child and press Alt + P and select "Clear and Keep Transformations"
**System Information** Operating system: Linux-5.4.0-109-generic-x86_64-with-glibc2.31 64 Bits Graphics card: Quadro GP100/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.103.01 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-04-26 06:51, hash: `2492d9852b` Worked: (newest version of Blender that worked as expected) **Short description of error** The issue that occurs here is when you have an object parented to another. If the parent has since then been transformed and the child has has the same transformation keyed, then it's not possible to unparent the child and keep the current transformations. Instead the transforms will stay the same as the keyed value when unparenting, My expected behaviour is that it will update the transform values just like when not keyed, but will require the user to key the new value. Otherwise the new value is lost once the current frame is moved. Maybe this is too simple of a solution, but updating the entire animation would be too complicated. But there should be an option to keep the transform anyway. Or at least a warning why it doesn't. **Exact steps for others to reproduce the error** - Create 2 cubes - Parent one cube to the other (Now refereed to as parent & child) - Move, rotate or scale the parent - Key the same transform of the child - Select the child and press `Alt + P` and select "Clear and Keep Transformations"
Author
Member

Added subscriber: @JulienKaspar

Added subscriber: @JulienKaspar

Added subscriber: @iss

Added subscriber: @iss

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

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

Other operators like apply/clear transform do actually overwrite keyed values, so I would assume this can be done. So will confirm, even if this may be currently working as designed.

Other operators like apply/clear transform do actually overwrite keyed values, so I would assume this can be done. So will confirm, even if this may be currently working as designed.

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

In #97628#1347260, @iss wrote:
Other operators like apply/clear transform do actually overwrite keyed values

I don't see any calls for this in the OBJECT_OT_transform_apply code.
A test also shows that this doesn't happen:

#97628-apply-transform-when-keyed.blend

  • Open the file. The teapot starts sitting on top of the cube.
  • Drag the playhead around, see the teapot is animated.
  • Press {key Ctrl A} and apply all transforms.
  • Drag the playhead around, see the teapot is now no longer starting on top of the cube, and also has the wrong scale. This is because the animated scale is stacked on top of the applied scale.

So will confirm, even if this may be currently working as designed.

Please don't do that. Code that works as designed is not a bug.

Updating the animation is not a trivial thing. It a great idea, but when we do this, it should not just be for unparenting (but also for parenting, or even as a general "apply arbitrary transformation to animation data" so we can use it for more mass updates to keyed transforms), and should be worked on in a design task.

> In #97628#1347260, @iss wrote: > Other operators like apply/clear transform do actually overwrite keyed values I don't see any calls for this in the `OBJECT_OT_transform_apply` code. A test also shows that this doesn't happen: [#97628-apply-transform-when-keyed.blend](https://archive.blender.org/developer/F13045961/T97628-apply-transform-when-keyed.blend) - Open the file. The teapot starts sitting on top of the cube. - Drag the playhead around, see the teapot is animated. - Press {key Ctrl A} and apply all transforms. - Drag the playhead around, see the teapot is now no longer starting on top of the cube, and also has the wrong scale. This is because the animated scale is stacked on top of the applied scale. > So will confirm, even if this may be currently working as designed. Please don't do that. Code that works as designed is not a bug. Updating the animation is not a trivial thing. It a great idea, but when we do this, it should not just be for unparenting (but also for parenting, or even as a general "apply arbitrary transformation to animation data" so we can use it for more mass updates to keyed transforms), and should be worked on in a design task.

@iss poked me and showed me I misunderstood.

@JulienKaspar tip for bug reports: after the steps to reproduce, include a bit of info about what you'd expect to see and what you're actually seeing. I mean something like this:

Expected final result: Actual final result:
image.png image.png

BTW, I obtained the expected result with the Copy Global Transform operator, by copying before the Clear Parent, and pasting after. I agree that this shouldn't be necessary, and that "Keep Transform" should, in fact, keep the transform all by itself.

@iss poked me and showed me I misunderstood. @JulienKaspar tip for bug reports: after the steps to reproduce, include a bit of info about what you'd *expect* to see and what you're *actually* seeing. I mean something like this: | Expected final result: | Actual final result: | | -- | -- | | ![image.png](https://archive.blender.org/developer/F13048978/image.png) | ![image.png](https://archive.blender.org/developer/F13048975/image.png) | BTW, I obtained the expected result with the Copy Global Transform operator, by copying before the Clear Parent, and pasting after. I agree that this shouldn't be necessary, and that "Keep Transform" should, in fact, keep the transform all by itself.
Author
Member

@dr.sybren Sorry I though the explanation in the description of the bug was clear enough. I'll add more visual examples next time (or at least describe what I expect in visual terms as well.)

@dr.sybren Sorry I though the explanation in the description of the bug was clear enough. I'll add more visual examples next time (or at least describe what I expect in visual terms as well.)
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:35:07 +01:00
Christoph Lendenfeld self-assigned this 2023-09-21 14:25:52 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-09-21 15:43:21 +02: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
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#97628
No description provided.