Rigify Apply Toggle Pole to Keyframes clears out IK keyframes #105301
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#105301
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 552.22
Blender Version
Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash:
e1743a0317bc
Worked: Blender 2.91.2 with Rigify 0.6.1
Addon Information
Name: Rigify (0, 6, 10)
Author: Nathan Vegdahl, Lucio Rossi, Ivan Cappiello, Alexander Gavrilov
Short description of error
The
Apply Toggle Pole to Keyframes
button in rigify is currently broken. Right now if the operator is run, it zeros out all the animation on the IK foot controller and applies no keyframe information to the actual Pole vector.Exact steps for others to reproduce the error
Use Pole Vector
And hit OKI've attached a blendfile with a Rigify rig, with keyframes on the IK foot control and knee target.
@Raymond-Luc issue confirmed.
the pole vector conversion seems to clear the ik keyframes
Rigify Apply Toggle Pole to Keyframes broken in 4.1to Rigify Apply Toggle Pole to Keyframes clears out IK keyframes@angavrilov would you mind having a look at this? I marked as high priority since the issue may lead to data loss.
@dr.sybren
Unrelated to this, the button with the same icon, two rows higher, gives me this error:
It would seem there's more broken in Rigify 😿
@dr.sybren i guess you are talking about
ik>fk with roll
which i never actually used. So i never noticed.In this case having an error is better than delete user data.
Probably we have to build some test units. For simple operators like those should be pretty easy and very useful.
Yeah, I think that's pretty much a necessity.
@nathanvegdahl and I did some digging, and we can reproduce this in:
Given how long it's been broken (2.92 was released in Feb 2021) and gone unreported, I don't think this is a frequently-used feature. I'll drop the priority to 'normal'.
Git-bisecting the Rigify add-on showed the culprit as
46590bb780
(review). It was a change by @Mets and reviewed by @icappiello . Would you guys like to dig into this?I only started that patch, it was finished by @angavrilov. My diff only affected the horse metarig and the paw rigs, so there's no way it could've affected the human metarig.
I looked into it briefly. I find Rigify's snapping code pretty intimidating, so I think if I went in there, I would definitely just break things further. My best guess is the issue might be at line 952 of rig_ui_template.py, maybe a wrong index is being requested from the
ctrl_bones
list. I definitely wouldn't feel comfortable touching this code, so I'm leaving this to Alexander.@dr.sybren actually i see my comment in https://archive.blender.org/developer/D8496 was:
and the actual review and commit was done by @angavrilov.
Yeah, same here.
Which version of that file?
scripts/addons/rigify/rig_ui_template.py
in currentmain
doesn't mentionctrl_bones
. Looking in other files for that name shows me things like:which IMO looks rather error prone.
I was referring to the line numbers of the patch, but I gave the wrong filename, sorry. Navigating the archived stuff is a bit iffy. The file name I meant was apparently limb_rigs.py, and the closest link I can provide is this:
https://archive.blender.org/developer/differential/0008/0008496/#change-DSwjrEKVEHMS
Even copy-pasting code from there is impossible, but there's a call to
match_pole_target()
where on line 952 the index got changed from 2 to 1. I doubt the issue is as simple as that though. But I'd really only spend time trying to untangle this if Alexander isn't available.@angavrilov seems that your help is needed here since you are the one and only maintainer of the rigify code.
Answering, even just saying you have no time for that, would be nice.
Any help about where to look for the issue would be appreciated by people here that are willing to help.
I'll try to have a look this week or weekend.
So I had a look. I think I'll postpone applying the fix to rigify until tomorrow to prevent making more mistakes in a hurry, but the following changes in the generated rig_ui script seem to fix the problem:
Change these lines:
To be like this:
Basically the problem was that in order to help introducing those paw rigs the order of bones in the list was changed, but these two locations in the operator were not updated. I must have forgot to test it with keyframed animations, since the bug is purely in keyframing code, so the current frame toggle button works fine. If you look through the changes in the commit you can actually find a similar change in the IK->FK snap operator, but not pole toggle.
@angavrilov thanks for digging in. any update on this?
Alexander's proposed change seems to work, at least in a quick test that I did.
@icappiello @Raymond-Luc can you test with this Rigify extension? It does require Blender 4.2. Also please regenerate the rig before testing, as that's required to actually insert the corrected code into the rig scripts.
@dr.sybren seems to work quite fine (at least on human).
animation is correctly converted to pole vector and keyframes are retained,
since the issue seems to depend on bone lists, i'd suggest to test it further on other metarigs (i.e. animals) to double check if any other change on longer chain limbs are required
Please do, because I don't have the experience with Rigify to test this in a way that convinces me that it's been adequately tested.
@dr.sybren seems to work fine on both horse and dog too. Those are the two rigs that have the modified limbs from that commit. Animation is correctly converted to pole and back whilst animation is not cleared out on ik.
Thanks, I'll land extensions/rigify#2 in the main branch then. It should then get picked up by @dfelinto 's script to auto-push to https://extensions.blender.org