Unifying sculpt, weight paint & vertex paint symmetry options under mesh properties #110156
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110156
Loading…
Reference in New Issue
No description provided.
Delete Branch "dgkf/blender:108107-unified-mesh-props"
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?
Closes #108107, tagging @JosephEagar and @JulienKaspar for review as suggested
Summary
Migrates sculpt (and weight paint, vertex paint) mode symmetry settings (including symmetry, tiling and axis locking) to mesh properties, which allows them to be configured per-mesh instead of defined for all objects. A few properties already worked this way, this work expands on previous work to migrate the reset of the sculpt symmetry panel settings.
Changes
lock_{x,y,z}
,tile_{x,y,z}
,use_mirror_{x,y,z}
,symmetry
,symmetry_feather
,symmetrize_direction
,radial_symmetry
andtile_offset
were moved to be mesh properties (previously sculpt mode properties)Needs Feedback
0
, when the original default was1
, and I couldn't figure out how to change this behavior.versioning_400.cc
? this felt beyond my capabilities right now. It wasn't obvious to me how I should go about propagating that data to the meshes.PAINT_SYMM_{X,Y,Z}
,SCULPT_LOCK_{X,Y,Z}
) and their use throughout many sculpting operators. Instead,eMeshSymmetryType
is a 1-to-1 replacement forePaintSymmetryFlags
and I simply cast to the old paint enum to leverage these existing functions without a complete refactor.tile
(axis tiling flags) andsymmetry
(symmetry axis flags) were listed in a follow-up comment in the original issue (#108107 (comment)), but not in the initial issue body (#108107 (comment)). I didn't realize they weren't part of the original scope until after I had already migrated them. Hopefully it's still valuable work, but if not I can revert those changes.Unifying sculpt, weight paint & vertex paint symmetry options under mesh propertiesto WIP: Unifying sculpt, weight paint & vertex paint symmetry options under mesh propertiesWIP: Unifying sculpt, weight paint & vertex paint symmetry options under mesh propertiesto Unifying sculpt, weight paint & vertex paint symmetry options under mesh propertiesPinging @JosephEagar and @JulienKaspar
I didn't want to pester you during Wing It! production (which was amazing 🥰), but this PR is still looking for feedback. I know 4.0 is getting closer to release and just wanted to be sure I wasn't a bottleneck if you wanted this code to be part of it. If you have other priorities during this time, I understand that too.
I'm here to wrap up this work when you need me to.
Thanks for working on this @dgkf
I added some reviewers who can help out with the technical implementation.
@JulienKaspar Can you help with the artist-side testing? I.e., the symmetry feathering.
For the new meshes it is to be done in
source/blender/makesdna/DNA_mesh_defaults.h
.For the existing meshes you'd need to write versioning code:
BLENDER_FILE_SUBVERSION
inBKE_blender_version.h
if (!MAIN_VERSION_FILE_ATLEAST(...))
blockVersioning code until next subversion bump goes here.
to that blockAdd
DNA_DEPRECATED
qualifier to the DNA fields which are deprecated.We should not have two enums which we need to keep in sync. That is just a recipe for a non-trivial bug to hunt down. If we deprecate something, only do-versioning code is allowed to access it.
We do not have mechanism to deprecate Python API. So from the code side the approach is to remove fields which are no longer used.
@ -3784,1 +3840,4 @@
/* Mesh Lock Settings */
prop = RNA_def_property(srna, "use_mesh_lock_x", PROP_BOOLEAN, PROP_NONE);
Surely this follows the same pattern of
use_mesh_mirror_{x,y,z}
but I don't think we should be doing so. We should not have such "shortcuts". If the source of proeprty is a mesh, it needs to be accessed via mesh:ob.data. use_lock_x
, notob. use_mesh_lock_x
.Sounds good! I'm happy to make this change - it also jumped out at me as a bit odd, but as a first time contributor it's not always clear how much license I should take with these types of refactoring decisions.
@Sergey - What default do you think should be used when a object has different settings in different modes? For example, symmetry lock is set in sculpt, but not in vertex paint. In such a case, what should be the migrated setting for the mesh?
I think it makes sense to enable each flag in a situation where any mode has the flag enabled. I imagine it's common for an object to be edited in only one mode (sculpted, but never vertex painted), in which case it might have sculpt x symmetry, but vertex painting was never touched. Does that sound like a reasonable way of porting old settings?
And just to give an update, I'm still definitely planning to come back to this but have been a bit preoccupied for a bit. I need to find a free weekend(s) to incorporate your feedback.
@dgkf Hey! We are finally getting to the backlog of the sculpt module. Do you mind merging the main branch into this PR, to help testing etc?
@Sergey - Sure will do. Sorry that work on this has stalled a bit. Frankly I'm a bit intimidated by some of the suggestions (handling the version migrations to the new data format and migrating all the instances of the previous variables).
I'll get the merge conflicts sorted out, but I think to keep this moving forward I might need some help with some of the aspects that require more familiarity.
@dgkf Surely we can help with the versioning and data format. Don't let these topics scare you! :)
P.S. If you're not there yet, you're welcome in the
#sculpt-paint-texture-module
room ofblender.chat
. Some discussions/questions/suggestions can be done more easily in the chat form.@dgkf @Sergey please ping me when there is a a build available that I can test.
@blender-bot package
Package build started. Download here when ready.
@Sergey seems like the build failed. I'll hold off until I hear something new
@DanielBystedt I started with a rebase last night and it looks like it should be pretty manageable. I can tag you when there's a rebased version available.
@DanielBystedt
main
has been merged in. Conflicts should all be sorted out now. I've built the latest version locally and things look like they've mostly carried over, but the code base looks like its changed pretty considerably since I started this work so I'm watching for hiccups.One thing that I've noticed already is that I can induce a crash by linked-duplicating an object and then unlinking it.
Otherwise, I'm able to configure all the symmetry options on a per-mesh basis as was the focus of this PR.
Based on the attention this PR has gotten in the last couple weeks, it seems like this might be gating some further work, so if it's holding anyone up please feel free to carry this forward without me. I don't want to slow you all down and right now my bandwidth is limited to just a bit of time on weekends.
@blender-bot package
Package build started. Download here when ready.
This PR works perfectly fine in my opinion. I can't replicate a crash by duplicete link an object and then unlink it as described above.
I tried the PR with
All works. Approved from my end
I'd be thrilled if this was accepted, but I'd also suggest reading through the feedback @Sergey gave as many of those remain unresolved. If you do merge as-is, you might consider these as next steps:
_legacy
variables that are used as this work started before they were deprecated.I can tackle these, but it will probably take me a couple weekends. If you'd like things to move faster, I'd be fine with someone swooping in and putting a final pass on everything.
@DanielBystedt Thanks for testing!
@dgkf Daniel is more on an art-side of review, for the code either me or Hans still need to have a look. Knowing that on the behavior level Daniel is happy makes it more exciting to move forward with the review though!
I am not sure if I'll immediately have time to help on the code side, unfortunately. I am also not sure if we are in a huge hurry, so no need to feel pressured!
Let me know if you'd like to have some code side review already, or whether you have some changes planned already and we'd better wait for those?
Checkout
From your project repository, check out a new branch and test the changes.