Animation: Add in Parent space alignment option to the Transform Orientation gizmo #104724
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104724
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "nrupsis/blender:parent-space"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
Transformation (translate, rotate, scale) gizmo needs Parent Orientation space for working with bones. This PR adds in "Parent Orientation" to align the transformation axes to the object's parent space.
Objective.
A desired animation workflow is to work in parent space (for a targeted bone) rather than local space. To achieve this, in pose mode you can turn off "Local Location" and the bone will work in it's parent's space. However, the orientation gizmo doesn't reflect this, and still displays in the bones local space.
Gizmo in global space (which is the parent bones orientation)
Deselecting "Local Location" on the child bone:
Transformation Gizmo displays child local, but the desire is to show parent (I.e, global in this instance)
This Change
This Patch adds a new "Parent Space" Orientation option for the Transformation Gizmo.
For objects:
For Armatures:
Object Parent Space
Armature Parent Space. Always use parent space, even if local location is set.
Thankfully, no new transformation orientation code needs to be written, we can achieve the desired results be using the existing
transform_orientations_create_from_axis
,ED_getTransformOrientationMatrix
, andunit_m3
methods. To do this, we check to see if the bone has a parent, if so, we use the bones pose matrix (pose_mat
). This is done similarly for objects using the parent's object matrix (object_to_world
).To document
Ref:
Just making a note that if this lands we need to:
WIP: Add in Parent space alignment to option to the gimbleto WIP: Add in Parent space alignment to option to the gizmoAnother question I have. I feel like this warrants a new icon?
@blender-bot package
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.
WIP: Add in Parent space alignment to option to the gizmoto WIP: Animation: Add in Parent space alignment to option to the gizmoWIP: Animation: Add in Parent space alignment to option to the gizmoto Animation: Add in Parent space alignment option to the Transform Orientation gizmo@blender-bot package
Package build started. Download here when ready.
@blender-bot package
Package build started. Download here when ready.
Nice patch, cleaner than I would have expected from messing around with the transform system ;-)
Just two minor nags, no need to re-review after addressing them.
For my review I just looked at the code. Well, of course I also tried it out and it seems to do the right thing to me (it's now instantly one of my favourite transform orientations), but I'll leave the final judgement to an actual animator!
@ -13,1 +13,4 @@
# CLion cmake folders
cmake-*
Changes to this file should be in a separate PR, if necessary at all. It's likely enough to put this one in
.git/info/exclude
instead -- that way it doesn't get accidentally committed.@ -622,3 +675,3 @@
if (ob->mode & OB_MODE_POSE) {
/* Each bone moves on its own local axis, but to avoid confusion,
* use the active pones axis for display #33575, this works as expected on a single
* use the active bone's axis for display #33575, this works as expected on a single
No need to put this fix into this PR, if you want, please commit that directly to
main
.I tried to, but it kept asking for my credentials, and I'd get a 403...
We should include review from the Modeling module, because they own the transform system. @ideasman42 are you interested, or could you pick someone else from the module?
Note:
for: Child bone always using parent space, regardless of Local location settings.
@blender-bot package
Package build started. Download here when ready.
Note:
for: or: Child bone respecting Local Location, and only uses parent space if setting is off.
The Modeling module have been completely silent about this, even though I asked for feedback twice. I've told them 'silence will be taken as implicit agreement after day X' and we're a week after 'day X', so let's thank them for their agreement and move forward.
@blender-bot package
Package build started. Download here when ready.
For consistency, I think it probably makes sense to use the armature object's space for this as well. The armature effectively being the "parent".
@blender-bot package
Package build started. Download here when ready.
From art/animation side, testing it on armatures and objects, I am happy with how it is interacting with the file.
💜 the comments in the low-level functions. Makes it so much easier to read & understand.
All I have left is a tiny nag about the comment style, otherwise it all LGTM!
Just land after addressing those.
@ -583,0 +587,4 @@
// Check if target bone is a child.
if (active_pchan->parent) {
// For child, show parent local regardless if "local location" is set for parent bone
Some style remarks:
And this one is more of a personal preference, but I'd remove the newline between the
if
and its body, as they form one 'unit' within the function. No strong feelings either way, so do with this one as you wish.