Pose Library not saving bones with certain prefixes (uses WholeCharacter keyingset and its 'badBonePrefixes' cannot be changed by python) #81012

Closed
opened 2020-09-21 00:10:11 +02:00 by David Trujillo Restrepo · 16 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38

Blender Version
Broken: version: 2.90.0, branch: master, commit date: 2020-09-20 17:07

Short description of error
Pose Library not saving with bones with a very specefic name.

Exact steps for others to reproduce the error
Add new bone and name it with the prefix "DEF" or "DEF_" (Capital letters). Example: "DEF_Bone1". Go to pose mode, select the bone and add a new pose library. Move/rotate/scale the bone and add the current pose to the pose library. Clear all transform. Try to apply the pose library to the bone. Nothing will happen. The Pose will not be safe in the library pose. Also, trying to delete the pose will corrupt the entire library.

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.38 **Blender Version** Broken: version: 2.90.0, branch: master, commit date: 2020-09-20 17:07 **Short description of error** Pose Library not saving with bones with a very specefic name. **Exact steps for others to reproduce the error** Add new bone and name it with the prefix "DEF" or "DEF_" (Capital letters). Example: "DEF_Bone1". Go to pose mode, select the bone and add a new pose library. Move/rotate/scale the bone and add the current pose to the pose library. Clear all transform. Try to apply the pose library to the bone. Nothing will happen. The Pose will not be safe in the library pose. Also, trying to delete the pose will corrupt the entire library.

Added subscriber: @Moneido

Added subscriber: @Moneido
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Philipp Oeser self-assigned this 2020-09-22 12:26:21 +02:00
Member

Can confirm, will check on this.

Can confirm, will check on this.
Philipp Oeser removed their assignment 2020-09-22 14:29:24 +02:00
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Member

Hm, the thing is that the PoseLibrary uses the WholeCharacter / Whole Character (Selected bones only) keying set to store the pose in the library action.

When using the WholeCharacter keying set, there is actually functionality that excludes bones with specific prefixes to be keyed.
This happens here https://developer.blender.org/diffusion/B/browse/master/release/scripts/startup/keyingsets_builtins.py$379
In a way it makes sense, "DEF" bones are usually deformation bones which would not be animated directly (but e.g. driven/constraint by other "animation" bones)

Now since this is a tuple and the comment says

more can be added here as you need in your own rigs ...

I was wondering if we could just change it and also remove from the tuple, something like

import bpy
bpy.context.scene.keying_sets_all['Whole Character'].type_info.badBonePrefixes = ()

But this seems to be readonly?
https://docs.blender.org/api/master/bpy.types.KeyingSet.html#bpy.types.KeyingSet.KeyingSet.type_info

So, in the end, this is somewhat working as intended, as a workaround you could change keyingsets_builtins.py locally [but it looks like this cannot be changed by python at runtime]
But I am leaving this open for now (@dr.sybren : should we make this accessible via py?)

Hm, the thing is that the PoseLibrary uses the `WholeCharacter` / `Whole Character (Selected bones only)` keying set to store the pose in the library action. When using the `WholeCharacter` keying set, there is actually functionality that excludes bones with specific prefixes to be keyed. This happens here https://developer.blender.org/diffusion/B/browse/master/release/scripts/startup/keyingsets_builtins.py$379 In a way it makes sense, "DEF" bones are usually deformation bones which would not be animated directly (but e.g. driven/constraint by other "animation" bones) Now since this is a tuple and the comment says > more can be added here as you need in your own rigs ... I was wondering if we could just change it and also remove from the tuple, something like ``` import bpy bpy.context.scene.keying_sets_all['Whole Character'].type_info.badBonePrefixes = () ``` But this seems to be readonly? https://docs.blender.org/api/master/bpy.types.KeyingSet.html#bpy.types.KeyingSet.KeyingSet.type_info So, in the end, this is somewhat working as intended, as a workaround you could change `keyingsets_builtins.py` locally [but it looks like this cannot be changed by python at runtime] But I am leaving this open for now (@dr.sybren : should we make this accessible via py?)
Philipp Oeser changed title from Pose Library not saving to Pose Library not saving bones with certain prefixes (uses WholeCharacter keyingset and its 'badBonePrefixes' cannot be changed by python) 2020-09-22 14:30:40 +02:00

The tricky thing is that some keying sets are defined in Python, and others in C. I'm not that familiar with the design of the code, so I don't know how much extra design work would have to be done to override keying sets, or to configure which keying set is used by the pose library.

This is certainly not a bug; it's working as documented in the Pose Library and Whole Character keying set sections of the manual.

@Moneido how big of an issue is this for you? Is it simply some unexpected behaviour that's easily worked around? Or is this stopping your work dead in its tracks?

Also, trying to delete the pose will corrupt the entire library.

Please don't report two things in one report. Having multiple issues described in the same report makes it hard to give the report any status, as it'll be unclear which exact issue that status would be referring to.

The tricky thing is that some keying sets are defined in Python, and others in C. I'm not that familiar with the design of the code, so I don't know how much extra design work would have to be done to override keying sets, or to configure which keying set is used by the pose library. This is certainly not a bug; it's working as documented in the [Pose Library](https:*docs.blender.org/manual/en/2.90/animation/armatures/properties/pose_library.html) and [Whole Character keying set](https:*docs.blender.org/manual/en/2.90/animation/keyframes/keying_sets.html#whole-character-keying-set) sections of the manual. @Moneido how big of an issue is this for you? Is it simply some unexpected behaviour that's easily worked around? Or is this stopping your work dead in its tracks? > Also, trying to delete the pose will corrupt the entire library. Please don't report two things in one report. Having multiple issues described in the same report makes it hard to give the report any status, as it'll be unclear which exact issue that status would be referring to.

@dr.sybren A. Stüvel (sybren) It really is not that big of a deal. It just caught me off guard. It just delayed me for like a day. I spended the next day trying to figure out what the issue is.
The biggest issue so far is that it changed my workflow a little bit, but thank god there's an addon that let me change the name (including prefix) of the bones all at onces. But if the issue is known and it can't be solved, well it really is not that big of a deal.

@dr.sybren A. Stüvel (sybren) It really is not that big of a deal. It just caught me off guard. It just delayed me for like a day. I spended the next day trying to figure out what the issue is. The biggest issue so far is that it changed my workflow a little bit, but thank god there's an addon that let me change the name (including prefix) of the bones all at onces. But if the issue is known and it can't be solved, well it really is not that big of a deal.

And sorry for posting two thing in one report. it's my first time reporting a bug.

And sorry for posting two thing in one report. it's my first time reporting a bug.

Added subscriber: @Josephbburg

Added subscriber: @Josephbburg

If there exists a "BadBonePrefixes" I think it should be exposed to the user outside of Blender's Python files -- we shouldn't have to edit Blender to get the behavior we want. In my addon, I use a JSON file for storing Bone Prefix names -- this way, ordinary users don't need to think about it (as I have already supplied all of the prefixes I use and then some), and advanced users can customize it.
Of course, within Blender, it's probably best to just have a User Preference.

If there exists a "BadBonePrefixes" I think it should be exposed to the user outside of Blender's Python files -- we shouldn't have to edit Blender to get the behavior we want. In my addon, I use a JSON file for storing Bone Prefix names -- this way, ordinary users don't need to think about it (as I have already supplied all of the prefixes I use and then some), and advanced users can customize it. Of course, within Blender, it's probably best to just have a User Preference.

Added subscriber: @Louis

Added subscriber: @Louis
Sybren A. Stüvel self-assigned this 2021-11-01 12:28:28 +01:00

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

The new Asset Browser based pose library doesn't use the keying set at all, when creating the poses. As such, this task with be closed as "resolved", as the described problem is no longer an issue.

The new Asset Browser based pose library doesn't use the keying set at all, when creating the poses. As such, this task with be closed as "resolved", as the described problem is no longer an issue.
Member

Since the "old school" PoseLibrary is still in use in the Properties Editor Armature tab, should we mark it "deprecated" somehow? Or replace with the asset-based PoseLibrary panel from the sidebar?

Since the "old school" PoseLibrary is still in use in the Properties Editor Armature tab, should we mark it "deprecated" somehow? Or replace with the asset-based PoseLibrary panel from the sidebar?

In #81012#1245612, @lichtwerk wrote:
Since the "old school" PoseLibrary is still in use in the Properties Editor Armature tab, should we mark it "deprecated" somehow? Or replace with the asset-based PoseLibrary panel from the sidebar?

For the record: it's been marked as deprecated in B3.2

> In #81012#1245612, @lichtwerk wrote: > Since the "old school" PoseLibrary is still in use in the Properties Editor Armature tab, should we mark it "deprecated" somehow? Or replace with the asset-based PoseLibrary panel from the sidebar? For the record: it's been [marked as deprecated in B3.2](https://wiki.blender.org/wiki/Reference/Release_Notes/3.2/Animation_Rigging#Deprecation_of_Legacy_Pose_Library)
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#81012
No description provided.