Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
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.
2020-03-06Cleanup: Move Multiplane Scrape brush to its own filePablo Dobarro
2020-03-06Cleanup: Use the SCULPT_ prefix in all sculpt_intern functionsPablo Dobarro
2020-03-04Fix T74426: Crash in the IK Pose Brush preview with null preview chainPablo Dobarro
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
2020-03-01Cleanup: Move pose brush to its own filePablo Dobarro
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6973
2020-03-01Fix T73947: Support radial symmetry in Multiplane ScrapePablo Dobarro
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
2020-02-28Sculpt: Cloth brushPablo Dobarro
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
2020-02-11Cleanup: Sculpt/Paint, use correct types and iterator variable declarationPablo Dobarro
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6788
2020-02-11Cleanup: Sculpt, Comment formattingPablo Dobarro
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6792
2020-02-10Fix T72690: Do not draw points behind the viewport camera in the paint cursorPablo Dobarro
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
2020-01-08Cleanup: use paint/sculpt prefix in BKE_paint.hCampbell Barton
PoseIKChain for example reads as if this is related to armature/pose when it's a sculpting feature.
2020-01-07Sculpt: Pose Brush with Inverse KinematicsPablo Dobarro
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
2019-12-30Sculpt: Add color alpha controls to the brush cursorPablo Dobarro
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
2019-11-27Sculpt/Paint: Remove Unified SIZE_PRESSURE and ALPHA_PRESSUREPablo Dobarro
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
2019-11-22Cleanup: warnings, set but unused varsCampbell Barton
2019-11-21Sculpt: Multiplane Scrape BrushPablo Dobarro
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
2019-11-21Clay Strips: Input pressure curve and new defaultsPablo Dobarro
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
2019-10-24Fix crash drawing the paint cursor over the redo regionCampbell Barton
Also fix CTX_wm_region_view3d which didn't check the region type.
2019-10-15Fix incorrect brush falloff flag useCampbell Barton
Harmless currently since they're the same value, would fail if other options were added.
2019-10-08Sculpt: support automasking, pose and mask expand for multiresBrecht Van Lommel
These were the last remaining new sculpt tools that did not support multires. Performance could be improved still, but it should work. Fixes T68899
2019-10-07Cleanup: rename some sculpt variables for clarityBrecht Van Lommel
2019-10-07Sculpt/Paint: Invert curve alpha overlayPablo Dobarro
Reviewed By: billreynish Differential Revision: https://developer.blender.org/D5998
2019-10-01Sculpt: enable 3D paint cursor for multiresBrecht Van Lommel
2019-10-01UI: Changes to Paint CursorsHarley Acheson
Changes to cursors that can be used for painting and sculpting. Differential Revision: https://developer.blender.org/D5951 Reviewed by Brecht Van Lommel
2019-09-30UI: Use paint crosshair cursor in all paint & sculpt modesWilliam Reynish
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
2019-09-27Sculpt: Sculpt cursor UX improvementsPablo Dobarro
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
2019-09-27Sculpt: Pose brush origin offsetPablo Dobarro
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
2019-09-26WM: clean up cursors constants and codeBrecht Van Lommel
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
2019-09-26Fix (unreported) (2d) paint cursor always drawing in half alphaPhilipp Oeser
Own mistake in rB078fcc62534c (should only switch to half alpha if we draw the second pressure circle as well...)
2019-09-26Fix T70260: Stencil Paint Overlay BrokenPhilipp Oeser
own error in rB078fcc62534c (doing the overlay only in 3d painting)
2019-09-24Fix T70140: Topology Automasking and 2D Falloff don't work correctly togetherPablo Dobarro
Reviewed By: jbakker Maniphest Tasks: T70140 Differential Revision: https://developer.blender.org/D5878
2019-09-20Fix paint cursor drawing assertsPhilipp Oeser
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
2019-09-18Fix excessive dependency graph evaluation while painting strokesBrecht Van Lommel
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
2019-09-18Fix T69984: Cursor curve Alpha doesn't display curves other than CustomPablo Dobarro
Reviewed By: jbakker Maniphest Tasks: T69984 Differential Revision: https://developer.blender.org/D5823
2019-09-17Fix paint cursor crashPhilipp Oeser
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
2019-09-17Sculpt: Add pose origin preview to the Pose BrushPablo Dobarro
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
2019-09-17Fix part of T69728: drawing glitches with sculpt dynamic mesh previewBrecht Van Lommel
Depth test must default to off for drawing outside the 3D viewport and overlays like cursors.
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-10Cleanup: no need to add Brush.flag2Campbell Barton
Also use 'use_' prefix for RNA booleans.
2019-09-10Sculpt: Grab Active Vertex and Dynamic Mesh PreviewPablo Dobarro
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
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-09-07Cleanup: style, spellingCampbell Barton
2019-08-30Fix possible crash with new sculpting cursor, due to stack overflowBrecht Van Lommel
2019-08-30Sculpt: New brush cursor, active vertex and normal radiusPablo Dobarro
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
2019-08-06Cleanup: use BKE_ prefix for BKE_colortools.hCampbell Barton
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
2019-07-16Fix paint curve not drawing selection colors properlyBrecht Van Lommel
This code is not guaranteed to run with any specific space theme, so pass it explicitly.
2019-04-29Cleanup: spellingCampbell Barton
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton