UI: Add custom attribute edge groups for bevel modifier #117366
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117366
Loading…
Reference in New Issue
No description provided.
Delete Branch "Mike93/blender:bevel-edge-attributes"
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?
As of 4.0, bevel edge weight data is stored as an "attribute" of type
float
, domainedge
. The bevel modifier is currently hard-coded to use thebevel_weight_edge
attribute as the data source for the edge weights. This small change provides a string textbox where the user can specify alternate attributes for the bevel's edge weights.I tried to implement a search dropdown box that would filter on attributes of type
float
and domainedge
but 1) could not figure it out, and 2) was advised that it was more complexity than was worth it. This might be a temporary upgrade to the bevel modifier until bevel geometry nodes take over.One more note: this code change requires adding a parameter to the bmesh bevel operator - so there's a chance this could break addons that don't use that last argument. Maybe there is a way to do default arguments or something to get around this.
Add custom attribute edge groups for bevel modifierto UI: Add custom attribute edge groups for bevel modifierThis generally looks fine to me, and makes a lot of sense given how it basically just allows changing a hard-coded property string.
It would indeed by nice if you could do something like the UI for vertex groups that shows up in the bevel modifier to choose a vertex group name. I looked a bit at the code that does that and couldn't figure out where the actual guts of the panel drawing happened. I wouldn't regard the lack of this as a show-stopper for putting this in.
Normally I would insist on trying to have parity of features with the edit mode bevel. But when you are doing destructive bevels, it doesn't seem that much of a hardship to just use the default bevel edge weight property. And anyway, I'm hoping to make bigger changes to bevel next year and so getting the current version just right seems less than crucial to me.
@ -954,1 +954,4 @@
static void rna_BevelModifier_custom_weight_name_set(PointerRNA *ptr, const char *value)
{
Object *owner = (Object *)ptr->owner_id;
Remove this line; you never used this result.
0f9c53e677
to176dde6caf
Removed the unused reference to
owner
Not sure what happened... did not mean to close, just meant to comment. Trying to re-open now.
How hard would it be to do the same thing for vertex bevel weights? Hans stated that for consistency, we should probably do that too. I'm not sure how often people use vertex bevel weights -- I guess that's the main question as to whether the consistency is worth the bother.
Took a quick stab at it, seems to work fine (I tested the default attribute which is
bevel_weight_vert
as well):Had to refactor some of the RNA/DNA names and descriptions so they are more clear. I like this more anyways, actually, since it is clear that the
limit method
ofweight
clearly points to an attribute now.As per whether people use vertex beveling... I personally have never used it. Nor have I ever seen a tutorial or video of someone else using it. I also don't know if there's a standard way of creating vertex weights, like there is with bevel edge weights (
Ctrl + E > Bevel Edge Weight
).Let me know if you want me to bring in these changes.
Yes, please bring in these changes. Thanks for doing it!
I'm waiting for Campbell to review this too, as he said he had some comments., but to me this is looking good to include in 4.1.
176dde6caf
to9e4942ce0a
While you are waiting for the other review, one thing to think about and perhaps work on is what should go in the release notes for this change. We like to put documentation in the release notes about the same time as we commit things that change visible behavior. The note would likely go here: https://developer.blender.org/docs/release_notes/4.1/modeling/ . Also, make sure that the automated tests are not broken by your changes. See https://developer.blender.org/docs/handbook/testing/
Okay thanks for the links. I will probably have some time this weekend or early next week to take a look at it.
blender/blender-developer-docs#14
Will look into the testing later this week
As far as I know we don't have conventions for attributes in modifiers, created #117893 to address this.
From reading over this patch there looks to be some issues:
I read through your other issue, it all makes sense to me. I attempted to fix the empty attribute name issue by putting this in
modify_mesh
:But I'm probably missing something larger about the DNA/RNA philosophy. This is the logic that's used in the RNA string function which actually sets the attribute value, but it seems I can't do it this way outside of the UI.
Based on Hans reply to #117893 it seems like the names are expected to be set (no fallback for empty names). This means existing files will need to be updated.
Check
source/blender/blenloader/intern/versioning_400.cc
(for referenceversion_vertex_weight_edit_preserve_threshold_exclusivity
does something similar).Thanks for the references. Sorry, this is going to seem unrelated, but are we technically not accepting new features for 4.1 now? I was reading this. I'm under a mountain of work right now and I'd like to know how long I have to tinker with this.
I'd really like to see this feature get implemented, and I'd be worried that it would get lost in the shuffle.
Any news? Seems really useful! and Bevel v2 is still very far away.
I'm still keeping an eye on the proposal regarding attribute references, but unfortunately my work load has pretty much doubled in the past month or so and I have a deadline to hit at beginning of April.
If another dev wants to pick this up I would be more than happy to walk through what I've done so far. The difficult piece will be "Clicking on the name shows a drop-down list of names (as with vertex groups), this includes the default name.". I spent nearly a day trying to figure this out, and it's beyond me. I did use the attribute dropdown in geo-nodes as a reference, but still couldn't hack it.
Understandable, and thanks for taking the patch so far! Hope it eventually lands some day, but dont stress about it :)
Checkout
From your project repository, check out a new branch and test the changes.