Appended menus to VIEW3D_MT_editor_menus are not displayed #58937
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#58937
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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?
Blender Version
Broken: 2.80,
Short description of error
The code bellows illustrate the issue : a new menu is added to to
VIEW3D_MT_editor_menus
class which inherit frombpy.types.Menu
and embed others 3d view menus, but this new menu does not appears. IfVIEW3D_MT_editor_menus
is displaying in another panel then the new menu appears which confirms that the append is effective.See also related BA thread .
Added subscriber: @domlysz
Added subscribers: @ideasman42, @lichtwerk
Seems like VIEW3D_HT_header calls
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
which in turn calls
cls.draw_menus(layout.row(align=True), context)
then
VIEW3D_MT_editor_menus.draw_menus()
is pretty hardcoded (and doesnt really take into any appended menus as it seems)Not sure exactly why it works when the
VIEW3D_MT_editor_menus
is placed in a panel in the Properties Editor.Maybe @ideasman42 knows?
This isn't exactly a bug since this method of drawing doesn't use a menu instance.
Even so, it would be nice to support.
We could workaround this but not really happy with this solution especially since it's running in the typical case when all items are displayed.
Edit, thinking about this - I think the correct solution is to add a method that draws the menu expanded (in the header or panel...). Then we get a menu instance and don't need to have a hacky workaround.
This issue was referenced by blender/blender@756be8f4d8
This issue was referenced by blender/blender@dc3d9467f2
Changed status from 'Open' to: 'Resolved'