Mangal Kushwah d37342e185 Fix #108105: Fix operators affecting hidden geometry
These operators in sculpt mode affect hidden geometry which is undesirable.
- bpy.ops.sculpt.face_set_edit
- bpy.ops.sculpt.face_sets_init
- bpy.ops.sculpt.face_sets_create(mode='SELECTION')
- bpy.ops.mesh.paint_mask_extract()
- bpy.ops.mesh.paint_mask_slice()

This PR adds checks for hidden faces in these operators.

For operator `bpy.ops.sculpt.face_sets_init` it also modifies the way
face sets indices were generated so generated indices is unique. This
is needed so new initialized face sets do not get same indices as hidden
face sets.

For generating unique face set index I have created a set container
which stores hidden face sets indices. Before assigning indices to a
face set it checks if it is already in set container, if it is then
it'll keep increasing index by 1 until it is not in set container.

Modifying Operator `bpy.ops.mesh.paint_mask_slice()` is little complex,
it will not affect hidden geometry only when fill holes option is
unchecked, because currently filling hole code does not take hidden
geometry into account and because of this in some cases hidden part
of geometry can be trapped inside mesh.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/119168
2024-05-23 19:24:12 +02:00
2024-05-21 20:41:50 +02:00
2023-12-08 13:28:13 +11:00
2024-03-14 18:12:51 +01:00
2024-03-07 14:07:39 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%