Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
After switching tools, the active vertex can be the same and the cursor
won't update the previews, so the pose_ik_chain_preview will be null.
This often happens in low poly meshes where chances of hovering the same
vertex are high.
Reviewed By: sergey
Maniphest Tasks: T74426
Differential Revision: https://developer.blender.org/D7021
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6973
|
|
This includes the following changes:
- Use always the angle stored in the StrokeCache when deforming
- Interpolate between the previous and the new sampled angles
- Calculate the cursor matrix only on the 0 radial symmetry iteration
Reviewed By: brecht
Maniphest Tasks: T73947
Differential Revision: https://developer.blender.org/D6901
|
|
This brush has a simple physics solver that helps when sculpting cloth.
- The mass and the damping properties of the simulation are properties of the brush.
- It has two additional radius control to limit the influence and falloff of the simulation.
- Masked vertices are pinned in the simulation, and it applies the sculpt gravity directly in the solver.
- The Cloth Brush has 7 deformation modes with 2 falloff types (radial and plane).
The brush can create the constraints only on the required PBVH nodes, so the simulation is isolated on high poly meshes. As long
as the brush size is not too big it should be possible to keep it real time.
Known issues:
- The way constraints are created is extremely basic and it creates repeated constraints. Maybe there is another way to create fewer constraints while keeping the simulation quality decent. This part can also be multithreaded. (As it is it works ok, but it could be better)
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6715
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6788
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6792
|
|
In some situations the symmetry point may be behind the camera, so the
projection is inverted and it looks wrong. This avoids drawing points in
screen space when they are behind the camera.
Reviewed By: jbakker
Maniphest Tasks: T72690
Differential Revision: https://developer.blender.org/D6487
|
|
PoseIKChain for example reads as if this is related to armature/pose
when it's a sculpting feature.
|
|
This commits introduces the pose_ik_segments brush property in the Pose Brush. When increasing the IK segments count, the brush generates more segments and weights associations following the topology of the mesh. When moving the brush, these segments are transformed using an IK solver and they are used to deform the mesh.
When pressing Ctrl, the brush controls the segments' roll rotation instead of using the IK solver. The brush falloff controls how much rotation is propagated from the first to the last segment in the chain.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6389
|
|
Previously the alpha was hardcoded to 0.7. Now it is possible to control
the cursor alpha by changing the alpha color of the cursor color
property. New alpha default is 0.9. This, with the new saturated colors,
should make the cursor more visible on highdpi screens.
I also removed the cache location preview as it is too visible right now
with the new alpha and color values.
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D6433
|
|
The relation between the pressure/size and the pressure/alpha is a
fundamental property that defines the behavior of a brush, so it does
not make sense to have it unified across all brushes. This applies both
for sculpting and painting.
Some of the new 2.82 brushes need pressure/size or pressure/alpha to be
enabled to work propely, while others don't. Users should not be
switching on and off this property manually when changing brushes if they
want to use unified size. This is also causing that some users are using
the brushes with an incorrect configuration.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6291
|
|
|
|
The Multiplane Scrape brush creates sharp edges with a given fixed angle by trimming the mesh with two planes in local space at the same time. When working with stylized or hard surface models, this brush produces way better results and is more predictable than any other crease/flatten brush based on curves and alphas.
It is also the first brush we have than can produce hard surface concave creases.
The Multiplane Scrape Brush also has a dynamic mode where it samples the surface to fit the angle and scrape planes during a stroke. With this mode enabled you can sculpt multiple times over the same edge without creating artifacts.
It can also create creases that change between concave and convex during the same stroke.
The behavior of this brush will improve after merging patches like D5993 and its behavior in concave creases can still be improved, so I will keep tweaking its parameters and default values once we have all brush properties available.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6174
|
|
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.
|
|
|
|
|
|
|