Fix #116138: make hidden bones show up in Properties when selected in Outliner #117012
No reviewers
Labels
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117012
Loading…
Reference in New Issue
No description provided.
Delete Branch "Cedric-Hutchings/blender:hidden-bones"
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?
Bones selected in the Outliner are shown in the Properties panel, even if Hidden.
Fixes #116138
a281217482
to229f1eb610
Thanks for your PR! I've put it on today's Animation & Rigging module meeting agenda to discuss.
In Blender Chat @lichtwerk wrote:
This I agree with. #116138 is about the general issue that a bone cannot be active and hidden at the same time. After all, there are multiple ways in which to hide a bone, and those could potentially all un-mark it as 'active'. Your PR certainly helps to resolve this, but seems to be limited to the Outliner. Because of that, I'm weary that it's not enough to fully fix #116138.
This would also be appreciated.
I went to every occurrence of "BONE_HIDDEN_A" in the codebase and:
Here is one where I need your help/guidance:
To run this code
??? - I couldn't figure out how to get "extend" to be set; shift clicking didn't work :(
It's stored as an RNA property in the Operator ...
Relevance to Active | Hidden:
It DOES seem to set the bone to active if it isn't hidden ... so it may be important for this PR?
This one was also of particular note:
To run this code
It's everywhere!
Relevance to Active | Hidden:
Used exclusively in EBONE_VISIBLE, which defines 50 new locations (mostly related to armature selection)
where HIDDEN is read and bone "active" state is (or isn't!) written to.
Will investigate in a subsequent post. Most of these are extra hairy,
because they involve selecting multiple bones, so it isn't clear which should appear in the Property Panel.
(Probably just the one you clicked?)
Here is a list of locations that use BONE_HIDDEN_A that I ruled out:
To run this code
Select bone in the editor, press H.
Relevance to Active | Hidden:
N/A. Bone stays active.
To run this code
Add a bone, hide it, press Alt + H
Relevance to Active | Hidden:
N/A. "Selects" the bone in the editor (orange outline), but doesn't mark it as active (yellow outline)
To run this code
Add two bones. Parent one bone to the other in the property panel.
Right-click the parent's widget in the property panel, select "Jump to Target."
Relevance to Active | Hidden:
This automatically unhides the parent for you, if applicable.
Also selects it as active in the Property Panel.
NOTE
Un-parented bones seem to be unselectable in the 3D editor after this? It's quite strange.
To run this code
Relevance to Active | Hidden:
Hides the bone. Leaves it as "active" in the Property Panel, but it doesn't come back with the yellow glow in the 3D view.
To run this code
Right click your bone in the outliner, select HIDE
Relevance to Active | Hidden:
The moment you right click the Bone to hide/unhide, it's immediately selected in the property panel.
This seems to be the correct behavior.
To run this code
Move bones around with snapping enabled.
Relevance to Active | Hidden:
N/A, Snapping against hidden bones is disabled
To run this code
N/A, definition of BONE_HIDDEN_A
Relevance to Active | Hidden:
N/A
To run this code
Load in a Blender project with hidden bones.
Relevance to Active | Hidden:
N/A
Being thorough, nice! :)
There's also
BONE_HIDDEN_P
andBONE_HIDDEN_PG
, which are used in different situations:BONE_HIDDEN_A
: in Armature Edit mode (I think that's what theA
is for)BONE_HIDDEN_P
: Pose mode and object modeBONE_HIDDEN_PG
: I don't think this one is ever set anywhere, I can only find code that reads it.That seems to be triggered when using Ctrl.
Yup, that seems relevant.
A bit of context: what you're looking at here is the old macro (
EBONE_VISIBLE
) that used to check armature layers. I changed the macro to call the newANIM_bonecoll_is_visible_editbone()
function to account for the new bone collections, but otherwise left the call sites of the macro as-is.I don't think the logic of which bone becomes the active one should change.
For this task, I think the most important change is to go over the "hide this bone" code paths, and ensure that they do not touch the
bArmature::act_bone
orbArmature::act_edbone
pointers. As in, they shouldn't deactivate the active bone, just because it got hidden.👍
That might be worth some further investigation and a separate bug report. Would you be up for that?
How do you mean "it doesn't come back"?
If it seems correct, let's just assume it is correct, unless there are complaints / bug reports that say otherwise ;-) And yeah, it seems correct to me too.
The
ED_armature_edit_validate_active()
function is now empty, so it can be removed along with all the calls to it.Also make sure that either your IDE is configured to correctly auto-format the code, or run
make format
before committing. That way your PR will be in tip-top shape.Finally, if you merge the current
main
branch into your PR you'll see there's a small confict. That shouldn't be too hard to solve.Once that's done, let's get the buildbot building your changes, so that we have a test build that animators & riggers can test with.
Checkout
From your project repository, check out a new branch and test the changes.