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-03Fix Pose Brush crashing after disabling connected only in FK modePablo Dobarro
This function was returning the ik_chain before disabling the fake_neighbors, so when the brush was used again with fake neighbors disabled after rebuilding the PBVH and free them, they were still enabled in the SculptSession, causing a the crash. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8195
2020-07-03Clang-Tidy: Enable readability-redundant-control-flowHans Goudey
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: spellingCampbell Barton
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: Color filter fill modePablo Dobarro
This implements a fill mode in the Color Filter tool, which fills the entire mesh with a specific color. As this functionality is part of the color filter, this allows to control the blending of the fill color with the filter strength. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8158
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-30Cleanup: unused argumentsCampbell 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-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-27Palettes: Remove threshold parameter when extract from imagesAntonio Vazquez
Using a number greater than 1 produce a huge number of entries in the palette because any small variation in the color create a new entry. Remove the threshold reduce the precision of the color extracted, but always is better than having a palette with thounsands of colors. Related to T78317 Still pending the memory crash when it's impossible to allocate memory for the palette in the popover, but with this change I don't think we get this error again.
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-26Fix Color Filter not updating during modal operatorPablo Dobarro
The code for tagging the updates was wrong Reviewed By: sergey Differential Revision: https://developer.blender.org/D8109
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 Surface Smooth not taking the sculpt mask into accountPablo Dobarro
The sculpt mask was hardcoded to 0.0 Reviewed By: sergey Differential Revision: https://developer.blender.org/D8071
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: Replace GSet with Edgeset in Cloth BrushPablo Dobarro
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-22Fix T78136: Image editor - crash to desktop with changing the threshold for ↵Antonio Vazquez
extract palette Also fixed the same error in generate GPencil object from image. The problem was the Render Result image hasn't ibuf.
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-18Cleanup: redundant parenthesisCampbell Barton
2020-06-16Cleanup: unused headers, spellingCampbell Barton
2020-06-13Sculpt: Fix creation of repeated constraints in the Cloth BrushPablo Dobarro
Previously, constraints were added multiple times from different vertices. This adds a GSet to check that the same constraint is not being added twice when iterating over the neighbors of two different vertices. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D8007
2020-06-10Fix T77047: Dyntopo Sample detail size on hidden mesh causes crashPhilipp Oeser
The `Toolbar` and `Sidebar` hide the corresponding panel `VIEW3D_PT_sculpt_dyntopo` by polling for context.sculpt_object and context.tool_settings.sculpt. In the Active Tool in the Properties Editor this poll does not return False though, thus the sample_detail_size is possible from there. Second security check (the operator poll `SCULPT_mode_poll`) checks the active object -- that is still valid even if hidden, so we are allowed to execute the operator. However the active object becomes NULL once the area is switched in `sample_detail()` -- see `CTX_wm_area_set`), leading to the crash. Dont think there is a quick and easy way to do this in the poll from the Properties Editor, so just check for a valid active abject in the operator and return OPERATOR_CANCELLED if we dont have it. Maniphest Tasks: T77047 Differential Revision: https://developer.blender.org/D7832
2020-06-10Cleanup: improve custom data type namesJacques Lucke
This is related to T76659. This just renames data type names to `CD_PROP_STRING`, `CD_PROP_FLOAT` and `CD_PROP_INT32`. It makes them a bit more specific and removes unnecessary abbreviations. Reviewers: brecht Differential Revision: https://developer.blender.org/D7980
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-09Sculpt: Pose Squash and Stretch deform modePablo Dobarro
This implements squash and stretch as a deform mode for the Pose Brush. It is similar to scale, but it applies different scale values in different axis. To achieve this, the pivot local space of the transform needs to be aligned to the segment when using this deform mode to apply the scale in the correct direction. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7934
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 Sharpen mesh filter in MultiresPablo Dobarro
Instead of accumulating displacement for each vertex into the neighbors, accumulate the opposite displacement from each neighbor into the vertex. I think this is the same and it does not produce artifacts in Multires. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D7508
2020-06-04Cleanup: split particle & texture paint mode switching into utility functionsCampbell Barton
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-02Sculpt: Improve twist axis in Pose FK modePablo Dobarro
Previously, the twist rotation was aligned using the stroke location. This was causing unexpected results when rotating some Face Sets rigs. Now the intersection with the first Face Set in the flood fill is used, which produces much better results. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7900
2020-06-02Cleanup: Remove unused grab delta in Pose BrushPablo Dobarro
The grab delta is not used in do_pose_brush_task_cb_ex, so there is no reason to add it to SculptThreadedTaskData Reviewed By: sergey Differential Revision: https://developer.blender.org/D7901
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-06-01Sculpt: Pose Brush Face Sets FK modePablo Dobarro
This Pose Brush origin mode simulates an FK deformation in the entire model when clicking on the face sets, as they were controls of a fully rigged character. Combined with the previous Face Sets modes that allow creating IK chains, the pose brush should now be able to simulate most of the common rigs deformations. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7839
2020-06-01Fix mesh filter using the wrong face set as activePablo Dobarro
This was returning the wrong face set in cases where the active vertex has more than one available face set. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7858
2020-05-29Cleanup: spelling, correct reference to 'Mesh.mcol'Campbell Barton