Copy Global Transform: Mirrored #105039

Closed
opened 2023-02-21 18:39:03 +01:00 by Sybren A. Stüvel · 2 comments

By request of @PabloFournier.

The Copy Global Transform add-on could get a "mirror across bone" option. This would need a few extra parameters:

  • Object pointer & bone name
  • 'Paste Flipped' boolean property for the 'Paste' operator.

The workflow would looks something like:

  • Pick a bone, press the "Use as Mirror Reference" button. The add-on now uses this until you pick something else. Or use the regular way to pick the bone (picker for armature, then type the bone name).
  • Pick a mirror axis that makes sense for that bone. Again, add-on uses this until something else is picked.
  • 'Copy' with the already-existing button.
  • 'Paste' with the new button, which uses the remembered settings to do the mirroring.

The mirroring works like:

  • Get MAT, the world-space matrix that was copied.
  • Compute the world-space matrix of the 'mirror bone' MIRROR
  • Transform MAT to the space local to MIRROR, i.e. multiply with MIRROR.inversed()
  • Flip MAT so that it's actually mirrored
  • Transform the now-flipped MAT to world space again, i.e. multiply with MIRROR.
  • Paste MAT just like the add-on always does.
By request of @PabloFournier. The Copy Global Transform add-on could get a "mirror across bone" option. This would need a few extra parameters: - Object pointer & bone name - 'Paste Flipped' boolean property for the 'Paste' operator. The workflow would looks something like: - Pick a bone, press the "Use as Mirror Reference" button. The add-on now uses this until you pick something else. Or use the regular way to pick the bone (picker for armature, then type the bone name). - Pick a mirror axis that makes sense for that bone. Again, add-on uses this until something else is picked. - 'Copy' with the already-existing button. - 'Paste' with the new button, which uses the remembered settings to do the mirroring. The mirroring works like: - Get `MAT`, the world-space matrix that was copied. - Compute the world-space matrix of the 'mirror bone' `MIRROR` - Transform `MAT` to the space local to `MIRROR`, i.e. multiply with `MIRROR.inversed()` - Flip `MAT` so that it's actually mirrored - Transform the now-flipped `MAT` to world space again, i.e. multiply with `MIRROR`. - Paste `MAT` just like the add-on always does.
Sybren A. Stüvel added the
Type
To Do
Module
Animation & Rigging
labels 2023-02-21 18:39:23 +01:00
Sybren A. Stüvel added this to the Animation & Rigging project 2023-02-21 18:39:28 +01:00
Sybren A. Stüvel self-assigned this 2023-02-23 11:35:30 +01:00
Author
Member

The work is done, and will be presented at today's Animation & Rigging module meeting.

The work is done, and will be presented at today's [Animation & Rigging module meeting](https://devtalk.blender.org/t/2023-03-09-animation-rigging-module-meeting-upcoming/28204).
Author
Member
I've documented the new features: https://docs.blender.org/manual/en/3.6/addons/animation/copy_global_transform.html
Sybren A. Stüvel removed this from the Animation & Rigging project 2023-04-17 11:14:56 +02:00
Blender Bot added the
Status
Archived
label 2023-04-17 11:15:02 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
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
1 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#105039
No description provided.