Age | Commit message (Collapse) | Author |
|
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
|
|
symmetry pass
The cloth brush fixed simulation areas are created using the initial_location variable in the
StrokeCache. This variable was not being updated by tiling symmetry, so all symmetry passes
were using the same simulation area location.
Reviewed By: sergey
Maniphest Tasks: T81842
Differential Revision: https://developer.blender.org/D9421
|
|
The strength of this brush needs to take alpha into account
Reviewed By: sergey
Maniphest Tasks: T82297
Differential Revision: https://developer.blender.org/D9419
|
|
|
|
This introduces a new operator to edit the detail size of constant
detail mode in dyntopo. The way this operator works and the
functionality it provides is similar to the "Voxel size edit" operator
for the voxel remesher.
It also includes a sample mode. When pressing Ctrl, the detail size
will be sampled from the surface under the cursor, updating the
preview in real time. This allows quick resolution changes without
using the operator multiple times.
The operator is set to Shift + D, replacing the old way to change
the constant detail size of dyntopo. Shift + R will remain available to
be enabled when the voxel remesher works with dyntopo. Deciding
if both detail sizes can be unified needs a separate discussion as the
new dyntopo can work with detail sizes in parts of the mesh that can
easily crash the remesher.
The structure of these operators is similar, but the data they control,
ranges, drawing and setup functions are completely different, making it
hard to merge them into one.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9355
|
|
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
|
|
Wasnt checking the symmetrized 'grab_delta_symmetry' so result could
flip around.
Maniphest Tasks: T82188
Differential Revision: https://developer.blender.org/D9373
|
|
The logic of `BKE_sculpt_update_object_for_edit` was not correct. such
low-level functions should typically never preform depsgraph evaluation
themselves, they should be able to rely on getting a fully evaluated
depsgraph and just get needed data from there.
Supporting that required fixing other broken code higher in the
callstack, namely:
* `ED_object_sculptmode_enter_ex` was freeing evaluated data, for no
valid reason it would seem.
* `sculpt_undosys_step_decode` was ensuring an evaluated depsgraph
**before** calling `ED_object_mode_generic_exit`, which would
invalidate a lot of evaluated data.
Note that it is fairly difficult to track down all code paths leading to
`BKE_sculpt_update_object_for_edit`, so there may be still cases where
this gets called with improperly evaluated depsgraph.
Reviewed By: sergey
Maniphest Tasks: T81854
Differential Revision: https://developer.blender.org/D9270
|
|
Follow our code style for doxygen sections.
|
|
|
|
|
|
When using local area, all nodes need to build their constraints first
before activating them for simulation. THis ensures that nodes get their
structural constraints from the initial location of each symmetry pass.
Reviewed By: sergey
Maniphest Tasks: T81904
Differential Revision: https://developer.blender.org/D9303
|
|
The plane deformation falloff was introduced in the first version of the
cloth brush, but due to the lack of all the new features and fixes in the
solver it was causing a lot of artifacts for deformation brushes. In
order to avoid that, the cloth brush was always using radial falloff for
the grab brush.
Now the plane falloff is properly implemented using the deformation
constraints.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9320
|
|
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
|
|
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
|
|
|
|
clipped geometry
Caused by rB7878adf49cff.
When getting the stroke location via raycast in ortho view, the above
commit flipped the condition of the check to perform adjustments on the
rays start/end. This would thus happen (even though it shouldnt),
resulting in wrong depth and stroke location.
Now just flip the condition back, so adjustments only happen when
clipping is OFF.
Maniphest Tasks: T81934
Differential Revision: https://developer.blender.org/D9318
|
|
This adds a property to the grab that masks vertices based on its
original normal and grab delta. When used on thin meshes, it allows to
grab the silhouette from one side of the object without affecting the
shape of the other side.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9205
|
|
Paint and smear tools are only implemented for regular mesh PBVH,
meaning they are not supported by the dynamic topology and multires
sculpting.
These tools are to be ignored for an unsupported sculpt modes, regardless
of state of user preferences.
Reviewed By: sergey
Maniphest Tasks: T81932
Differential Revision: https://developer.blender.org/D9308
|
|
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
|
|
|
|
SCULPT_tilt_apply_to_normal expects a normal, and offset was already
scaled by radius. The funcion returns a normalized vector, so the
strength of the brush was changed.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9275
|
|
The line gesture plane should be in object space, not in world space.
|
|
When creating the boundary edit data, the loop can stop because a new
vertex was found further from the boundary than the brush radius or
because all vertices of the mesh were already processed. In this second
case, the max_propagation_step was not set, so the code that laters
calculates the falloff was not working, preventing the mesh from
deforming.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9215
|
|
This adds a smooth deformation type to the boundary brush, which smooths
the boundary and has a regular falloff towards the inside of the mesh.
For smoothing, only vertices parallel to the boundary are taken into
account, creating this effect.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9204
|
|
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 the base displacement for solving the constraints was always
using 0.5, which may introduce artifacts when multiple constraints of
different types are computed for the same vertex. This introduces a
factor that reduces the base displacement of the solver, reducing the
artifacts.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9202
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
update stroke on initial side
Issue introduced in rB4f616c93f7cb.
Issue here is that the the `StrokeCache` `mirror_symmetry_pass` is still
in its previous state when entering
`wpaint_do_symmetrical_brush_actions`.
For the initial stroke this means that the (wrong) cache
`mirror_symmetry_pass` ends up in SculptBrushTest `mirror_symmetry_pass`
as well and thus the clipping test in `sculpt_brush_test_clipping` will
fail.
[ This one flips the coords to test against clipping according to (now
wrong) `mirror_symmetry_pass` ]
Solution seems simple: just ensure we start of with a
`mirror_symmetry_pass` of zero in `wpaint_do_symmetrical_brush_actions`
for the initial stroke.
Same thing is done for vertex paint as well.
Maniphest Tasks: T81484
Differential Revision: https://developer.blender.org/D9268
|
|
Cursor drawing code was not checking for potential NULL pointers.
|
|
It is a boolean, not an enum.
|
|
|
|
|
|
|
|
The cloth brush grab mode was creating constraints at 1.0 strength in
the area of the brush where the fade was evaluated to 1. This was causing
stability issues in the simulation and not producing ideal results.
Now the constraint strength is scaled with an empirically found factor.
The values in this patch may require further tweaking after experimenting
a little bit more with them.
Reviewed By: sergey, zeddb
Differential Revision: https://developer.blender.org/D9201
|
|
When using anchored stroke, the stroke operator was modifying the
coordinates on the "mouse" rna property by setting them to the original
position. Because of this, all the sculpt delta calculation was failing
and the delta for these brushes was set randomly (with a 0 vector) at
the beginning of the stroke.
There is now an extra property that uses the unmodified coordinates of
the mouse to calculate the delta. Now delta orientation works as expected
in all brushes and features that require brush tip orientation.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9183
|
|
Dynamic area should use the radius instead of the initial radius to get
the nodes as the radius can now change during the stroke. In case of
anchored strokes, the current radius can be bigger than the initial
radius, simulating vertices outside the falloff area and breaking the
mesh.
Reviewed By: sergey
Maniphest Tasks: T81649
Differential Revision: https://developer.blender.org/D9181
|
|
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
|
|
When using the sculpt filters, global automasking settings that affect
all brushes were ignored because the automasking system was not
implemented for filters, making filters and brushes react differently
to the global sculpt settings which creates confusion.
This makes all filter tools (mesh, cloth, color) use the same general
automasking settings and features as the brush tools. Filters will now
use the settings in the options panel to limit their effect.
This also removes the "use Face Sets" option from the Mesh filter code,
as it was duplicated from the automasking code just to have that
funcitonality. This is now handled by the regular automasking system.
The "Use Face Sets" option is still available in the cloth filter as that
option limits the action of the forces, not the displacement.
After this, it is possible to initialize the automasking system
independently from the StrokeCache and Brush settings, so it can also be
added to more tools and features in the future.
Fixes T81619
Reviewed By: dbystedt, sergey
Maniphest Tasks: T81619
Differential Revision: https://developer.blender.org/D9171
|
|
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
|
|
This patch enables the paint brush cursor with all tools in sculpt mode,
even with the ones that are not brushes. The motivations for this change
are:
- The filters are using the position of the active vertex for certain
features without any visualization of what the active vertex is.
- You can call operators like mask expand (which depends on the brush
cursor position and active vertex) with a non brush tool enabled.
- Having the cursor in the rest of the tools allows to have a scene
scale representation of the radius and a direct control of radius and
strength (using the current brush shortcuts), which will allow to make
features more intuitive without relying on modifying values in the
topbar. For example, the brush radius can be used to control the depth
of the cut in the trimming tools or the size of the sphere in the
sphere mesh filter
Reviewed By: #user_interface, dbystedt, pablovazquez
Differential Revision: https://developer.blender.org/D9071
|
|
This forces the mask expand modal operator to use the maximum
iteration when the cursor is not over the mesh, masking the entire
connected component.
This fixes the issue for both expanding masks and face sets.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9105
|
|
This adds support for pen tilt in sculpt mode. For now, pen tilt is used
by tweaking the tilt strength property, which controls how much the pen
angle affects the sculpt normal. This is available in Draw, Draw Sharp,
Flatten, Fill, Scrape and Clay Strips brushes, but it can be enabled in
more tools later.
The purpose of this patch is to have a usable implementation of pen tilt
in a painting mode, so users can test and see in which hardware and
platforms this feature is supported and how well it works. If it works
ok, more tools and features that rely on pen tilt can be implemented,
like brushes that blend between two deformations depending on the angle.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8893
|
|
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
|
|
|
|
|
|
color using CTRL
This was just not implemented. Now make this consistent with
vertexpainting / texturepainting.
Maniphest Tasks: T81670
Differential Revision: https://developer.blender.org/D9195
|
|
Previously the softbody strength property was controlling the strength
of the constraints that pin all vertices to the original location. This
was causing problems when the forces were trying to deform the vertices
too much, like when using gravity or grab brushes.
Now softbody is implemented with plasticity, which creates constraints to
a separate coordinates array. These coordinates are deformed with the
simulation, and the plasticity parameter controls how much the
simulation moves the coordinates (plasticity 0), or the coordinates move
the simulation back to its previous position (plasticity 1).
This creates much better and predictable results and adding softbody
plasticity to the brushes can increase its control and the stability of
the simulation.
Reviewed By: sergey, zeddb
Differential Revision: https://developer.blender.org/D9187
|