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-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-07-01Cleanup: spellingCampbell Barton
2020-06-29Remove Threaded Sculpt optionPablo Dobarro
Threaded Sculpt is now always enabled by default. If it causes performance problems compared single threaded sculpt it should be considered a bug. Reviewed By: sergey Maniphest Tasks: T77638 Differential Revision: https://developer.blender.org/D7960
2020-06-23Sculpt Vertex Colors: Initial implementationPablo Dobarro
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time. This commit includes: - SCULPT_UNDO_COLOR for undo support in sculpt mode - SCULPT_UPDATE_COLOR and PBVH flags and rendering - Sculpt Color API functions - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now) - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint) - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint) - Remesher reprojection in the Voxel Remehser - Paint Brush and Smear Brush with color smoothing in alt-smooth mode - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors - Color Filter - Color picker (uses S shortcut, replaces smooth) - Color selector in the top bar Reviewed By: brecht Maniphest Tasks: T72866 Differential Revision: https://developer.blender.org/D5975
2020-06-04Fix error removing the image paint cursorCampbell Barton
Mix up with imapaint.paintcursor & imapaint.paint.paint_cursor Remove imapaint.paintcursor since it wasn't used. Also rename paint_cursor_start_explicit() to paint_cursor_start(), removing the existing paint_cursor_start() since it took the paint struct from the context, a value that's known by all callers.
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-29Cleanup: spelling, correct reference to 'Mesh.mcol'Campbell Barton
2020-05-13Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-13Fix extra undo step when switching object modesCampbell Barton
Changing between modes would always add a user visible undo step that set object mode. Avoid storing this extra undo step on object mode switching.
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-30Task: Use TBB as Task SchedulerBrecht Van Lommel
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor. Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance. * Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend. * AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D7475
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-04-03Cleanup: split ED_mesh_mirror_*_table into multiple functionsCampbell Barton
Spatial & topology mirror table each used a single function taking a char as an identifier. Split these into begin/end/lookup functions.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Weight Paint: Implement a new Lock-Relative mode.Alexander Gavrilov
This check box alters how weights are displayed and painted, similar to Multi Paint, but in a different way. Specifically, weights are presented as if all locked vertex groups were deleted, and the remaining deform groups normalized. The new feature is intended for use when balancing weights within a group of bones while all others are locked. Enabling the option presents weight as if the locked bones didn't exist, and their weight was proportionally redistributed to the editable bones. Conversely, the Multi-Paint feature allows balancing a group of bones as a whole against all unselected bones, while ignoring weight distribution within the selected group. This mode also allows temporarily viewing non-normalized weights as if they were normalized, without actually changing the values. Differential Revision: https://developer.blender.org/D3837
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-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-03-04Cleanup: spellingCampbell Barton
2020-03-04UI: rename View Selected" to "Frame Selected"Asad-ullah Khan
Addresses T74331
2020-03-03Fix T72028: Crash switching to vertex paintPhilipp Oeser
This would happen when done from editmode, on a mesh with any modifier, after adding/removing geometry in editmode. Similar to rBba0870713b9b (which did this for weightpaint and sculpt already), ensure an evaluated depsgraph, otherwise 'runtime.mesh_deform_eval' would not be up to date causing problems later. Maniphest Tasks: T72028 Differential Revision: https://developer.blender.org/D7011
2020-02-28Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. This previously caused a bug in T74283, that should be fixed now. Differential Revision: https://developer.blender.org/D6695
2020-02-28Revert "Objects: make evaluated data runtime storage usable for types other ↵Brecht Van Lommel
than mesh" This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a. Fix T74283: modifier display lost when moving object in edit mode. The cause is not immediately obvious so better to revert and look at this carefully.
2020-02-27Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. Differential Revision: https://developer.blender.org/D6695
2020-01-24Fix T73080: Remove support for scene radius in Weight/Vertex paintPablo Dobarro
The 2D paint cursor in the 3D view does not support scene radius in weight and vertex paint mode. This was also the case in 2.80 with the old cursor. The option to change the units from view to scene is not available in the UI in those modes, so I think it makes sense to remove the support from the code. The ideal solution could be supporting the new cursor in all paint modes, but that is going to take more time and it is going to be problematic in texture paint. After doing this, we can bring this code back and add the option to change the units to the UI. Reviewed By: jbakker Maniphest Tasks: T73080 Differential Revision: https://developer.blender.org/D6586
2019-12-20Fix T72577: vert/weight paint 'Orbit Around' & 'Frame Selected' failPhilipp Oeser
Caused by 14acac0bb7f3
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-01Fix T70725: Frame Symmetry StrokeJeroen Bakker
Frame Selected centers around the last valid stroke. When Symmetry is enabled the last mirrored `location` was added to the `average_stroke_accum` in stead of the original stroke location. This patch will add the `true_location` to the `average_stroke_accum`. This contains the original stroke location. Issue happened in Vertex and Weight paint. Reviewed By: Pablo Dobarro Differential Revision: https://developer.blender.org/D6161
2019-10-10Sculpt: use TBB instead of BLI_task for multithreadingBrecht Van Lommel
This solves performance issues on some computers where there is significant threading overhead. Rather than doing the complicated work of optimizing our own task scheduler, use TBB which appears to work well. The downside is that we have another thread pool, but it is already there when using OpenVDB voxel remesh. For future releases we can switch to using TBB to replace our task scheduler implementation entirely, and use the same thread pool for BLI_task, Cycles, Mantaflow, etc. Differential Revision: https://developer.blender.org/D6030
2019-10-03Cleanup: unused structs, struct membersCampbell Barton
2019-09-29Cleanup: move sculpt parallel range threading test into functionBrecht Van Lommel
Easier to experiment with different settings this way.
2019-09-29Fix wrong sculpt cursor drawing when using "ignore_background_click"Brecht Van Lommel
Not all the necessary state got restored.
2019-09-23Fix T70013: slow OpenGL calls for every vertex and weight painting stepDaniel Grosse
Stroke update use now the location from Strokecache instead of the mouse position. Differential Revision: https://developer.blender.org/D5861
2019-09-21Cleanup: unused headers in editorsCampbell Barton
2019-09-20Fix T67174: Weight paint gradient has empty redo panelmano-wii
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-08-07Fix T68268: Crash switching to Weight Paint modeCampbell Barton
Also applied to sculpt mode
2019-08-02Object Mode: add back non '_ex' versions of mode-switching functionsCampbell Barton
While these aren't currently used, its strange to have extended versions of a function without the non-extended versions it also avoids callers needing to add them back if they need - or duplicating the same boiler plate when calling the '_ex' versions. Reverts 11da3b132aff1, 11da3b132aff1, adds depsgraph argument so the caller is responsible for the evaluation state.
2019-07-31Refactor access to dependency graphSergey Sharybin
This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-31Cleanup: Remove unused functionsSergey Sharybin
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-18Fix weight paint mode setting with multiple armaturesCampbell Barton
Selecting multiple armature objects and entering weight paint mode wasn't working. Entering weight + pose modes at once was only done when object mode locking was enabled. Now it's done even when mode-locking is off - because it's still inconvenient to setup and useful default behavior. Resolves issues raised by T66949
2019-07-16Fix T66742: Frame selected last weightpaint/vertexpaint stroke notPhilipp Oeser
working Mouse values [for 'paint_last_stroke_update()'] gone missing in rB4f616c93f7cb. Thx @campbellbarton for hinting at convention to get mouse from sculpt caches. Reviewers: campbellbarton Maniphest Tasks: T66742 Differential Revision: https://developer.blender.org/D5267
2019-06-24Cleanup: use doxy groupsCampbell Barton
2019-06-02Fix T65185: Cycles viewport render no refreshing overlays properlyBrecht Van Lommel
Don't rely on detecting view matrix changes to refresh depth buffer, instead detect redraw tags coming from progressive render samples.
2019-05-31Fix T62282: multires sculpting does not update smooth normalsBrecht Van Lommel
It may be good to move the normals update out of the drawing code. But it was already there for the non-multires sculpt cases, and does not have an obvious place since we bypass the depsgraph and want to avoid the cost of updating the normals multiple times when multiple events are handled before a redraw.
2019-05-31Fix various missing updates in sculpt mode, when changing modifiers and dyntopoBrecht Van Lommel
This restores the code that updates the sculpt session and PBVH from dependency graph evaluation.
2019-05-31Fix sculpt mode drawing with modifiers still being wrong in some casesBrecht Van Lommel
Centralize logic for when to use the PBVH for drawing, fix missing tests in mask drawing, fix missing tests for multiple windows, only do more expensive update for all viewports at end of the stroke.
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton