Age | Commit message (Collapse) | Author |
|
By squaring the pen pressure and disabling BRUSH_SPACE_ATTEN the brush
feels like it has a bigger strength range, wich makes it easier to
control when applying less pressure in order to smooth sculpted
surfaces.
Each brush should have a custom input pressure curve by default to get
an optimal behaviour and make all brushes consistent, but that is going
to take some time to get it right.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6214
|
|
Also fix CTX_wm_region_view3d which didn't check the region type.
|
|
Harmless currently since they're the same value,
would fail if other options were added.
|
|
These were the last remaining new sculpt tools that did not support multires.
Performance could be improved still, but it should work.
Fixes T68899
|
|
|
|
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D5998
|
|
|
|
Changes to cursors that can be used for painting and sculpting.
Differential Revision: https://developer.blender.org/D5951
Reviewed by Brecht Van Lommel
|
|
Currently, we use the crosshair cursor in Sculpt mode, but not in the other paint modes.
- Sculpt Mode: This crosshair cursor is too weighty.
- Texture, Weight, Vertex Paint: Using the arrow cursor for painting is not right.
This commit makes the following changes:
- Use the new special paint crosshair instead
- Use this cursor in all paint modes, not just Sculpt
Reviewed by: Brecht
Differential Revision: https://developer.blender.org/D5940
|
|
This commit introduces the following changes:
- Invert the direction of the brush strength WM control. It was working in the opposite direction to any other control in Blender. Now dragging to the right increases the strength.
- Increase the alpha of the cursor
- Remove the font shadow of the numbers in the WM control. It was adding too much visual noise when rendered on top of the brush alpha
- Add a second circle to preview the strength in the cursor
- Increase the resolution of the cursor circles. Now they look smooth even when working with large brush sizes.
- Add a line preview to display the brush curve
- Don't offset the cursor preview when changing size and strength
Reviewed By: billreynish, brecht
Differential Revision: https://developer.blender.org/D5889
|
|
With the previous behavior, it was impossible to manipulate areas with a lot of complex shapes like fingers, as the pose origin was calculated only with the topology inside the radius.
With pose offset, the previous method is used to calculate the direction of the "bone", and an extra offset is added on top of it. This way you can set the pose origin in the correct place in this kind of situations. The pose factor grows to fit the new rotation origin.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5841
|
|
There was a mix of old and new constants. Now have one list of WM_CURSOR_*
cursor types, using GHOST standard cursors when available and otherwise falling
back to our custom cursors.
Ref D5197
|
|
Own mistake in rB078fcc62534c (should only switch to half alpha if we
draw the second pressure circle as well...)
|
|
own error in rB078fcc62534c (doing the overlay only in 3d painting)
|
|
Reviewed By: jbakker
Maniphest Tasks: T70140
Differential Revision: https://developer.blender.org/D5878
|
|
The new paint cursor (introduced in rBe0c792135adf) mixed 3d and 2d
drawing leading to asserts [e.g. when tablet pressure sensitivity was
enabled for size, see D5820 also].
We could get away with always drawing in 3D [using vertformat with
comp_len 3 / GPU_SHADER_3D_UNIFORM_COLOR / imm_draw_circle_wire_3d],
even if in the Image Editor, but this patch clearly separates what is
drawn in 3d and what is in 2d.
part of T69957
Reviewers: jbakker
Differential Revision: https://developer.blender.org/D5836
|
|
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
|
|
Reviewed By: jbakker
Maniphest Tasks: T69984
Differential Revision: https://developer.blender.org/D5823
|
|
The new paint cursor (introduced in rBe0c792135adf) could crash for 2d
painting without an active object.
Note there are still drawing asserts (because we are mixing 2d and 3d
drawing in 'paint_draw_cursor'), but these will be handled in a seperate
commit.
part of T69957
Reviewers: jbakker
Maniphest Tasks: T69957
Differential Revision: https://developer.blender.org/D5820
|
|
This commit makes the pose brush easier to control. It also includes a refactor of the pose brush init code.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5761
|
|
Depth test must default to off for drawing outside the 3D viewport and
overlays like cursors.
|
|
|
|
Also use 'use_' prefix for RNA booleans.
|
|
Grab active vertex snaps the maximum strength of the grab brush to the highlighted active vertex, making it easier to manipulate low poly models or meshes with subdivision surfaces.
Dynamic Mesh Preview generates a list of connected vertices from the active vertex and draws them from the cursor code. This helps to visualize the real geometry the user is manipulating from sculpt mode when there are active modifiers.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5646
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
|
|
|
|
This commit includes the new brush cursor, active vertex updates and the normal radius brush property for all sculpt brushes.
-The new brush cursor previews the real stroke radius over the mesh and the sampled sculpt normal.
-The active vertex is used in sculpt tools and brushes as a starting point for an operation, similar to a preselection. It is also mirrored following the enabled symmetry options to preview the stroke symmetry.
-The normal radius brush property limits the radius that is going to be used to sample the sculpt normal and area center. It controls how closely the cursor follows the surface and it improves the behavior of most brushes, making them suitable for hard surface sculpting.
Reviewed By: campbellbarton, brecht
Differential Revision: https://developer.blender.org/D3594
|
|
|
|
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.
No functional changes expected here.
|
|
This code is not guaranteed to run with any specific space theme, so pass
it explicitly.
|
|
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
|
|
Prevents clang-format wrapping text before comments.
|
|
|
|
|
|
|
|
- Rename ePaint* -> PAINT_MODE_*.
- Use PAINT_OVERLAY_ prefix for eOverlayControlFlags.
|
|
|
|
Matches ePaintTexture2D, less verbose.
|
|
Avoids calling poll on mouse-move for unrelated space/region types.
|
|
|