Age | Commit message (Collapse) | Author |
|
|
|
BKE_mesh_free() seems to not free the meshes correctly, so using BKE_id_free() instead.
The looptri array was also not freed.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9426
|
|
|
|
This enables self intersections in the sculpt trimming tools boolean operations.
This should fix wrong booleans results after using the operator to add new disconnected
geometry with the join mode.
Reviewed By: sergey
Maniphest Tasks: T81799
Differential Revision: https://developer.blender.org/D9423
|
|
|
|
This adds an option to orientate the trimming shape using the surface
normal instead of the view when lasso trim is used.
Reviewed By: dbystedt, sergey
Differential Revision: https://developer.blender.org/D9231
|
|
This adds a tool property for sculpt line gesture tools (line and
project) to limits its effect to the segment of the gesture instead of
using the infinite line to bisect the mesh in two parts.
To achieve that, the line gesture now has two extra side planes that can
be enabled/disabled for getting the nodes from the PBVH and to test the
vertices.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9307
|
|
shapekeys/modifiers
This was failing for all mask filters (sharpen, grow, invert, clear,
shrink, contrast, smooth) and mask gestures (box, lasso).
Also have to recalc shading, use SCULPT_tag_update_overlays for this.
ref D8956
Maniphest Tasks: T81929
Differential Revision: https://developer.blender.org/D9302
|
|
Line gesture use always the right side of the line as active (the area
of the mesh that is going to be modified) by default.
This adds the ability to change the active side when the line gesture is
active by pressing the F key.
This allows more freedom to position the line after starting the
gestures, as it won't be required to cancel the operation or undo if the
line was used in the wrong direction.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D9301
|
|
|
|
The line gesture plane should be in object space, not in world space.
|
|
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
|
|
It is a boolean, not an enum.
|
|
|
|
This adds an operator property to use the paint cursor radius and
position for the depth of the trimming shape created by the trimming
tools.
When enabled, the shape is located in the surface point when the gesture
started and it will have the depth of the cursor radius. When the cursor
is not over the mesh, the shape will be positioned at the center of the
depth of the whole object from the viewport camera.
Reviewed By: dbystedt, sergey
Differential Revision: https://developer.blender.org/D9129
|
|
The code to handle object transforms was wrong. Now the trimming mesh
and depts is calculated in world space, using the real view origin and
normal and then stored in object space in the mesh and in the original
coordinates array. As now both meshes for the boolean operation are in
the same object space, the space conversion code can also be removed
from the boolean function.
Reviewed By: sergey
Maniphest Tasks: T80625
Differential Revision: https://developer.blender.org/D8852
|
|
This enables a union boolean mode for the trimming gestures tools which
adds geometry to the mesh instead of cutting it.
It also adds a Join mode, which adds the geometry directly without
using a boolean operation.
Depending if you plan to use dyntopo or not, it is useful to have both
options available.
This is using the full depth of the object from the camera view for the
depth of the geometry, but options for controlling the trimming depth in
all modes are going to be added in later patches
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D9066
|
|
Just a missing update flag
Reviewed By: mont29
Maniphest Tasks: T81343
Differential Revision: https://developer.blender.org/D9077
|
|
This adds a small gradient to the right side of the line to preview
which side of the mesh is going to be affected by the gesture operation.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D9106
|
|
This tool projects all vertices to the right of the plane defined by the
line gesture towards the plane. By doing this, this tool can create cuts
and plane surfaces in the mesh without modifying the geometry or using
boolean operations, so it is much faster than bisecting the mesh for
cases where the geometry was going to be remeshed afterwards.
Added as experimental as it does not have icon.
Reviewed By: sergey, Severin
Differential Revision: https://developer.blender.org/D9021
|
|
This adds support for line gesture to SculptGestureContext and
implements a Mask Line tool, which affects everything to the right of a plane
defined by the straightline gesture.
For this to work, a new WM_gesture_straightline_oneshot_modal is needed
which only runs exec when the gesture is over.
Added as experimental as it does not have icon.
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D8722
|
|
This adds XYZ symmetry as a property of meshes and updates all modes to
use the mesh symmetry by default to have a consistent tool behavior
between all modes and when switching objects.
Reviewed By: brecht, mano-wii, campbellbarton
Maniphest Tasks: T79785
Differential Revision: https://developer.blender.org/D8587
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8886
|
|
Also added code so that exact solver does the whole collection at once.
This patch allows users to use a collection (as an alternative to Object)
for the boolean modifier operand, and therefore get rid of a long modifier stack.
|
|
This implements Box Trim as a boolean based trimming too gesture in sculpt
mode. This is the intended way to remove parts of the sculpt instead of
using box mask and mask slice. It also creates new face sets for the new
faces created after the boolean operation.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8766
|
|
|
|
This replaces the switch case and operation types with a
SculptGestureOperation struct with callbacks.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8798
|
|
This implements the sculpt gesture lasso and box operators for face
sets. They work the same way as the mask gesture operator and tools.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8716
|
|
This refactors Box Mask and Lasso mask making both functions share the
same code. After this change it should be easier to add new
functionality, new gesture tools or implement new gesture modes.
No functional changes.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8707
|
|
This adds a property that checks the normals of each vertex against the
view direction to decide if they should be masked (similar to the
"Front Faces Only" option works for brushes.
Reviewed By: sergey
Maniphest Tasks: T77637
Differential Revision: https://developer.blender.org/D8448
|
|
|
|
Box mask is not a selection, so it should not be part of the select
operator. This allows to add more sculpt mode specific functionality and
properties and to share more code with the lasso mask operator in a
later refactor.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8456
|
|
|
|
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
|
|
|
|
- 'coords' is an abbreviation for coordinates, not 'cords'.
- Rename 'moves' to 'coords_len'.
|
|
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 old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6788
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6792
|
|
This solves performance issues on some computers where there is significant
threading overhead. Rather than doing the complicated work of optimizing our
own task scheduler, use TBB which appears to work well. The downside is that
we have another thread pool, but it is already there when using OpenVDB voxel
remesh.
For future releases we can switch to using TBB to replace our task scheduler
implementation entirely, and use the same thread pool for BLI_task, Cycles,
Mantaflow, etc.
Differential Revision: https://developer.blender.org/D6030
|
|
This commit introduces flags to tag the PBVH nodes as fully masked or unmasked. This is used in do_brush_actions to filter fully masked nodes during a stroke. Other tools can also be updated to use this flags.
Sculpt updates now require a flag to update the mask or the vertex coordinates.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5935
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5923
|
|
Easier to experiment with different settings this way.
|
|
Use all 6 clipping planes for drawing.
|
|
|
|
Particularly noticeable when vertex painting with a subsurf modifier.
In some cases every sculpt or paint stroke step would evaluate the dependency
graph. This should only happen for redraws. Now more selectively choose if the
dependency graph should be evaluated to initialize the view context. Doing it
in the view context evaluation is somewhat hidden, now it's more explicit.
Differential Revision: https://developer.blender.org/D5844
|