Update sculpt mode symmetry options as properties of meshes #108107

Open
opened 2023-05-20 16:58:37 +02:00 by Julien Kaspar · 4 comments
Member

(NOTE) This task is part of the community & sub tasks of the workboard. Anyone is free to pick up this task and contribute. For any questions or needed reviewers, please tag @Sergey @HooglyBoogly and @JulienKaspar.

There have been multiple patches to improve the symmetry behavior on painting/sculpt modes:

Some bpy.data.scenes properties have been left out of this and still need to be unified as a mesh property instead:

  • tool_settings.sculpt.lock_x
  • tool_settings.sculpt.lock_y
  • tool_settings.sculpt.lock_z
  • tool_settings.sculpt.use_symmetry_feather
  • tool_settings.sculpt.radial_symmetry[0]
  • tool_settings.sculpt.radial_symmetry[1]
  • tool_settings.sculpt.radial_symmetry[2]
  • tool_settings.sculpt.tile_offset[0]
  • tool_settings.sculpt.tile_offset[1]
  • tool_settings.sculpt.tile_offset[2]
  • tool_settings.sculpt.symmetrize_direction
(NOTE) This task is part of the community & sub tasks of the workboard. Anyone is free to pick up this task and contribute. For any questions or needed reviewers, please tag @Sergey @HooglyBoogly and @JulienKaspar. There have been multiple patches to improve the symmetry behavior on painting/sculpt modes: - 5502517c3c - fa9b05149c2ca3915a4fb2670c87a648d927336c Some `bpy.data.scenes` properties have been left out of this and still need to be unified as a mesh property instead: - `tool_settings.sculpt.lock_x` - `tool_settings.sculpt.lock_y` - `tool_settings.sculpt.lock_z` - `tool_settings.sculpt.use_symmetry_feather` - `tool_settings.sculpt.radial_symmetry[0]` - `tool_settings.sculpt.radial_symmetry[1]` - `tool_settings.sculpt.radial_symmetry[2]` - `tool_settings.sculpt.tile_offset[0]` - `tool_settings.sculpt.tile_offset[1]` - `tool_settings.sculpt.tile_offset[2]` - `tool_settings.sculpt.symmetrize_direction`
Julien Kaspar added the
Type
To Do
Meta
Good First Issue
Module
Sculpt, Paint & Texture
labels 2023-05-20 16:58:38 +02:00
Julien Kaspar added this to the Sculpt, Paint & Texture project 2023-05-20 16:58:39 +02:00
Julien Kaspar changed title from Update all sculpt mode symmetry options properties of meshes to Update sculpt mode symmetry options as properties of meshes 2023-05-20 16:59:03 +02:00

Thanks for filing this as a Good First Issue! I've been keen to contribute for a while and waiting for some new issues to drop!

This looks like it's within my capabilities and would be a good entry into contributing to blender. With a quick glance through the other PRs you linked, I think I have a reasonable idea of what needs to happen - at least enough to do my due diligence trying to understand what the changes would look like. I'll follow up if I need more guidance.

Thanks for filing this as a _Good First Issue_! I've been keen to contribute for a while and waiting for some new issues to drop! This looks like it's within my capabilities and would be a good entry into contributing to blender. With a quick glance through the other PRs you linked, I think I have a reasonable idea of what needs to happen - at least enough to do my due diligence trying to understand what the changes would look like. I'll follow up if I need more guidance.

Hi @JosephEagar and @JulienKaspar, just following up with a small progress update and looking for feedback to make sure I'm heading in the right direction.

I've only tackled the tool_settings.sculpt.lock_[x|y|z] settings so far (6e1457e857) and wanted to get confirmation that my approach is what you had in mind before continuing with the rest.

Just to outline briefly what has been done:

And a couple questions as I'm continuing to chip away at this:

  • How would you like to tackle lifecycle management of the tools_settings.sculpt.* variety? Does this functionality need to continue in a deprecated capacity?
  • I haven't delved into unit testing yet. What would be the expectations for adding tests for a PR like this?
Hi @JosephEagar and @JulienKaspar, just following up with a small progress update and looking for feedback to make sure I'm heading in the right direction. I've only tackled the `tool_settings.sculpt.lock_[x|y|z]` settings so far (https://projects.blender.org/dgkf/blender/commit/6e1457e857a345b909f610f660ed9af745922cef) and wanted to get confirmation that my approach is what you had in mind before continuing with the rest. Just to outline briefly what has been done: - A new mesh data `lock` field was added. Modeled after the `symmetry` field, this is a `char` that uses bit encoding to flag locked axes https://projects.blender.org/dgkf/blender/commit/6e1457e857a345b909f610f660ed9af745922cef#diff-81f02e349c4d2da7313556c5d876fc3d01779090 - These flags are exposed in the mesh RNA as `lock_[x|y|z]` https://projects.blender.org/dgkf/blender/commit/6e1457e857a345b909f610f660ed9af745922cef#diff-fb1b990e2905fb7e654c85fc4542ea07d0bc800d - These flags are exposed in the unified object RNA through `use_mesh_lock_[x|y|z]` https://projects.blender.org/dgkf/blender/commit/6e1457e857a345b909f610f660ed9af745922cef#diff-de8ed8944af694d61797d1b4d07e15c385c6bafa - `SCULPT_clip` updated to provide object data through which we extract the mesh-associated fields https://projects.blender.org/dgkf/blender/commit/6e1457e857a345b909f610f660ed9af745922cef#diff-e836d5c7c3c5232ac739532fdb40db8abca0a18d - The sculpt symmetry paint panel now registers mesh properties instead of sculpt tool settings https://projects.blender.org/dgkf/blender/commit/6e1457e857a345b909f610f660ed9af745922cef#diff-8bce79955e727d966a996c81b733c12d54456e1c And a couple questions as I'm continuing to chip away at this: - How would you like to tackle lifecycle management of the `tools_settings.sculpt.*` variety? Does this functionality need to continue in a deprecated capacity? - I haven't delved into unit testing yet. What would be the expectations for adding tests for a PR like this?

@JosephEagar and @JulienKaspar - Just following up to see if I can get some eyes on this work-in-progress. See last comment for some description of where I'm at.

Hoping to get confirmation/course correction before the weekend when I can put a bit more time into this.

@JosephEagar and @JulienKaspar - Just following up to see if I can get some eyes on this work-in-progress. See last comment for some description of where I'm at. Hoping to get confirmation/course correction before the weekend when I can put a bit more time into this.
Member

We might want to think about using a struct.

typedef struct PaintSymmetry {
  char symmetry;
  char symmetrize_direction;
  char lock;
  char feather;
  float tile[3];
  float radial_symmetry[3];
} PaintSymmetry;

But that can come later. What you've done so far is a good start.

We might want to think about using a struct. ```C typedef struct PaintSymmetry { char symmetry; char symmetrize_direction; char lock; char feather; float tile[3]; float radial_symmetry[3]; } PaintSymmetry; ``` But that can come later. What you've done so far is a good start.
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 Assignees
3 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#108107
No description provided.