Age | Commit message (Collapse) | Author |
|
As discussed in D9120, this was an oversight in rBe0c792135adf, the same
assignment already happens a couple of lines above.
|
|
This was reported for sculpting, the same is true for weightpaint or
vertexpaint though.
When viewport clipping and radial symmetry are enabled, the
'sculpt_brush_test_clipping()' function was not considering radial
symmetry at all, so if the coordinate was outside the clipping planes,
no action would take place. Now the coordinte is brought back to where
the stroke actually happens and that is checked against clipping.
Since other mirroring options while painting/sculpting (as well as
editmode operations with mirroring) usually still take place even if the
mirrored coord is outside the clipping planes, this should also be the
case for radial symmetry.
This grows the 'SculptBrushTest' struct a bit, but should be acceptable?
Fixes T81466
Maniphest Tasks: T81466
Differential Revision: https://developer.blender.org/D9120
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
When sampled normals were disabled SCULPT_cursor_geometry_info_update
was returning false instead of the value from the raycast data.
|
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
Follow the MLA style, agreed upon in T79589. This means "from" within UI
labels should be lowercase.
Differential Revision: https://developer.blender.org/D8345
|
|
In that case, weightpainting would still be done threaded, but current
mirroring code cannot be run in parallel.
Caused by rB5502517c3c12 [which was checking mesh 'flag', needs to be
'editflag' -- thus test was always true].
Reviewers: pablodp606
Maniphest Tasks: T81461
Differential Revision: https://developer.blender.org/D9126
|
|
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 helps blending artifacts with dynamic simulation areas as the
damping increases when the vertex.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D9084
|
|
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
|
|
We have our own assert implementation, `BLI_assert()` that is prefered over the
C standard library one. Its output is more consistent across compilers and
makes termination on assert failure optional (through `WITH_ASSERT_ABORT`).
In many places we'd include the C library header without ever accessing it.
|
|
|
|
Use POINTER_AS_INT instead
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D9083
|
|
When a Shape Key is active, use the PBVH deformed coordinates for the
preview.
Reviewed By: sergey
Maniphest Tasks: T80873
Differential Revision: https://developer.blender.org/D8921
|
|
When using anchored strokes, inbetween events are not needed since there
is no stroke path to be reconstructed. Handling the inbewteen events are
only producing unnecessary updates, creating performance issues.
Reviewed By: sergey, brecht
Differential Revision: https://developer.blender.org/D9053
|
|
This simulation area mode moves the active area with the brush. When
enabled, the cloth brush has no restrictions on stroke length, area or
mesh vertex count.
In order to work, this enables PBVH nodes dynamically for simulation as
the stroke location moves and builds the constraints for new nodes
during the stroke. When a node is not inside the simulated area, all the
constraints that were created for it and vertex collisions are not
computed. The simulation limits falloff areas and constraints tweaking
control how the simulated and no simulated nodes blend.
Reviewed By: sergey, zeddb
Differential Revision: https://developer.blender.org/D8726
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
Before this change, when users switch from edit mode to sculpt mode, the
entire mesh would be visible. Even if in the edit mesh mode part of it was
set to invisible.
With this change the visibility is preserved, by creating a separate face set
for the visible and invisible parts of the mesh and setting their initial visibility.
Implementation details: This adds a function to initialize a new Face Set
datalayer taking the current mesh visibility into account which is stored
in the ME_HIDE flag of the vertices.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8901
|
|
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
|
|
|
|
Forgot that arc land also did the pus ot originh.
|
|
I created a bugreport T80859 earlier.
The problem is in the file source/blender/editors/sculpt_paint/paint_image_proj.c (line numbers against commit d376aea61)
at the lines 5309 and 5320 the functions `IMB_rect_from_float(...)` and `IMB_float_from_rect(...)` are called from threaded code on a shared ibuf.
However, ps->reproject_ibuf is shared between threads, so this is not thread-safe.
This is a race condition and leads to wrong output when projecting float data onto a uchar texture or vice versa on a multithreaded system.
The checks on line 5308 and 5319 are already a race condition.
I created this patch which fixes the problem , but I'm not sure if I'm overlooking something.
This makes sure reproject_ibuf contains the correct formats *before* the threadpool is started.
I replaced the original location of the conversions with BLI_asserts(). That may be overkill?
Reviewed By: #sculpt_paint_texture, mont29
Maniphest Tasks: T80859
Differential Revision: https://developer.blender.org/D8936
|
|
Along some other typos in comments or variable names.
|
|
Those two functions had `BKE_` prefix, were defined in BKE headers, but
implemented in ED code, yuck.
Moved everything to ED area for now, since those do not look fondamental
enough to belong to BKE, and none of their usages requires it currently.
|
|
As noted by @lichtwerk (thanks), one can have a local object and/or
material using a linked image data-block, this case needs some different
handling to prevent painting on such linked image.
For now, tweak `BKE_paint_proj_mesh_data_check` (eeeek, that name
prefix!) to consider paintslots with linked image as 'non-existing'.
|
|
There is just no reason to support that kind of useless behavior.
Some remote TODO could be to define a process based on liboverride and
layers.
|
|
Mainly use false/true for bool, but also a few others.
No change in behavior expected.
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
Unused variables, missing include for declaration, missing 'static'
specifier. Also rename function to match naming convention.
|
|
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
|
|
This filter scales the mesh as it was a softbody, producing folds in the
surface. The orientation of the folds can be controlled using the filter
axis and orientation.
This is an example of a cloth filter that uses deform coordinates instead
of forces, but probably it does not make much sense to expose it to the
user in a different way and with different parameters. I'll remove
FilterCache->enabled_force_axis in a later commit and use always
enabled_axis in SCULPT_filter_zero_disabled_axis_components
for both forces and deformation filters, so this function can also be used
in the mesh filter.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8661
|
|
The deformation constraints strength were too strong and they were
preventing the cloth effects of the brushes with cloth deformation target
to create folds properly. This lowers the default, making the simulation
follow the deformation in a more relaxed way.
I'll make a separate patch to expose this as a property for certain brushes
and cloth deformers that may need higher values (like boundary with loop
falloff on a low poly mesh), but I think this default will work better for
most use cases.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8884
|
|
This commit caused regression on some sculpt paint cursors. A better
approach is being worked on.
This reverts commit 6ade522f277fb74d4691973b7bb55840300043a2.
|
|
Unmatched ED_image_undo_push_{begin/end},
add doc-strings noting why this is needed.
Thanks to @Baardaap for the initial fix.
|
|
Brushes that target the cloth simulation but are not the cloth brush
affect the entire mesh, so they don't have simulation areas and falloff.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8885
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8886
|
|
This replace the use of GPU_line_width by the specialized
GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR shader.
|
|
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.
|
|
|
|
|
|
Support toggling without an undo stack in background mode.
|
|
This should improve the issue with Scrape accumulation in concave
surfaces. When the strength of the brush is higher, the area radius is
also bigger, so the scrape plane is more stable preventing it from
accumulating displacement in the same area.
The Scrape/Fill default presets are also updated to include this
functionality.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8821
|
|
When creating the boundaries for the symmetry passess, it could happen
that a symmetrical vertex is not found inside the radius of the brush.
In that case, the function to initialize a new boundary was called with
index -1 (BOUNDARY_VERTEX_NONE), so this function should also check
that the initial vertex that is going to be used to find the boundary is
a valid index.
Reviewed By: sergey
Maniphest Tasks: T79754
Differential Revision: https://developer.blender.org/D8860
|
|
|
|
This makes more sense as this module has more to it than just
GL extensions.
|
|
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 was introduced in the first commit of the cloth brush. In order to
support the cloth brush deformations with subsurf modifiers, the sculpt
API was changed to return the deformed coordinates from the PBVH instead
of the mesh coordinates. When using grab active vertex and rendering the
original mesh wireframe it should render the undeformed mesh coordinates
when available.
Reviewed By: sergey
Maniphest Tasks: T79914
Differential Revision: https://developer.blender.org/D8630
|
|
Now when a mesh is partially hidden using Face Sets, the open boundary
the hidden geometry produces is also detected by the brush.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8819
|