Parent behaviour: Parent to Object without Inverse needs an option to keep transform #95001

Closed
opened 2022-01-18 09:31:59 +01:00 by Brad Clark · 17 comments
Member

Parenting behavior: Parent to Object without Inverse needs an option to keep transform
Current way it works

Parenting updates parent_inverse matrix if you keep offset. That helps to keep local transform identical before/after parenting, ensuring drivers, animation data, constraints etc. keep working as before.

Issues with the current methods:

  • Non-standard behavior, so people not familiar with Blender don’t expect this when working with hierarchies and parenting.
  • Parent_inverse matrix is hidden, so those same people won’t be able to easily figure out what’s going on.
  • It is inconsistent, as Unparent (Keep Transform) does seem to apply the visual transformation of the object transformation values, and seems to clear the inverse matrix. need to confirm

Conclusion of the discussion:

  1. Add parenting option that doesn’t use parent-inverse but just updates child’s local transform values to keep it's visual transform. This is only truely possible when there is no inherited sheer, as the child's parent-inverse matrix can undo the sheer, but its loc/rot/scale properties cannot. Since this would be an additional option of the parenting menu, this is not a practical issue.
  2. Add option to Apply Transform menu that applies the parent-inverse to the child’s local transform to remove hidden matrix values but visually the object stays in the same location, orientation and scale.

This will impact or change animation when used on animated objects but that is a limited use case that vs having a more user discoverable and understandable parenting operation where blender isn't "guessing" what the user wants to do and is hiding this from the user.

Referenced from https://devtalk.blender.org/t/2021-11-25-animation-rigging-module-meeting/21536#parenting-and-the-hidden-matrix-6

Parenting behavior: Parent to Object without Inverse needs an option to keep transform Current way it works Parenting updates parent_inverse matrix if you keep offset. That helps to keep local transform identical before/after parenting, ensuring drivers, animation data, constraints etc. keep working as before. Issues with the current methods: - Non-standard behavior, so people not familiar with Blender don’t expect this when working with hierarchies and parenting. - Parent_inverse matrix is hidden, so those same people won’t be able to easily figure out what’s going on. - It is inconsistent, as Unparent (Keep Transform) does seem to apply the visual transformation of the object transformation values, and seems to clear the inverse matrix. *need to confirm* Conclusion of the discussion: 1. Add parenting option that doesn’t use parent-inverse but just updates child’s local transform values to keep it's visual transform. This is only truely possible when there is no inherited sheer, as the child's parent-inverse matrix can undo the sheer, but its loc/rot/scale properties cannot. Since this would be an additional option of the parenting menu, this is not a practical issue. 2. Add option to Apply Transform menu that applies the parent-inverse to the child’s local transform to remove hidden matrix values but visually the object stays in the same location, orientation and scale. This will impact or change animation when used on animated objects but that is a limited use case that vs having a more user discoverable and understandable parenting operation where blender isn't "guessing" what the user wants to do and is hiding this from the user. Referenced from https://devtalk.blender.org/t/2021-11-25-animation-rigging-module-meeting/21536#parenting-and-the-hidden-matrix-6
Author
Member

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

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Author
Member

Added subscribers: @BClark, @zanqdo

Added subscribers: @BClark, @zanqdo

Added subscriber: @JasonSchleifer

Added subscriber: @JasonSchleifer

Added subscriber: @OrestisKonstantinidis

Added subscriber: @OrestisKonstantinidis

Added subscriber: @iclemens

Added subscriber: @iclemens

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Added subscriber: @hadrien

Added subscriber: @hadrien

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

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

Added subscriber: @Muhammad-Sohaib-Arshid

Added subscriber: @Muhammad-Sohaib-Arshid
Muhammad Sohaib Arshid self-assigned this 2022-03-03 19:26:34 +01:00

Added subscriber: @Eigil-Jarl-Halse

Added subscriber: @Eigil-Jarl-Halse

Added subscriber: @AndyCuccaro

Added subscriber: @AndyCuccaro
Member

Added subscriber: @wbmoss_dev

Added subscriber: @wbmoss_dev
Member

T95001_improved_parent_ops.py

Can some artists give this a try? @BClark

This is an addon that provides two operators: "#95001: Set Parent" and "#95001: Set Local Transform Origin". If its what you guys want, I can update the real operators.

#95001: Set Parent:
{F12934615}{F12934617}image.png

The options (Preserve= World Transform, Origin= Parent) achieves (1). I don't know anything about sheer but it should work as long as the parent's world matrix is invertible.

#95001: Set Local Transform Origin
(No pictures because it has the same exact options as above. The only difference is that the parent isn't changed)

This is more about directly working with the child's local transform and what it's relative to. This operator achieves the control you're asking for (2).

I'm against exposing the inverse matrix. It doesn't seem useful. There are options for all the meaningful origins I could think of.
__
Misc:

  • I should've named "World Origin" to just "World"...
  • The old options aren't all exactly reproducible. I noticed that, for example, Set Parent (Without Inverse) will zero out the location but not the rotation, albeit a bit odd.
[T95001_improved_parent_ops.py](https://archive.blender.org/developer/F12934614/T95001_improved_parent_ops.py) Can some artists give this a try? @BClark This is an addon that provides two operators: "#95001: Set Parent" and "#95001: Set Local Transform Origin". If its what you guys want, I can update the real operators. **#95001: Set Parent:** {[F12934615](https://archive.blender.org/developer/F12934615/image.png)}{[F12934617](https://archive.blender.org/developer/F12934617/image.png)}![image.png](https://archive.blender.org/developer/F12934619/image.png) The options (Preserve= World Transform, Origin= Parent) achieves (1). I don't know anything about sheer but it should work as long as the parent's world matrix is invertible. **#95001: Set Local Transform Origin** (No pictures because it has the same exact options as above. The only difference is that the parent isn't changed) This is more about directly working with the child's local transform and what it's relative to. This operator achieves the control you're asking for (2). I'm against exposing the inverse matrix. It doesn't seem useful. There are options for all the meaningful origins I could think of. __ Misc: - I should've named "World Origin" to just "World"... - The old options aren't all exactly reproducible. I noticed that, for example, Set Parent (Without Inverse) will zero out the location but not the rotation, albeit a bit odd.
Author
Member

Being able to see the inverse matrix allows for an understanding of what Blender is doing behind the scenes. It doesn't have to be visible along side the translate/rotate/scale but it should be able to be seen for troubleshooting without having to read/set/mess with it through scripting.

*Shearing is complicated to manage here because in Maya, there is another property just for that so when managing transforms with parent space stuff, it has special way to deal with it.

I will try and test this out today...thanks!

Being able to see the inverse matrix allows for an understanding of what Blender is doing behind the scenes. It doesn't have to be visible along side the translate/rotate/scale but it should be able to be seen for troubleshooting without having to read/set/mess with it through scripting. *Shearing is complicated to manage here because in Maya, there is another property just for that so when managing transforms with parent space stuff, it has special way to deal with it. I will try and test this out today...thanks!
Member

It will be an update to original parent menu, replacing the 3 parenting options (Parent, Parent (Keep Transform), Parent (Without Inverse)) with the new two options.

Here are what's possible with the original 3 Set Parent variants.

Preserve World Transform Preserve Local Transform Preserve only Local RotationScale Zeroed out
Parent Origin Set Parent (Without Inverse) Clear Parent Inverse
World Origin Set Parent (Keep Transform) Set Parent () Set Parent(), then Alt+G Set Parent(), then Alt+G/R/S
Child Origin
For the Child Origin row and missing Parent row elements, you can do it by copying/pasting transforms, temporarily moving the parent, etc. It's a hassle.

Here's what you get with the new options.

Preserve World Transform Preserve Local Transform Preserve only Local RotationScale Zeroed out
Parent Origin (Origin=Parent, Preserve=World) (Origin=Parent, Preserve= Local) (Origin=Parent, Preserve= Local), then Alt+G to Clear local Location (Origin=Parent, Preserve= ZeroOut)
World Origin (Origin=World, Preserve= World) (Origin=World, Preserve= Local) (*) (Origin=World, Preserve= ZeroOut)
Child Origin .. and so on but with Origin=Child
(*) Not sure why you would, but its the same process as above w/ Origin=World

After reading a bit of the discussion, I changed my mind and do think its useful to expose the inverse matrix. It's effectively an offset from the parent. However, I won't be the one to add support for exposing the inverse matrix as I don't have sufficient math background for it. Workarounds for similar behavior can probably be done by just inserting an intermediate parent object and having the child's local transform origin be aligned with that intermediate parent object. No scripting needed.

It will be an update to original parent menu, replacing the 3 parenting options (Parent, Parent (Keep Transform), Parent (Without Inverse)) with the new two options. Here are what's possible with the original 3 Set Parent variants. | | Preserve World Transform | Preserve Local Transform | Preserve only Local RotationScale | Zeroed out | -- | -- | -- | -- | -- | | Parent Origin | | | Set Parent (Without Inverse) | Clear Parent Inverse | World Origin | Set Parent (Keep Transform) | Set Parent () | Set Parent(), then Alt+G | Set Parent(), then Alt+G/R/S | Child Origin | For the Child Origin row and missing Parent row elements, you can do it by copying/pasting transforms, temporarily moving the parent, etc. It's a hassle. Here's what you get with the new options. | | Preserve World Transform | Preserve Local Transform | Preserve only Local RotationScale | Zeroed out | -- | -- | -- | -- | -- | | Parent Origin | (Origin=Parent, Preserve=World) | (Origin=Parent, Preserve= Local) | (Origin=Parent, Preserve= Local), then Alt+G to Clear local Location | (Origin=Parent, Preserve= ZeroOut) | World Origin | (Origin=World, Preserve= World) | (Origin=World, Preserve= Local) | (*)| (Origin=World, Preserve= ZeroOut) | Child Origin | .. and so on but with Origin=Child (*) Not sure why you would, but its the same process as above w/ Origin=World After reading a bit of the discussion, I changed my mind and do think its useful to expose the inverse matrix. It's effectively an offset from the parent. However, I won't be the one to add support for exposing the inverse matrix as I don't have sufficient math background for it. Workarounds for similar behavior can probably be done by just inserting an intermediate parent object and having the child's local transform origin be aligned with that intermediate parent object. No scripting needed.

This issue was referenced by db6287873c

This issue was referenced by db6287873cd2c79741439f4d141c4b2db517d73e
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
11 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#95001
No description provided.