Shading Pie menu expansion #100234
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#100234
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?
Hi Brendon,
I've expanded upon the Shading Pie (Z) included in your add-on. Please have a look. I use this extensively and thought it might be useful to others too.
When shading smooth, autosmooth is applied automatically with a default of 30 degrees. A redo panel offers options to turn autosmooth off and adjust the angle manually or via preset buttons.
The user receives a warning in the redo panel if the mesh(es) contain(s) custom normals. If only one mesh is selected and it has custom normals, Angle values are disabled in the redo panel.
Added a pie item for Wireframe and face orientation overlay.
The shade-smooth/flat pie items are enabled conditionally on having selected at least one mesh. This seems a better solution than to make them invisible as users do not need to be informed this function exists in the Pie.
I have encountered a bug doing this I think (Or maybe it is my code?) : When holding "Z" and selecting the item, the operator is still called even that it is disabled/greyed out. When press-releasing "Z" and then clicking the Pie Item it is indeed disabled.
I might not have handled things gracefully in the code as this is my first step into Python and Blender API. But it works and does not throw exceptions as far as I've experienced/tested. (Blender 3.1 and 3.2.1)
To make the smooth angle presets work, I haven't found any other way than to store some attr() in the scene and have what boils down to a duplicate(proxy if you will) of the attr() as a property in the operator.
This seems ugly and feels like hack to me but I couldn't manage to pass on data between operators to display/update it in the redo panel any other way.
Would love to hear your thoughts and feedback !
Best Regards,
Hidde
pie_shading_menu.py
Added subscriber: @mOOngaze