Age | Commit message (Collapse) | Author |
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
This is part of the project of converting `MVert` into `float3`.
(more details in T93602), The pbvh update flag is removed and
replaced with a bitmap stored in the PBVH structure. This
patch is similar to D13878. This is mainly setup for an eventual
performance improvement by removing the extra data from
mesh vertices, but if it's consistent with testing in the other patch
doing the same thing for another "temp tag", then it may actually
increase the speed of sculpt code slightly, since less memory needs
to be loaded when checking/changing the flags.
Differential Revision: https://developer.blender.org/D14000
|
|
Ref T92709
|
|
By argument naming and convention this is the intended argument order.
|
|
Face set visibility is already flushed to all mesh elements in the right
way in SCULPT_visibility_sync_all_face_sets_to_vertices, calling
BKE_mesh_flush_hidden_from_verts is legacy code from the previous
visibility system that was causing the vertex visibility to take
priority over face sets. When hidding a single loop, all vertices of
those faces are still visibile, so this line was tagging all loop faces
visible. This was leaving mesh/face set visibiltiy in an unconsistent
state.
Reviewed By: JacquesLucke
Maniphest Tasks: T87474
Differential Revision: https://developer.blender.org/D11008
|
|
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10707
|
|
This adds an extra option to the Face Sets Init operator to initialize
individual Face Sets based on the current Face Sets boundaries.
In particular, this is useful for splitting the patterns created by
Expand into individual Face Sets for further editing.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10608
|
|
This removes indentations from if statements by converting them to early
returns and continue.
Most of the code of brushes and tools has loops with a full indented
body inside of an if, which was also copied into some of the new tools.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10333
|
|
|
|
This implements a mesh fairing algorithm and implements the fair
operations for Face Set edit. This edit operations create a smooth as
possible geometry patch in the area of the selected Face Set.
The mesh fairing algorithm is designed by Brett Fedack for the addon
"Mesh Fairing": https://github.com/fedackb/mesh-fairing, with some
modifications:
- The main fairing function in BKE_mesh_fair.h does not triangulate
the mesh. For the test I did in sculpt mode results are good enough
without triangulating the topology. Depending on the use and the
result quality needed for a particular tool, the mesh can be
triangulate in the affected area before starting fairing.
- Cotangents loop weights are not implemented yet. The idea is to
also expose the vertex and loop weights in a different function in
case a tool needs to set up custom weights.
This algorithm will also be used to solve the limitations of line
project and implement the Lasso Project and Polyline Project tools.
It can also be used in tools in other areas of Blender, like Edit Mode
or future retopology tools.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9603
|
|
Rerun `make format`.
No functional changes.
|
|
the mesh
If the cursor is not over the mesh, the operator was still using the
last Face Set ID updated by the drawing cursor code when the cursor was
over the mesh.
This now cancels the operator instead of modifying a Face Set that will
look random to the user.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9545
|
|
Error in cb9de95d61b32f90788875f20e046095bb6310ad
|
|
|
|
Should not do anything in that case.
ref T82615
Maniphest Tasks: T82615
Differential Revision: https://developer.blender.org/D9532
|
|
Issue exposed by rB4c7b1766a7f1.
Main idea is that non-memfile first undo step should check into previous
memfile and tag the ID it is editing as `future_changed`.
That way, when we go back and undo to the memfile, said IDs are properly
detected as changed and re-read from the memfile.
Otherwise, undo system sees them as unchanged, and just re-use the
current data instead.
Note that currently only Sculpt mode seems affected (probably because it
is storing the mode switch itself as a Sculpt undo step instead of a
memfile one), but similar action might be needed in some other cases
too.
Maniphest Tasks: T82388
Differential Revision: https://developer.blender.org/D9510
|
|
|
|
The draw face sets brush uses the poly center when used in meshes to increase
its precision when working in low poly geometry. For this to work with deformed
meshes, the deformed coordinates from the PBVH should be used instead.
Reviewed By: sergey
Maniphest Tasks: T81915
Differential Revision: https://developer.blender.org/D9424
|
|
This adds an operation mode to the Face Set Edit tool which deletes the
geometry of a Face Set by clicking on it.
The operator also checks for the mesh having a single Face Set to avoid
deleting the entire object by accident.
This is also disabled for Multires to avoid modifying the limit surface
without control (it is not an important limitation as base meshes for
multires are usually final, but maybe it can be supported in the future).
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8938
|
|
Now that sculpt mask and face sets can also be drawn without using the
PBVH, these operators need these extra updates when the data changes.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8956
|
|
Previously, all Face Set visibility logic was using mvert flags directly
to store the visibility state on the vertices while sculpting. As Face
Sets are a poly attribute, it is much simpler to use mpoly flags and let
BKE_mesh_flush_hidden_from_polys handle the vertex visibility, even for
Multires.
Now all operators that update the Face Set visibility state will always
copy the visibility to the mesh (using poly flags) and the grids, all
using the same code.
This should fix a lot of visibility glitches and bugs like the following:
- Sculpt visibility reset when changing multires levels.
- Multires visibility not updating in edit mode.
- Single face visibible when surrounded by visibile face set, even when
the face set was hidden.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9175
|
|
Follow the MLA style, agreed upon in T79589. This means "from" within UI
labels should be lowercase.
Differential Revision: https://developer.blender.org/D8345
|
|
This implements a Face Set Extract operator, which is similar to mask
extract. This operator uses a picker to select and Face Set in the mesh
and extract the geometry directly to a new object.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8599
|
|
The Face Set visibility operator was using the last active Face Set
updated by the paint cursor, so when the paint cursor is not used (when
using a filter or a transform tool), the active Face Set was not updating
and it was hidding the wrong Face Set based on the last cursor position
with a brush tool active. Now the Face Set Visitility operator has an
invoke callback wich forces a active vertex and face set update
regardless of the active tool, so it should always work correctly.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8580
|
|
This was a TODO in the code. Previously the Face Set datalayer was
deleted and recreated with a constant ID of 0. Now the datalayer is
preserved and set to the SculptSession after slicing the mask and a new
ID is calculated for the new faces that the slicing operation produced,
so they can be easily isolated for further tweaking.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8583
|
|
Previously the way to use this operations was using the shortcut Ctrl +
W and Ctrl + Alt + W, which was not very discoverable and it was
limiting the amount of options that can be added to the operator.Now the
same functionality of the operator is available as a tool, which will
make easier to add other editing operations and options without adding
more entries to the keymap.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8545
|
|
This options allows to perform Face Sets operations while preserving the
mesh visibility. Edit hidden face sets is enabled by default in order to
expand the visible area of the mesh with the grow/shrink operator, but
this can be changed in the keymap per edit operation as more operations
are supported.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8029
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
Previously, mesh boundaries were relaxed as any other vertex, which was
causing artifacts and unwanted deformation. In order to prevent this,
the mesh filter was using the automasking system to lock the boundary
vertices, which was hacked into the tool. For the brush, the only
solution was to enable boundary automasking to lock those vertices
in plance.
Now the relax vertex function slides the boundary vertices along the
mesh boundary edges, relaxing all the topology correctly while
preserving the shape of the mesh. The automasking hack in the relax
mesh filter was also removed as now vertices slide correctly along
the boundary.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8350
|
|
Threaded Sculpt is now always enabled by default. If it causes
performance problems compared single threaded sculpt it should be
considered a bug.
Reviewed By: sergey
Maniphest Tasks: T77638
Differential Revision: https://developer.blender.org/D7960
|
|
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time.
This commit includes:
- SCULPT_UNDO_COLOR for undo support in sculpt mode
- SCULPT_UPDATE_COLOR and PBVH flags and rendering
- Sculpt Color API functions
- Sculpt capability for sculpt tools (only enabled in the Paint Brush for now)
- Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint)
- Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint)
- Remesher reprojection in the Voxel Remehser
- Paint Brush and Smear Brush with color smoothing in alt-smooth mode
- Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors
- Color Filter
- Color picker (uses S shortcut, replaces smooth)
- Color selector in the top bar
Reviewed By: brecht
Maniphest Tasks: T72866
Differential Revision: https://developer.blender.org/D5975
|
|
This operator performs an edit operation in the active face set defined
by the cursor position and updates the visibility. For now, it has a
Grow and Shrink operations, similar to Select More/Less in edit mode or
to the mask filter Grow/Shrink modes. More operations can be added in
the future.
In multires, this updates the visibility of an entire face from the base
mesh at once, which makes it very convenient to edit the visible area
without manipulating the face set directly.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7367
|
|
This was propsed in D7059, so I applied it to the rest of the code
Reviewed By: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D7480
|
|
If all vertices in the sculpt are visible create the new face set and
update the default face set. This is the same as disabling the overlay,
so it will not have the extra performance cost of rendering a colored
face set twice that gives no information.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7530
|
|
|
|
|
|
Operators should almost always implement exec() so that they can work without
user event input. In this case there was no reason to have invoke() at all
since no event is needed.
|
|
|
|
This implements the restore function for Draw Face Sets and Layer, which
don't affect coordinates or masks directly. This is needed for the
anchored and dot brush strokes.
Layer frees the current displacement and a new one is created on each
stroke sample. Draw Face Sets copies the data back from the first undo
node to the mesh datalayer.
Also fixes T75727
Reviewed By: jbakker
Maniphest Tasks: T75727
Differential Revision: https://developer.blender.org/D7442
|
|
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.
Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D7475
|
|
|
|
The operator was disabled when it was added because Face Sets were not
supported in Multires.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7312
|
|
|
|
|