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-21Sculpt: Add extra deform types to SlidePablo Dobarro
This adds extra deform modes to the slide mode of the Topology Slide/Relax brush (both slide and smear are almost identical). This is useful to move topology to a specific area to add more localized details Reviewed By: sergey Differential Revision: https://developer.blender.org/D8349
2020-07-21Sculpt: Support pen pressure modulation in Paint Brush propertiesPablo Dobarro
This allows to use pen pressure modulation in hardness, wet mix, wet persistence, flow and density, as well as inverting the modulation (more pressure, less density...). With this, it is possible to create brushes that mix paint or apply a new color based on the pressure. Reviewed By: sergey, campbellbarton Differential Revision: https://developer.blender.org/D8267
2020-07-15Fix T78747: Fix mesh boundary detection and automaskingPablo Dobarro
This issue was produced by a hack in the sculpt mode code from 2.80 when the sculpt API for connectivity info was not available. The smooth brush was the only brush that needed connectivity info, so there were 3 different smooth functions with the connectivity queries implemented for dyntopo, meshes and grids. The mesh version of smoothing was checking the number of connected faces to a vertex to mask the mesh boundaries, which was not covering all cases and was hardcoded in the smooth function itself. This patch removes all those legacy functions and unifies all smooth functions into a single one using the new API and the automasking system. In order to achieve this, there were needed some extra changes: - The smooth brush now does not automasks the boundaries by default, so its default preset needs to be updated to enable automasking - The mesh boundary info is extracted once and cached in a bitmap, similar to the disconnected elements IDs. This makes boundary detection work as expected in all cases, solving a lot of known issues with the smooth brush. In multires, this info is extracted and cached only at the base mesh level, so it is much more memory efficient than the previous automasking system. - In order to keep the brushes responsive as they were before, the automasking system can now skip creating the cache when it is not needed for the requested options. This means that for high poly meshes and simple automasking options the brushes won't lag on start. Reviewed By: sergey Maniphest Tasks: T78747 Differential Revision: https://developer.blender.org/D8260
2020-07-10Cleanup: spellingCampbell Barton
2020-07-10Cleanup: undeclared warningsCampbell Barton
2020-07-09Sculpt: Make Sculpt Vertex Colors features experimentalPablo Dobarro
This disables all Sculpt Vertex Colors tools, operators, panels and rendering capabilities and puts them under the "Use Sculpt Vertex Colors" experimental option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8239
2020-07-09Sculpt: Skip fully hidden nodes in sculpt toolsPablo Dobarro
As tools iterators skip not visible vertices, fully hidden nodes can also be skipped and considered as masked. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8244
2020-07-09Fix T78664: Implement Mesh and Face Set boundary automasking in MultiresPablo Dobarro
This implements the SCULPT_vertex_is_boundary and SCULPT_vertex_has_unique_face_set functions for PBVH_GRIDS, which makes features such as automasking now work in multires. It also fixes some other face sets related features in multires, like face set boundary smoothing. This uses the BKE_subdiv_ccg_coarse_mesh_adjacency_info_get function to get the vertex indicies in the base mesh from multires. This way the API functions can get topology or face set information directly from it. In the future, these vertex indices can be used to get any other information from the base mesh from multires, like seams, sharp edges, disconnected elements IDs... Reviewed By: sergey Maniphest Tasks: T78664 Differential Revision: https://developer.blender.org/D8227
2020-07-09Fix Sculpt Vertex Colors sample color changing brush alphaPablo Dobarro
It is not practical to change the alpha of the paint color with the color picker as with the current brush design alpha is the main strength control for the brush. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8208
2020-07-09Fix crash when using Mask by Color in MultiresPablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8207
2020-07-07Cleanup: spellingCampbell Barton
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-03Cleanup: spellingCampbell Barton
2020-07-02Sculpt: Mask By ColorPablo Dobarro
This tool generates masks based on the sculpt vertex colors by clicking on the model, similar to automatic selection tools in image editing software. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8157
2020-07-02Cleanup: spellingCampbell Barton
2020-07-01Cleanup: Add functions to check the first brush step and symmetry passesPablo Dobarro
This adds three functions to check the state of the stroke in the StrokeCache, removing the references to first_time and mirror_symmetry_pass from the code. This makes easier to understand what each code path is doing inside of each tool. Some tools were using mirror_symmetry_pass incorrectly, so this should also fix unreported bugs with radial and tiling symmetry related to that. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8164
2020-07-01Cleanup: undeclared functions (make static)Campbell Barton
2020-06-30Sculpt: Refactor persistent base to make it usable from other toolsPablo Dobarro
This renames the layer persistent base and adds new API functions to get the mesh state from the base, so it can be used from other tools and replaced in the future with a better system. Reviewed By: sergey Maniphest Tasks: T77738 Differential Revision: https://developer.blender.org/D8003
2020-06-30Fix T78201: Paint color not matching the UI and color pickerPablo Dobarro
The color picker and brush->rgb values are in srgb, but sculpt vertex colors works in linear, so they need to be converted. Reviewed By: sergey Maniphest Tasks: T78201 Differential Revision: https://developer.blender.org/D8111
2020-06-30Sculpt: Pose Brush option to affect loose partsPablo Dobarro
This option allows posing meshes with different disconnected elements using the Pose Brush. This is achieved by doing the following: - Creating an ID per vertex that stores the connected component of that vertex. - By using those IDs, one fake topology connection is created per vertex to the nearest vertex in a different ID. The maximum distance to create that connection is determined by the "Max Element Distance" property. These fake connectivity neighbors are used in the Sculpt API functions iterators, so all the algorithms of the Pose Brush can run without modifications as if everything was part of the same mesh. In order to make this work, the "Connected only" property of the Pose Brush needs to be disabled. This will add an extra performance cost to the Pose Brush and its preview. To achieve optimal results, max element distance should be as low as possible. Reviewed By: sergey, campbellbarton Differential Revision: https://developer.blender.org/D7282
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-29Fix T78323: Enable Unified and Secondary colors for Scultp Vertex ColorsPablo Dobarro
The report does not include any file, but probably that file is using the settings for unified colors, which are currently not available in the UI, so it always paints black. This enables unified colors and secondary colors for sculpt vertex colors, so it should solve that issue. Unified color does not make much sense now as the Paint tool is the only one that has paint capabilities, but it will do in the future when sculpt and paint at the same time is enabled and the paint capability is added to more tools. Reviewed By: sergey Maniphest Tasks: T78323 Differential Revision: https://developer.blender.org/D8136
2020-06-29Fix Smear Tool too weak on high poly meshesPablo Dobarro
The defaults for the Smear tool were making it too weak in high poly meshes, specially the alpha/pressure option enabled by default. Now this option is disabled, it has a linear pressure curve and less spacing. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8134
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-26Fix sample color operator not updating the color in the UIPablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8110
2020-06-25Cleanup: spellingCampbell Barton
2020-06-24Fix artifact in Clay Strips when producing large deformationsPablo Dobarro
The clay strips brush tip tests distances against a cube with beveled Z aligned edges. This cube was positioned with its center in the surface of the mesh, so when producing large deformation, some vertices that should be deformed were positioned further than the cube's Z dimension, so they were left behind, producing artifacts. This displaces and deforms the local space to position the brush tip cube (now a prism) towards the deformation direction, so more vertices can be included, removing most of these artifacts. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8004
2020-06-24Fix T78192: Draw Face Sets tool not updating the viewport colorPablo Dobarro
The draw face set tool always needs to redraw the nodes, but it only needs the full update when in smooth mode because it moves the vertices. Reviewed By: sergey Maniphest Tasks: T78192 Differential Revision: https://developer.blender.org/D8108
2020-06-24Cleanup: unused struct membersCampbell Barton
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-20Fix T77328: Crash on undo Draw Face Sets stroke with dyntopo activePablo Dobarro
Draw Face Sets does not work in Dyntopo and the sculpt API should be responsible for that without needing to add checks all over the code, but it was doing an undo push of type SCULPT_UNDO_FACE_SETS which is not supported, causing the crash. Reviewed By: sergey Maniphest Tasks: T77328 Differential Revision: https://developer.blender.org/D7924
2020-06-09Sculpt: Face Set Edit OperatorPablo Dobarro
This operator performs an edit operation in the active face set defined by the cursor position and updates the visibility. For now, it has a Grow and Shrink operations, similar to Select More/Less in edit mode or to the mask filter Grow/Shrink modes. More operations can be added in the future. In multires, this updates the visibility of an entire face from the base mesh at once, which makes it very convenient to edit the visible area without manipulating the face set directly. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7367
2020-06-08UI: use term 'Merge Distance' instead of 'Merge Limit'Aaron Carlisle
2020-06-04Disable gravity in Draw Face Sets brushPablo Dobarro
Applying gravity to this brush does not make much sense and undo/redo won't work correctly as it uses a different undo type. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7925
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-06-02Fix T76776: Implement vertex_visibility_get for PBVH_GRIDSPablo Dobarro
This was missing from when Face Sets were enabled in Multires, so it was always considering that all vertices in the grids are visible. This should also fix other unreported bugs. Reviewed By: sergey Maniphest Tasks: T76776 Differential Revision: https://developer.blender.org/D7809
2020-06-01Sculpt: Cloth FilterPablo Dobarro
This tool is similar to the cloth brush, but it applies the cloth simulation deformation to the whole mesh in an uniform way. The simulation can be controlled using the mask to pin vertices and the face sets to define force action areas. It uses the same solver as the cloth brush which now no longer depends on StrokeCache. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7857
2020-05-27Cleanup: Use bitmaps insteand of bool and char arraysPablo Dobarro
This was propsed in D7059, so I applied it to the rest of the code Reviewed By: campbellbarton, sergey Differential Revision: https://developer.blender.org/D7480
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-26Fix PBVH API returning wrong normal when using shape keys and modifiersPablo Dobarro
The implementation of this function should match the one in SCULPT_vertex_co_get. This does not solve the issue when sculpting with modifiers active but I think this code is wrong Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D7805
2020-05-20Merge branch 'blender-v2.83-release'Campbell Barton
2020-05-20Correct invalid limits in last commitCampbell Barton
2020-05-20Merge branch 'blender-v2.83-release'Pablo Dobarro
2020-05-20Fix T75977: Lower the merge limit in the bisect/mirror operation in symmetrizePablo Dobarro
This operation is using the code of the mirror modifier, so no default is guaranteed to work in all cases. This value matches the defaults of the mirror modifier. Reviewed By: jbakker Maniphest Tasks: T75977 Differential Revision: https://developer.blender.org/D7495
2020-05-09Cleanup: spellingCampbell Barton
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-05-05Merge branch 'blender-v2.83-release'Pablo Dobarro