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-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-15Fix brush tip delta orientation with anchored strokesPablo Dobarro
When using anchored stroke, the stroke operator was modifying the coordinates on the "mouse" rna property by setting them to the original position. Because of this, all the sculpt delta calculation was failing and the delta for these brushes was set randomly (with a 0 vector) at the beginning of the stroke. There is now an extra property that uses the unmodified coordinates of the mouse to calculate the delta. Now delta orientation works as expected in all brushes and features that require brush tip orientation. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9183
2020-10-15Sculpt: Experimental Pen Tilt SupportPablo Dobarro
This adds support for pen tilt in sculpt mode. For now, pen tilt is used by tweaking the tilt strength property, which controls how much the pen angle affects the sculpt normal. This is available in Draw, Draw Sharp, Flatten, Fill, Scrape and Clay Strips brushes, but it can be enabled in more tools later. The purpose of this patch is to have a usable implementation of pen tilt in a painting mode, so users can test and see in which hardware and platforms this feature is supported and how well it works. If it works ok, more tools and features that rely on pen tilt can be implemented, like brushes that blend between two deformations depending on the angle. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8893
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-10-01Paint: Ignore inbetween events for anchored strokesPablo Dobarro
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
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-08-20Fix variable simulation steps with cloth deform brushesPablo Dobarro
Cloth deform brushes (both in cloth brush or other tools with cloth simulation targets) should not have their spacing as a value relative the brush radius to avoid affecting the simulation speed when changing the brush radius. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8620
2020-08-18GPUState: GPU_blend final API renamingClément Foucault
We now use GPU_blend for enabling / disabling blending and explicitly set the blend equation.
2020-08-18Fix Cloth Brush Grab deform types not working with spacingPablo Dobarro
Even the Cloth Brush grab works like a regular grab brush, it makes sense to support spacing just in this brush in order to prevent creating more brush steps that update the simulation. This way, it is possible to create grab brushes that update the simulation constantly while grabbing (using the dots stroke mode) or brushes that only update the simulation when the cursor moves (using spacing). Reviewed By: sergey Differential Revision: https://developer.blender.org/D8568
2020-08-10Sculpt: Boundary BrushPablo Dobarro
This brush includes a set of deformation modes designed to deform and control the shape of the mesh boundaries, which are really hard to do with regular sculpt brushes (and even in edit mode). This is useful for creating cloth assets and hard surface base meshes. The brush detects the mesh boundary closest to the active vertex and propagates the deformation using the brush falloff into the mesh. It includes bend, expand, inflate, grab and twist deform modes. The main use cases of this brush are the Bend and Expand deformation modes, which depend on a grid topology to create the best results. In order to do further adjustments and tweaks to the result of these deformation modes, the brush also includes the Inflate, Grab and Twist deformation modes, which do not depend that much on the topology. Grab and Inflate are the same operation that is implemented in the Grab and Inflate tools, they are also available in the boundary brush as producing deformations with regular brushes in these areas is very hard to control. Even if this brush can produce deformations in triangle meshes and meshes with a non-regular quad grid, the more regular and clean the topology is, the better. Most of the assets this brush is intended to deform are always created from a cylindrical or plane quad grid, so it should be fine. Also, its algorithms can be improved in future versions to handle more corner cases and topology patterns. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8356
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-07-03Cleanup: Editors/Sculpt/Paint, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/sculpt_paint` module. No functional changes.
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-04Cleanup: remove window manager argument for paint cursor APICampbell Barton
This caused an additional argument when exiting object modes and many other low level functions which don't need to access context. This simplifies fixing T77073.
2020-05-26Merge branch 'blender-v2.83-release'Pablo Dobarro
2020-05-26Fix Cloth Brush grab deformation modePablo Dobarro
The grab mode was not correctly implemented, so the way it was working was confusing for users. - Grab delta was calculated in increments from the last stroke position, so it did not match the behavior of a grab brush. I refactored the grab delta calculation to make this change more explicit. - Grab displacement was not calculated from the original coordinates - Grab was using an incorrect strength Grab is now setting the position of the affected vertices directly and the constraints solve the rest of the cloth. I also tried to implement an alternative version based on applying forces to move the vertices to the grab position, but I think this is more controllable and the grab falloff can be adjusted by tweaking the simulation falloff. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7756
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-04-14Fix Shift-Smooth mode using wrong parametersPablo Dobarro
When using the shift-smooth mode, sculpt_update_cache_invariants is changing the brush datablock of the paint session if it finds a brush named "Smooth" (which is a huge hack the brush management project should try to solve). This is done after the PaintStroke data in the modal operator is created, which holds a reference to the active brush in the paint session that was active when the operator started. Because of this, the StrokeCache was getting the correct smooth brush values but the paint modal operator was applying the wrong ones from the previous brush. This was causing the smooth brush behaves unpredictably depending on the current active brush. This patch updates the brush in PaintStroke on each modal callback, so it always gets the values from the current active brush in the Paint Session. The way brush switching works and a way to make it more flexible needs to be discussed in the future as part of the brush management project. The default smooth brush parameters and curves will probably need to be updated after this change, as previously they were set using an incorrect behavior. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7354
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432. Now the area and region naming conventions should be less confusing. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-03-27Cleanup: rename WM_modalkeymap API names, matching WM_keymapCampbell Barton
Rename: - WM_modalkeymap_add to WM_modalkeymap_ensure - WM_modalkeymap_get to WM_modalkeymap_find
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
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: Use the SCULPT_ prefix in all sculpt_intern functionsPablo Dobarro
2020-03-01Fix T74074: Strokes with timer events don't get pressure valuesPablo Dobarro
When processing a timer event WM_event_tablet_data returns 0 instead of the last valid pressure value from the tablet. This always stores the last pressure value and uses it in case a timer event is being processed. Reviewed By: brecht Maniphest Tasks: T74074 Differential Revision: https://developer.blender.org/D6950
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
2019-12-09Fix T72092: Clay Strips Brush stroke crash with Brush Detail SizePablo Dobarro
Some other areas in the brush code outside sculpt mode assume that pressure is multiplied directly on top of the initial size. This patch calculates the pixel radius correctly using the brush size from sculpt mode to get the dyntopo detail size. When the new brush input system is in place, all these values will come directly from the brush input code with all the custom curves applied per brush, so all paint modes will have a correct brush behavior and all this sculpt mode specific code won't be necessary. Reviewed By: jbakker Maniphest Tasks: T72092 Differential Revision: https://developer.blender.org/D6339
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-21Sculpt/Paint: Dash Ratio and Dash SamplesPablo Dobarro
Dash Ratio and Dash Samples are brush properties to modify the strength of the brush during a stroke. This is useful to create dashed lines in texture paint or stitches in sculpt mode. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5949
2019-10-07Paint: 2D paint brush stroke antialiasingPablo Dobarro
This commit enables antialiasing in 2D painting. It also includes some fixes related to line drawing in the stroke spacing code. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5833
2019-10-03Fix T69227: Ignore inbetween mouse events in Snake HookPablo Dobarro
Reviewed By: brecht Maniphest Tasks: T69227 Differential Revision: https://developer.blender.org/D5977
2019-10-02Fix T70443: Crash on sculpting with 'Curve' Stroke MethodPhilipp Oeser
Caused by rBc31a849a1474. Reviewed By: brecht Maniphest Tasks: T70443 Differential Revision: https://developer.blender.org/D5970
2019-09-29Sculpt: disable workbench anti-aliasing during stroke paintingBrecht Van Lommel
This mostly happens automatically anyway since there is usually not enough time left over for it. But when it does it happen it breaks partial redraw, and may also have a negative impact on responsiveness. Ref T70295
2019-09-29Fix wrong sculpt cursor drawing when using "ignore_background_click"Brecht Van Lommel
Not all the necessary state got restored.
2019-09-24Fix T69875: Sculpt Scene Spacing breaks with Adjust Strength for Spacing enabledPablo Dobarro
Reviewed By: jbakker Maniphest Tasks: T69875 Differential Revision: https://developer.blender.org/D5849
2019-09-21Cleanup: unused headers in editorsCampbell Barton
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-17Fix enabled dynamic size in pose brushPablo Dobarro
Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5816
2019-09-13Cleanup: compiler warningsBrecht Van Lommel
2019-09-09Sculpt: Pose BrushPablo Dobarro
This brush lets the user pose a model simulating an armature-like deformation. The pivot point for rotation is calculated automatically based on the radius of the brush and the topology of the model. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5647
2019-09-09Sculpt: Elastic Deform BrushPablo Dobarro
This patch implements the paper "Regularized Kelvinlets: Sculpting Brushes based on Fundamental Solutions of Elasticity" https://graphics.pixar.com/library/Kelvinlets/paper.pdf It includes grab, biscale grab, triscale grab, scale and twist. All deformation modes are accessible under the same tool. This helps to keep the code organized and it should not make any difference to the user when a better brush management system is implemented. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5634
2019-09-06Fix T69548: Sculpt scene spacing breaks when object pivot not at originPablo Dobarro
Reviewed By: brecht Differential Revision: https://developer.blender.org/D5699
2019-08-27Sculpt/Paint: Brush world spacing option for sculpt modePablo Dobarro
New brush option to calculate the distance to generate a new brush step using the cursor position over the mesh instead of the screen coordinates. This avoids artifacts when sculpting across curved surfaces. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5432
2019-08-12Sculpt/Paint: Ignore INBETWEEN_MOUSEMOVE events on certain brush toolsPablo Dobarro
Some brush tools were being executed too often when using devices with high polling rates, causing performance issues. This should improve the performance of brushes that don't need those updates. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5429
2019-08-06Cleanup: use BKE_ prefix for BKE_colortools.hCampbell Barton
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz