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-08-07Cleanup: Blenkernel, 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/blenkernel` module. No functional changes.
2020-08-06Sculpt: Cloth Brush/Filter CollisionsPablo Dobarro
This implements collisions in the solver of the cloth brush/filter. It uses the scene colliders as a regular physics simulation. There are still some parameters (friction, distance to the surface...) that can be exposed as properties in later patches. Thanks to Sebastian Parborg for helping me with the implementation. Reviewed By: sergey, zeddb Differential Revision: https://developer.blender.org/D8019
2020-08-05Merge branch 'blender-v2.90-release'Pablo Dobarro
2020-08-05Fix T78665: Face Set visibility reverted when chaning Multires LevelsPablo Dobarro
Face Sets where only set and updated on the PBVH after starting a sculpt tool. In order to preserve the visibility they store when changing levels, they need to be updated and sync also on PBVH creation Reviewed By: sergey Maniphest Tasks: T78665 Differential Revision: https://developer.blender.org/D8225
2020-07-28Cleanup: remove redundant return statementJacques Lucke
This was found by clang-tidy.
2020-07-27Fix T79074: Mesh Topology info not being updated after changesPablo Dobarro
All these data arrays are created for a specific topology, so they should be freed and updated when the PBVH rebuilds. Previously, this was only happening when freeing the SculptSession, but it also needs to happen in BKE_sculpt_update_object_before_eval to avoid reusing out of date data. Reviewed By: sergey Maniphest Tasks: T79074 Differential Revision: https://developer.blender.org/D8357
2020-07-27Fix T78242: Crash when using a Sculpt color tools that needs connectivity ↵Pablo Dobarro
for the first time When there is no color layer available, BKE_sculpt_update_object_for_edit creates a new one and tags the mesh with ID_RECLAC_GEOMETRY, so this layer is inmediatly available when the tool starts. This also deletes the PBVH and when it is created again in BKE_sculpt_update_object_after_eval, the pmap is not initialized, making the tool crash. This moves the color layer creation to a separate function outside BKE_sculpt_update_object_for_edit, which now runs after the color layer is available, so it won't need to update again and the pmap will still be available when the tool is used. Reviewed By: sergey Maniphest Tasks: T78242 Differential Revision: https://developer.blender.org/D8135
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-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-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-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-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-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-05-21Refactor: Move NOP idtypes foreach_id to new IDTypeInfo structure.Bastien Montagne
2020-05-19Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-19Fix T76865: Vertex paint draws hidden but cannot be painted ontoCampbell Barton
2020-05-19Merge remote-tracking branch 'origin/blender-v2.83-release'Ray Molenkamp
2020-05-18Fix NULL pointer access reported by ASAN (harmless in practice but still weak)Brecht Van Lommel
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-30Multires: Enable sculpting in all subdivision levelsPablo Dobarro
Return the correct sculpt level in BKE_multires_sculpt_level_get and enable the property in the UI Reviewed By: sergey Differential Revision: https://developer.blender.org/D7575
2020-04-20Fix T75329: Missing show_face_sets checks for MultiresPablo Dobarro
These values were hardcoded before Face Sets were enabled for Multires, so enable the show_face_sets checks now. Reviewed By: jbakker Maniphest Tasks: T75329 Differential Revision: https://developer.blender.org/D7444
2020-04-20Fix crash on Multires Face Set visibility syncPablo Dobarro
Multires uses the data of the Face Sets stored in the base mesh to manage the grid's visibility, so these pointers can no longer be set to NULL when editing Multires objects as they are requried for some operations. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7431
2020-04-14Sculpt: New Layer BrushPablo Dobarro
The Layer brush was in Blender before 2.81, when the sculpt API was introduced. It had a huge amount of bugs and glitches which made it almost unusable for anything but the most trivial cases. Also, it needed some hacks in the code just to support the persistent base. The brush was completely rewritten using the Sculpt API. It fulfills the same use case as the old one, but it has: - All previous artifacts fixed - Simpler code - Persistent base now works with multires thanks to the sculpt API - Small cursor widget to preview the layer height - More controllable and smoother strength and deformation - More correct masking support - More predictable invert support. When using persistent base, the brush invert mode resets to layer height 0, instead of jumping from +1 to -1. The brush can still be inverted in the brush direction property. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7147
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData API" section. The code in that section has now been split off, and placed into `BKE_anim_data.h` and `anim_data.c`. All files that used to include `BKE_animsys.h` have been adjusted to only include the animation headers they need (sometimes none). No functional changes.
2020-04-02Sculpt: Store explicit value for multires sculpt levelSergey Sharybin
Allows to know what level sculpting has been done after the value has been changed in the MultiresModifierData. No functional changes, just preparing code to have everything needed for propagation undo. Differential Revision: https://developer.blender.org/D7307
2020-04-01Multires: Initial Face Sets supportPablo Dobarro
This implements the Sculpt Mode API functions needed for Face Sets and visibility management for PBVH_GRIDS. No major changes were needed in the operators and the sculpt mode code. This implementation stores the face sets in the base mesh, so faces created in higher subdivision levels can't be modified individually. Also, we are not checking for multiple face sets per vertex (that can be added in the future), so relax tools don't work yet. The rest of the features (paint, undo, visibility operators..) work as expected. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7168
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-10Fix T74613: Assign the default face set color in the versioning codePablo Dobarro
A default face set color was not being set in previously saved meshes, so it will always render the default face set with a random color until the colors were recalculated. Bump subversion to 283.8 Reviewed By: dfelinto Maniphest Tasks: T74613 Differential Revision: https://developer.blender.org/D7094
2020-03-09Cleanup: palette: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-09Cleanup: PaintCurve: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-05Sculpt Face SetsPablo Dobarro
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-03-04Cleanup: ID make local: remove `id_in_bmain` argument.Bastien Montagne
This info is now stored in ID tags themselves, so no need to pass an extra anonymous boolean parameter around, yay!
2020-03-04Cleanup: Rename 'make local' functions to new scheme.Bastien Montagne
Also removed some only used locally from the header, `BKE_lib_id.h` is already way too big, no need to overload it with unused things.
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-02-14Fix failing assert & uninitialized paint settings in empty sceneJulian Eisel
Steps to reproduce were: * Add new (empty) scene * Add some mesh object * Change to texture paint mode While it can be argued that we should already init the settings when creating a new scene (so that the texture tab can show up), BKE_paint_init() should always ensure paint settings are initialized either way. Related to T73611.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-02-07Cleanup: use of 'unsigned'Campbell Barton
- Replace 'unsigned' used on it's own with 'uint'. - Replace 'unsigned const char' with 'const uchar'.
2020-01-14Fix T71712: Free the dynamic mesh preview when rebuilding the PBVHPablo Dobarro
The PBVH usually is rebuild after a topology change, so it does not make sense to keep the previous dynamic mesh preview vertex list. This may cause a crash is the number of vertices of the new mesh (and preview) is larger previous one. Now the list is deleted with the PBVH and a new one will be generated using the new mesh when the cursor is updated. Reviewed By: jbakker Maniphest Tasks: T71712 Differential Revision: https://developer.blender.org/D6476
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-10Fix T71995: Texture Paint workspace crash with new sceneJulian Eisel
Issue likely caused by 8b31f6fb2169. With this, initializing the toolsystem (e.g. for a new workspace-scene combination) would skip the entire create->initialize routine for image/texture painting settings. Reason being that these are not allocated, unlike other paint settings. So while correctly skipping the create part, it also skipped the initialization, which was still needed. This does further changes in related code to avoid NULL pointer accesses.
2019-11-27Curve: CurveMapping Extend OptionJeroen Bakker
Extend options are currently stored per curve. This was not clearly communicated to the user and they expected this to be a setting per CurveMapping. This change will move the option from `Curve` to `CurveMapping`. In order to support this the API had to be changed. BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what breaks Python API. Cycles has been updated but other add-ons have not. After release of 2.81 we can merge this to master and adapt the add-ons. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6169
2019-11-13Force sculpting on highest multires levelSergey Sharybin
This is a workaround for T58473 to avoid likely event of ruining sculpted data. Differential Revision: https://developer.blender.org/D6244
2019-10-09Sculpt: Fix wireframe drawingPablo Dobarro
With this commit sculpt mode draws the real mesh wireframe instead of the triangulated version by ignoring non real edges when building the PBVH GPU buffers Reviewed By: brecht Differential Revision: https://developer.blender.org/D6032
2019-10-07Cleanup: rename some sculpt variables for clarityBrecht Van Lommel