StretchTo constraint: Apply Pose as Rest Pose changes bone length #79553

Closed
opened 2020-08-05 15:34:56 +02:00 by W.Volbers · 16 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.77

Blender Version
Broken: version: 2.83.3, branch: master, commit date: 2020-07-22 06:01, hash: 353e5bd749
Worked: never
Short description of error
bonelength changing to wrong length when apply new Rest Pose

before.JPG

after.jpg

Exact steps for others to reproduce the error

add armature
subdivide bone in three bones,
select the top bone -clear bones
go to Pose mode
apply second bone a stretch-constraint to the last bone(tip)

rearrange the bones in Posemode to an new Pose
select with boxselect all bones
Apply Pose as Rest Pose (menu Pose, Ctrl A)
the green Bone with the stretch-constraint will have now a wrong bonelenght,

I'm not sure if this is a bug, but what seems strange to me is that the bone is displayed correctly in edit mode

workaround press reset inside the Add Bone Constraint
workaround.JPG

apply_new_Rest-Pose.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.77 **Blender Version** Broken: version: 2.83.3, branch: master, commit date: 2020-07-22 06:01, hash: `353e5bd749` Worked: never **Short description of error** bonelength changing to wrong length when apply new Rest Pose ![before.JPG](https://archive.blender.org/developer/F8748419/before.JPG) ![after.jpg](https://archive.blender.org/developer/F8748421/after.jpg) **Exact steps for others to reproduce the error** add armature subdivide bone in three bones, select the top bone -clear bones go to Pose mode apply second bone a stretch-constraint to the last bone(tip) rearrange the bones in Posemode to an new Pose select with boxselect all bones Apply Pose as Rest Pose (menu Pose, Ctrl A) the green Bone with the stretch-constraint will have now a wrong bonelenght, *I'm not sure if this is a bug, but what seems strange to me is that the bone is displayed correctly in edit mode* **workaround press reset inside the Add Bone Constraint** ![workaround.JPG](https://archive.blender.org/developer/F8748445/workaround.JPG) [apply_new_Rest-Pose.blend](https://archive.blender.org/developer/F8748426/apply_new_Rest-Pose.blend)
Author

Added subscriber: @walt-3

Added subscriber: @walt-3

Added subscribers: @dr.sybren, @iss

Added subscribers: @dr.sybren, @iss

Not sure if this is bug, strictly speaking. @dr.sybren Should applying rest pose recalculate this value?

Not sure if this is bug, strictly speaking. @dr.sybren Should applying rest pose recalculate this value?
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

I would think this is a bug (maybe it is a Known Limitation).
I think if you apply a new Rest Pose, one would expect also the mesh to not deform anymore.
With the current behavior, this is not the case, so you end up with a rest pose which already deforms.

I would think this is a bug (maybe it is a Known Limitation). I think if you apply a new Rest Pose, one would expect also the mesh to not deform anymore. With the current behavior, this is not the case, so you end up with a rest pose which already deforms.
Philipp Oeser changed title from set new Rest Pose change the bonelenght to Apply Pose as Rest Pose change the bonelenght (due to StretchTo constraints rest length not being reset) 2020-08-27 18:24:19 +02:00

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

Please test this with a few older versions of Blender. Knowing whether a bug was recently introduced or has been in Blender for longer will help developers in finding the root cause of the issue.

Please test this with a few [older versions of Blender](https://download.blender.org/release/). Knowing whether a bug was recently introduced or has been in Blender for longer will help developers in finding the root cause of the issue.
Author

behaves the same way in v2.80.75,
the versions before that I leave out

behaves the same way in v2.80.75, the versions before that I leave out

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Thanks for testing this @walt.

I'm not sure if this is a bug, but what seems strange to me is that the bone is displayed correctly in edit mode

This isn't so strange. The current pose is simply copied to the rest pose, which is what you see in edit mode. The Stretch To constraint applies a scale factor on top of the rest pose, and this scale factor is still the same after the operator has finished. This is why the bone becomes too long -- effectively the scale factor from the constraint is shown twice.

The code for the "Apply as Rest Pose" operator doesn't have anything for updating affected constraints or modifiers. The problem here is that the Rest Length property could have been adjusted by an artist, or even animated, so Blender can't just reset it and assume then everything will be alright.

Thanks for testing this @walt. > I'm not sure if this is a bug, but what seems strange to me is that the bone is displayed correctly in edit mode This isn't so strange. The current pose is simply copied to the rest pose, which is what you see in edit mode. The Stretch To constraint applies a scale factor on top of the rest pose, and this scale factor is still the same after the operator has finished. This is why the bone becomes too long -- effectively the scale factor from the constraint is shown twice. The code for the "Apply as Rest Pose" operator doesn't have anything for updating affected constraints or modifiers. The problem here is that the Rest Length property could have been adjusted by an artist, or even animated, so Blender can't just reset it and assume then everything will be alright.

Having said that, applying as rest pose will break existing animation anyway, so I think we can reset the rest length of the constraint.

Having said that, applying as rest pose will break existing animation anyway, so I think we can reset the rest length of the constraint.
Author

yes exactly,
i would not use this anymore when i am done with rigging .

( just to avoid misunderstandings,
the "apply pose as rest pose" would mainly drop the rigging process.)

yes exactly, i would not use this anymore when i am done with rigging . ( just to avoid misunderstandings, the "apply pose as rest pose" would mainly drop the rigging process.)

I have no idea what "dropping the rigging process" means.

In my test build, I have the "automatic reset button" working. It still produces a visual change, though. Edit bones don't have scale, which means that the stretching & squashing of the constraint (to maintain volume) cannot be copied to the rest pose. As a result, a bone that's stretched thin will become full size again:

apply-as-rest-pose-#79553.png

@walt-3 Would this be the expected behaviour?

I have no idea what "dropping the rigging process" means. In my test build, I have the "automatic reset button" working. It still produces a visual change, though. Edit bones don't have scale, which means that the stretching & squashing of the constraint (to maintain volume) cannot be copied to the rest pose. As a result, a bone that's stretched thin will become full size again: ![apply-as-rest-pose-#79553.png](https://archive.blender.org/developer/F8825842/apply-as-rest-pose-#79553.png) @walt-3 Would this be the expected behaviour?
Sybren A. Stüvel changed title from Apply Pose as Rest Pose change the bonelenght (due to StretchTo constraints rest length not being reset) to StretchTo constraint: Apply Pose as Rest Pose changes bone length 2020-08-31 17:18:07 +02:00

This issue was referenced by a92ab93c7d

This issue was referenced by a92ab93c7dc3f54ffd8290dd8055998a2c932998

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sybren A. Stüvel self-assigned this 2020-09-01 17:58:27 +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
No Assignees
5 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#79553
No description provided.