Age | Commit message (Collapse) | Author |
|
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10707
|
|
This operator initializes mask values for the entire mesh. It supports
different modes for initializing those values, and more will be added in
the future.
The initial version supports generating a random mask per vertex, Face
Sets or loose parts. These masks are useful for introducing variations
in the model using the filters (both shapes and colors).
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10679
|
|
Sculpt undo relied on having a mode-changing undo step to properly
apply changes.
However this isn't the case with startup files or when mixing
global undo steps with sculpt (see T82851, also fixed).
Undo stepping logic follows image_undosys_step_decode_undo.
|
|
Also correct typo.
|
|
|
|
A missing continue in this loop.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10610
|
|
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
|
|
Prior to rB99a7c917eab7, Shift + D was used to set detail size for both
constant and relative detail (using radial control). The commit added an
improved operator for doing this for constant detail (showing the
triangle grid representation), but left the user without a shortcut to
do this for relative detail.
Interestingly rB99a7c917eab7 only changed this for the Blender keymap,
the Industy Compatible keymap still has the "old" entry.
This patch changes both keymaps to have both entries.
For user experience, the real change here is to have both available on
one 'primary' shortcut (Shift+D), the improved
'dyntopo_detail_size_edit' operator will now act on all possible cases.
If it deals with constant detail, it acts as before, if it deals with
relative detail etc, it will fallback to the "old" way of doing it via
radial control instead. I assume this adresses what was stated in
rB99a7c917eab7: "Deciding if both detail sizes can be unified needs a
separate discussion"
Also, move dyntopo_detail_size_edit to sculpt_detail.c
Fixes T83828
Maniphest Tasks: T83828
Differential Revision: https://developer.blender.org/D9871
|
|
The commit rB6f63417b500d that made exact boolean work on meshes
with holes (like Suzanne) unfortunately dramatically slowed things
down on other non-manifold meshes that don't have holes and didn't
need the per-triangle insideness test.
This adds a hole_tolerant parameter, false by default, that the user
can enable to get good results on non-manifold meshes with holes.
Using false for this parameter speeds up the time from 90 seconds
to 10 seconds on an example with 1.2M triangles.
|
|
Can use const parameter.
|
|
Warning: else-after-return/break
|
|
Also use doxygen comments for sculpt functions.
|
|
Expand is a new operator for Sculpt Mode which is intended to be the main
tool for masking, Face Set editing, interacting with the filters and pattern
creation.
The fundamentals of the tool are similar to the previous sculpt.mask_expand
operator. It shares the same default shortcuts and functionality, making
the previous operator obsolete.
The shortcuts to execute the operator are:
- Shift + A: Expand mask
- Shift + Alt + A: Expand mask by normals
- Shift + W: Expand Face Set
- Shift + Alt + W: Resize current Face Set
The main changes compared to the previous sculpt.mask_expand operator are:
- Modal keymap, all operator options can be changed in real time while the
operator is running.
- Supports creating Mask, Face Sets and Sculpt Vertex Colors.
- Much better code, new features can be easily integrated.
Limitations:
- All Mask operations are supported for Sculpt Vertex colors, but not exposed
by default as their support is still experimental.
- Dyntopo does not support any Face Set or Sculpt Vertex Colors. functionality
(they are not implemented in general for Dyntopo).
- Multires does not support any feature related to geodesic distances.
- Multires does not support vertex colors.
- Multires does not support recursions.
- In Multires, Face Sets snaping does not initialize all current enabled Face
Sets when toggling snapping.
- In Multires, Face Sets are created at base mesh level (works by this by
design, like any other tool).
- Unlike the previous mask_expand operator, this one does not blur the mask
by default after finishing Expand as that does not fit the new design.
The mask can still be blurred by using the mask filter manually.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10455
|
|
Tools can cache data related to the mesh topology for later use. This
data is indexed by vertex index, so it will be invalid after dyntopo
changes the topology during the stroke.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10550
|
|
|
|
|
|
|
|
Corrects approximately 36 spelling errors in source variable names.
Differential Revision: https://developer.blender.org/D10347
Reviewed by Hans Goudey
|
|
Auto-normalize when the option is enabled.
Ref D10239 by @PratikPB2123 with minor edits.
|
|
|
|
|
|
|
|
This just avoids the crash, the annotation tool still doesn't work.
Larger changes will be needed to resolve this, see T85532.
|
|
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
|
|
|
|
Caused by rB5b34d11b55e0.
Above commit restored the view matrices in ED_view3d_draw_offscreen
_before_ they can be stored in the ImBuff (see ED_view3d_draw_offscreen
/ texture_paint_image_from_view_exec).
Now make restoring the view matrices optional and dont do this in case
of reprojection, so the used matrices can still be saved in the ImBuff
later.
Reviewed By: campbellbarton
Maniphest Tasks: T85395
Differential Revision: https://developer.blender.org/D10331
|
|
|
|
This fixes two issues that were preveting normal orientation for working:
- The translation of component of the object matrix should not be
considered when converting a normal to world space.
- Whe using cursor for depth, the depth for the shape should be taken
directly from the cursor (which is already unprojected and updated)
instead of from the brush, which may have not been updated.
Reviewed By: dbystedt, JacquesLucke
Differential Revision: https://developer.blender.org/D10231
|
|
The thumb brush was updating the area normal per brush sample, which was
making unstable sampled normals for setting the displacement direction
when the vertices are moved too much from their original positions.
Now it always uses the original normal except when using anchored
strokes. In those cases, the normal always needs to be updated.
Reviewed By: JacquesLucke
Maniphest Tasks: T85079
Differential Revision: https://developer.blender.org/D10214
|
|
Remove redundant headers using
`./source/tools/utils_maintenance/code_clean.py`
Reviewed By: jmonteath
Ref D10364
|
|
|
|
|
|
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values
everywhere.
Note that this also introduce the `STEP_INVALID` value in that enum.
Finally, kept the matching struct members in some lower-level readfile
code as an `int` to avoid having to include `BKE_undo_system.h` in a lot
of unrelated files.
|
|
|
|
Dyntopo does not have Face Sets implemented yet, so the entire mesh is
considered a single Face Set. In that case, the check unique face set
function should always return true.
Reviewed By: JacquesLucke
Maniphest Tasks: T85230
Differential Revision: https://developer.blender.org/D10259
|
|
A missing flush of the deformed PBVH coordinates to the shape key.
Reviewed By: JacquesLucke
Maniphest Tasks: T84370
Differential Revision: https://developer.blender.org/D10174
|
|
The edge preview data of the boundary needs to be freed with the
boundary data created for the brush. Also, all data for the
ScultpSession preview that is used to render the cursor needs to be
freed with the ##SculptSession##.
Found by Jacques Lucke
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10173
|
|
|
|
Displacement Smear brush.
Reviewed By: pablodp606
Maniphest Tasks: T84031
Differential Revision: https://developer.blender.org/D9956
|
|
|
|
Was happening when there are deform modifiers prior to the multires.
There are detail in the comment around sculpt_undo_refine_subdiv(),
but briefly: the subdiv was refined with wrong base mesh coordinates.
Differential Revision: https://developer.blender.org/D10158
|
|
|
|
This uses the values form the stroke automasking cache to control the
falloff of all deformers in the boundary brush. Usually this is already
considered in the general brush falloff function for the rest of the
brushes, but this is one of the exceptions where the brush implements
its custom falloff.
Reviewed By: JacquesLucke
Maniphest Tasks: T84896
Differential Revision: https://developer.blender.org/D10161
|
|
Comment blocks not conforming to convention.
|
|
No idea why we did not pass context to `ED_paintcurve_undo_push_end`, it
is easily availbale everywhere...
|
|
When painting using Auto-Normalize or Lock Relative with some
groups locked, the locked weights may not add up precisely to
1 because of precision limitations, which results in creating
nonzero weights close to FLT_EPSILON. With Lock Relative display
mode this is very obvious and annoying (random red points amid
black or blue), so add an epsilon check to consider less than
1e-6 unlocked weight to be the same as 0.
In addition, in cases when no weight can be painted due to locks,
don't create vertex group entries at all if they don't exist yet.
Also, don't run Auto Normalize when not painting a deform group.
Differential Revision: https://developer.blender.org/D10000
|
|
Non-projection painting in the viewport is no longer supported,
remove struct members used for this.
|
|
|
|
Selecting UVs wasn't properly scaling based on the zoom or image aspect.
This now matches vertex selection in the 3D view.
|
|
We will soon need more options here, sinmpler and cleaner to use a
bitflag then.
|