Armature widgets from hidden collections are invisible. #93439

Closed
opened 2021-11-27 23:50:44 +01:00 by Alexander Gavrilov · 15 comments

Blender Version
Broken: 3.0 8f2db94627
Worked: 3.0 2cc56495f3

Immediate cause: a07089dcb1

Short description of error

Armature widgets using objects from a collection that is excluded or hidden in viewport are invisible until the collection is temporarily unhidden.

Secondary, old but likely related issue: even before, modifiers on the widgets didn't work in the same exact circumstances.

Exact steps for others to reproduce the error

Add a Rigify metarig and generate a character rig, or open an existing file with a generated character. All control bone widgets are invisible.

Technical analysis

The root cause of the issue is likely that the widget objects aren't registered as dependencies for the rig, and aren't evaluated. Previously this manifested as modifiers (e.g. subsurf) often not working on such objects. However the referenced commit made the evaluated mesh mandatory for drawing the widgets, thus completely breaking them.

Test Plan

Test file: custom_shape_rigify.blend

  • Opening the attached file in 2.93 you'll see a 4-arrow "widget" (bone with a custom shape) in the center of coordinates. This is the correct behavior
  • Opening the file with the 3.0 branch at d2e6087335 will not show that "widget" visible. This is incorrect.

Screenshot of expected state:
expected.png

**Blender Version** Broken: 3.0 8f2db94627d5 Worked: 3.0 2cc56495f3ce Immediate cause: a07089dcb1 **Short description of error** Armature widgets using objects from a collection that is excluded or hidden in viewport are invisible until the collection is temporarily unhidden. Secondary, old but likely related issue: even before, modifiers on the widgets didn't work in the same exact circumstances. **Exact steps for others to reproduce the error** Add a Rigify metarig and generate a character rig, or open an existing file with a generated character. All control bone widgets are invisible. **Technical analysis** The root cause of the issue is likely that the widget objects aren't registered as dependencies for the rig, and aren't evaluated. Previously this manifested as modifiers (e.g. subsurf) often not working on such objects. However the referenced commit made the evaluated mesh mandatory for drawing the widgets, thus completely breaking them. **Test Plan** Test file: [custom_shape_rigify.blend](https://archive.blender.org/developer/F12655552/custom_shape_rigify.blend) - Opening the attached file in 2.93 you'll see a 4-arrow "widget" (bone with a custom shape) in the center of coordinates. This is the correct behavior - Opening the file with the 3.0 branch at d2e60873350 will not show that "widget" visible. This is incorrect. Screenshot of expected state: ![expected.png](https://archive.blender.org/developer/F12655784/expected.png)
Author
Member

Added subscriber: @angavrilov

Added subscriber: @angavrilov
Author
Member

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

Changed status from 'Needs Triage' to: 'Confirmed'
Hans Goudey was assigned by Alexander Gavrilov 2021-11-27 23:56:10 +01:00
Author
Member

Added subscribers: @dr.sybren, @dfelinto
Removed subscriber: @angavrilov

Added subscribers: @dr.sybren, @dfelinto Removed subscriber: @angavrilov
Author
Member

Relevance of the commit confirmed by reverting, which fixes the immediate regression.

Relevance of the commit confirmed by reverting, which fixes the immediate regression.
Member

Maybe a simple fix is using the original mesh if the object is a mesh object and the evaluated mesh isn't found.

Maybe a simple fix is using the original mesh if the object is a mesh object and the evaluated mesh isn't found.
Author
Member

Of course the better solution is to figure out the suspected dependency issue. As I said, there is a secondary long-existing issue that modifiers don't work in the same circumstances, and this change likely just made the same root problem worse and more obvious.

Of course the better solution is to figure out the suspected dependency issue. As I said, there is a secondary long-existing issue that modifiers don't work in the same circumstances, and this change likely just made the same root problem worse and more obvious.
Author
Member

Added subscribers: @fclem, @Sergey

Added subscribers: @fclem, @Sergey
Author
Member

Maybe @fclem or @Sergey would have an idea of the proper fix for the suspected dependency issue (TLDR: custom shape objects aren't evaluated unless independently visible).

However unless the fix is obvious and safe it's probably something for master, and 3.0 regression can be safely fixed by temporarily reverting the commit.

Maybe @fclem or @Sergey would have an idea of the proper fix for the suspected dependency issue (TLDR: custom shape objects aren't evaluated unless independently visible). However unless the fix is obvious and safe it's probably something for master, and 3.0 regression can be safely fixed by temporarily reverting the commit.
Member

Hmm, the commit fixed another import issue though. So I still think a simple fix would be using the original mesh if necessary and possible.

As I mentioned in the commit, I think the proper fix is using the instancing system to generate the widgets. A dependency could be added in the depsgraph, and the instances could be marked to only display in the viewport.

Hmm, the commit fixed another import issue though. So I still think a simple fix would be using the original mesh if necessary and possible. As I mentioned in the commit, I think the proper fix is using the instancing system to generate the widgets. A dependency could be added in the depsgraph, and the instances could be marked to only display in the viewport.

I am confused about the technical analysis. And the lack of simple .blend file makes it harder to investigate from my side. You already have demo file ready to be tested, just upload them here and save some repro steps ;)

The dependency graph ensures that if the rig is visible the object used for the custom shape is evaluated (see the deg_builder_nodes_rig.cc around the if (pchan->custom != nullptr) {).

I've tested the system with the attached file and. it seems to work fine in both 2.93 and 3.0. The handling of visibility in depsgraph did not change during 3.0 cycle, so to me is not immediately obvious that the depsgraph side is not doing what it's supposed to.

custom_shape.blend

If someone can upload same level of complexity of file demonstrating the issue that'd make troubleshooting from depsgraph side.

As for reverting I'm not sure about it. I'll trade one regression with another, which isn't very great.

I am confused about the technical analysis. And the lack of simple .blend file makes it harder to investigate from my side. You already have demo file ready to be tested, just upload them here and save some repro steps ;) The dependency graph ensures that if the rig is visible the object used for the custom shape is evaluated (see the `deg_builder_nodes_rig.cc` around the `if (pchan->custom != nullptr) {`). I've tested the system with the attached file and. it seems to work fine in both 2.93 and 3.0. The handling of visibility in depsgraph did not change during 3.0 cycle, so to me is not immediately obvious that the depsgraph side is not doing what it's supposed to. [custom_shape.blend](https://archive.blender.org/developer/F12646961/custom_shape.blend) If someone can upload same level of complexity of file demonstrating the issue that'd make troubleshooting from depsgraph side. As for reverting I'm not sure about it. I'll trade one regression with another, which isn't very great.
Hans Goudey was unassigned by Sergey Sharybin 2021-11-29 10:42:07 +01:00
Sergey Sharybin self-assigned this 2021-11-29 10:42:07 +01:00

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

This issue was referenced by aa7051c8f2

This issue was referenced by aa7051c8f21a6b7e2b413b40317502e69764fa05

The test file in the task description should really get an explanation, ideally with a screenshot of what it ought to look like. Right now I can open it, and I see only a camera and a light. Should there be custom bone shapes visible? Given the report I think so, but a screenshot would help a lot. If anything else, it would remove guesswork and provide a clear picture (literally) of the expected/correct situation.

The test file in the task description should really get an explanation, ideally with a screenshot of what it ought to look like. Right now I can open it, and I see only a camera and a light. Should there be custom bone shapes visible? Given the report I *think* so, but a screenshot would help a lot. If anything else, it would remove guesswork and provide a clear picture (literally) of the expected/correct situation.

@dr.sybren Added a simple test plan with a screenshot of an expected state. Also removed lamp and camera to make things less distracting in the viewport. Hope it clarifies things.

@dr.sybren Added a simple test plan with a screenshot of an expected state. Also removed lamp and camera to make things less distracting in the viewport. Hope it clarifies things.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Thomas Dinges added this to the 3.0 milestone 2023-02-08 15:58:47 +01: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#93439
No description provided.