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-04-03Fix T74205: crash cancelling transfrom operation in sculpt modeAsad-ullah Khan
Differential Revision: https://developer.blender.org/D7018
2020-04-03Cleanup: Continue renaming ARegion variables from ar to regionJulian Eisel
Continuation of b2ee1770d4c3, now non-single word variables are also renamed. Part of T74432. 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-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
2020-04-03Cleanup: spellingCampbell Barton
2020-04-02Sculpt: Add global automasking options for all brushesPablo Dobarro
This adds the automasking options to the Sculpt Tool options in a way that they affect all brushes. This is more convenient when working with some of these options while switching brushes as they don't need to be enabled/disabled per brush. An automasking option is enabled if it is enabled in the brush or in the sculpt options. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7304
2020-04-02Scultp: Face Set boundary automaskingPablo Dobarro
With this brush option it is possible to mask the boundary vertices of all face sets. This is especially useful in the cloth brush, where face sets can be used to simulate seams between different patches of cloth and produce different patterns and effects. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7230
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-02Sculpt Undo: Allow Geometry undo step to be non-exclusiveSergey Sharybin
Before this change it was not possible to have base geometry and grid coordinates to be stored in the same undo step. Differential Revision: https://developer.blender.org/D7298
2020-04-02Fix Face Sets painting and selection precisionPablo Dobarro
This fixes the following issues: - Previously, the face set from the active vertex was used directly. Vertices always return the most recently created face set, so in some cases there may be some face sets that were not possible to select as active. Now the active face set is set in the ray intersection, so it always matches the face under the cursor. - When drawing face sets they were set per vertex, so it was not possible to paint one face at a time. Now face sets are painted per poly when using the brush on meshes, testing the distance to the center of each poly. - The code for the active vertex on PBVH_GRIDS was not correct, so I also fixed that to test if everything was working correctly. {F8441699} Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7303
2020-04-02Fix T75121: Memory leak in Surface SmoothPablo Dobarro
The brush was allocating new memory for storing the displacemnets at the beginning of each stroke step and not freeing them. Reviewed By: jbakker Maniphest Tasks: T75121 Differential Revision: https://developer.blender.org/D7254
2020-04-02Fix mesh boundary automask curve falloffPablo Dobarro
As the main use case of this feature is to work with cloth, using this curve makes more sense than a smoothstep to simulate cloth tension near the edges. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7262
2020-04-02Sculpt: Give a brief explanation of undo stackSergey Sharybin
Should make it a bit more clear overview of what is going on in this module. While some of the details might still be missing, having some sort of top-level overview is better than nothing. Differential Revision: https://developer.blender.org/D7300
2020-04-02Sculpt Undo: Fix multires undo for interleaved nodesSergey Sharybin
Made it so grids array is properly allocated when first node in the undo list does not contain grid data. Differential Revision: https://developer.blender.org/D7299
2020-04-01Sculpt Undo: Refactor Geometry undo nodesSergey Sharybin
Made it so there is a single UNDO node in the list which has both original and modified mesh state. Makes it easier to achieve "interleaved" undo nodes stored in the undo step (as opposite of either storing geometry or other data). Should be no functional changes, just preparing for an upcoming work to support undo of operation like Apply Base. Differential Revision: https://developer.blender.org/D7290
2020-04-01Fix missing break statement in recent face-set supportCampbell Barton
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-29Cleanup: spelling, commentsCampbell Barton
2020-03-28Cleanup: compiler warningsBrecht Van Lommel
2020-03-27Sculpt: Pose Brush Face Sets origin modePablo Dobarro
This commit introduces a new mode for calculating the positions and weights of the IK segments in the Pose Brush based on the Face Sets. The first segment of the chain will always include all face sets inside the brush radius and it will propagate until the boundary of the last face sets added in the flood fill. Then consecutive connected face sets are added to the chain until the chain length limit is reached or all face sets of the mesh are already part of the chain. This feature enables complete control over the pose brush origins in case that is needed. Also, with this mode, the user can have a library of base meshes with face sets already configured to get to the initial pose as fast as possible. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7235
2020-03-27Sculpt: Weight normal and area sampling towards the brush centerPablo Dobarro
Previously, all vertices inside the brush radius were taken into account equally when calculating the sculpt normal and area. This was causing artifacts and unpredictable results with large brushes or meshes with curvatures, as the strongest deformation point of all brushes is usually in the center. By weighting the vertex normal and position towards the center when sampling, all brushes should now behave in a more predictable way in non-uniform surfaces. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6989
2020-03-27Fix T74637: Reset face set data when disabling dyntopoPablo Dobarro
Last time I checked Face Sets were preserved in a more or less predictable way when modifying the mesh with dyntopo. As it looks that in some problems this may cause bugs and you can't see or use face sets when modifying the topology of the mesh whith dyntopo active, it is probably better to reset them when going from dyntopo to mesh. This way you know that you are always going to get a predictable face sets state. Reviewed By: jbakker Maniphest Tasks: T74637 Differential Revision: https://developer.blender.org/D7099
2020-03-27Cleanup: quiet unused function warningCampbell Barton
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-27Cleanup: uppercase macros for sculpt iterators, add to clang-formatCampbell Barton
Also use sculpt prefix for SCULPT_CLAY_STABILIZER_LEN.
2020-03-26Sculpt: Create Face Set by Edit Mode SelectionPablo Dobarro
This implements a new mode in the Face Sets Create operator to create a new face sets from the faces selection in edit mode. This can be used when the user considers that the edit mode tools are more convenient for a more precise control or a certain type of selection, like creating a face set from a face loop. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7211
2020-03-26Sculpt: Face Sets Init operatorPablo Dobarro
This operator initializes all face sets in the sculpt at once using different mesh properties. It can create face sets by mesh connectivity, material slots, face normals, UV seams, creases, sharp edges, bevel weights and face maps. For properties that are already in the faces, this is implemented as a loop. Properties that depend on edge attributes use a similar operation to sculpt flood fill, but using face adjacency instead of edge vertex connectivity. As Multires also stores the face sets in the base mesh, this should work in the face sets Multires implementation without any changes. This is implemented as a separate operator as this resets the visibility and creates all face sets at once, while the create face set operator creates a single face sets, leaving the rest of the face sets in the mesh as they are. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7209
2020-03-26Sculpt: Surface Smooth Brush and Mesh FilterPablo Dobarro
This implements the Surface Smooth Brush as a mode inside the Smooth tool, which uses the HC algorithm from "Improved Laplacian Smoothing of Noisy Surface Meshes". Comparted to the regular smooth brush with laplacian smooth, this brush removes the surface while preserving the volume of the object. The smooth result can be controlled by tweaing the original shape preservation, displacement and iteration count. The same surface smooth operation is also available as a mesh filter. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7057
2020-03-26Fix T74780: Face sets operators not aware of SCULPT_FACE_SET_NONEPablo Dobarro
SCULPT_FACE_SET_NONE default value is 0 and it is rendered hidden, so the invert sign operation to show it was not working. Now the show all function sets this face set to ID 1 before setting its sign. I also refactored this check in gpu_buffers. Not related to the reported issue, but the mesh in attached contains non manifold geometry with hidden loose vertices, so the visibility state was not syncing correctly to those vertices. Now the toggle operators checks the current visibility only on the face sets, so no manifold vertices are ignored (as they are in the rest of operations in sculpt mode). Reviewed By: jbakker Maniphest Tasks: T74780 Differential Revision: https://developer.blender.org/D7188
2020-03-26Fix T74761: Reimplement vertex to face sets visibility syncPablo Dobarro
This fixes multiple issues: - Adds tag to update shading when changing vertex visibiliyt. This makes the mesh visibility update when the operator ends. - Sync vertex to face sets no longer requires the pmap, so it does not crash. (Maybe we can initialize the pmap on undo to avoid these problems in the future). - Sync vertex to face sets now works in a coherent way with the rest of visibility operations. Hide Box and Hide mask now sync the visibility changes to the face sets, so the all the operations are now getting a correct visibility state. Reviewed By: brecht Maniphest Tasks: T74761 Differential Revision: https://developer.blender.org/D7187
2020-03-26Fix T74808: Division by 0 in Cloth brush solver with overlapping verticesPablo Dobarro
This checks that the distance of the current positions of two connected vertices is not 0 before calculating the correction vectors for those vertices. Reviewed By: jbakker Maniphest Tasks: T74808 Differential Revision: https://developer.blender.org/D7184
2020-03-26Fix T75089: Missing pmap when using Face Sets in the mesh filterPablo Dobarro
When using Face Sets to mask the mesh filter the pmap needs to be initialized to check the face sets of each vertex, otherwise it will crash because it is null. Probably now we should just initalize the pmap when building the PBVH as almost all tools need it, so we can avoid these crashes in the future. Reviewed By: jbakker Maniphest Tasks: T75089 Differential Revision: https://developer.blender.org/D7236
2020-03-26Cleanup: redundant cast, unused argumentsCampbell Barton
2020-03-26Fix crash with missing NULL check accessing grease pencil paintCampbell Barton
2020-03-26Fix crashes from various missing checks in operator poll functionsCampbell Barton
Issues exposed by 'bl_run_operators.py' utility.
2020-03-26Fix crash setting the brush with the current brush was unsetCampbell Barton
2020-03-26Fix T74711: tiling brush option in image editor not working anymoreBrecht Van Lommel
This makes it work again at least for the non-UDIM case. For UDIM it's not great still but I'll consider that a known limitation. A proper solution is probably to find the closest tile at the start of the stroke and then only paint in that one tile for the rest of the stroke.
2020-03-19Cleanup: fix typos in commentsBrecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D7133
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-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-17VR: Initial Virtual Reality support - Milestone 1, Scene InspectionJulian Eisel
NOTE: While most of the milestone 1 goals are there, a few smaller features and improvements are still to be done. Big picture of this milestone: Initial, OpenXR-based virtual reality support for users and foundation for advanced use cases. Maniphest Task: https://developer.blender.org/T71347 The tasks contains more information about this milestone. To be clear: This is not a feature rich VR implementation, it's focused on the initial scene inspection use case. We intentionally focused on that, further features like controller support are part of the next milestone. - How to use? Instructions on how to use this are here: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test These will be updated and moved to a more official place (likely the manual) soon. Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC headsets don't support the OpenXR standard yet and hence, do not work with this implementation. --------------- This is the C-side implementation of the features added for initial VR support as per milestone 1. A "VR Scene Inspection" Add-on will be committed separately, to expose the VR functionality in the UI. It also adds some further features for milestone 1, namely a landmarking system (stored view locations in the VR space) Main additions/features: * Support for rendering viewports to an HMD, with good performance. * Option to sync the VR view perspective with a fully interactive, regular 3D View (VR-Mirror). * Option to disable positional tracking. Keeps the current position (calculated based on the VR eye center pose) when enabled while a VR session is running. * Some regular viewport settings for the VR view * RNA/Python-API to query and set VR session state information. * WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data * wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU context) * DNA/RNA for management of VR session settings * `--debug-xr` and `--debug-xr-time` commandline options * Utility batch & config file for using the Oculus runtime on Windows. * Most VR data is runtime only. The exception is user settings which are saved to files (`XrSessionSettings`). * VR support can be disabled through the `WITH_XR_OPENXR` compiler flag. For architecture and code documentation, see https://wiki.blender.org/wiki/Source/Interface/XR. --------------- A few thank you's: * A huge shoutout to Ray Molenkamp for his help during the project - it would have not been that successful without him! * Sebastian Koenig and Simeon Conzendorf for testing and feedback! * The reviewers, especially Brecht Van Lommel! * Dalai Felinto for pushing and managing me to get this done ;) * The OpenXR working group for providing an open standard. I think we're the first bigger application to adopt OpenXR. Congratulations to them and ourselves :) This project started as a Google Summer of Code 2019 project - "Core Support of Virtual Reality Headsets through OpenXR" (see https://wiki.blender.org/wiki/User:Severin/GSoC-2019/). Some further information, including ideas for further improvements can be found in the final GSoC report: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report Differential Revisions: D6193, D7098 Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-17Fix T74838: fix dereferencing of NULL in sculpt_no_multires_poll when no ↵Robert Guetzkow
active object exists Fix crash when the operator search is used while no active object exists. The cause of the issue is an attempt to dereference `ob` when it is `NULL`. Therefore this patch checks the return value of `SCULPT_mode_poll()` first, to ensure that `ob` isn't `NULL`. Reviewed By: pablodp606 Maniphest Tasks: T74838 Differential Revision: https://developer.blender.org/D7156
2020-03-16Update viewport rotation origin when changing Face Set visibilityPablo Dobarro
Small UX fix. When hidding everything but the active face set with H, the last stroke lotation center can be in a part of the model that is hidden, so viewport navigation becomes confusing until you start a new stroke on the visible face set. Now the viewport navigation rotation center is updated to the active vertex when using a visibility operation that uses it, so it always rotates using the visible face set as the origin. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7137
2020-03-14Cleanup: sort file lists & struct declatationsCampbell Barton
2020-03-12Fix boundary edges detection ignoring Face Set visibilityPablo Dobarro
If one of the faces connected to a vertex is hidden in the face sets, we can assume that the vertex is part of a boundary edge, so it should be cosidered like that in all automasking and edge detection functions. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7126
2020-03-12Fix flood fill operation not taking into account hidden verticesPablo Dobarro
The idea of the visibility system is that tools should behave like hidden vertices do not exist, so the flood fill operation should ignore hidden vertices for all operators. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7125
2020-03-12Use golden ratio conjugate for Face Sets hue generationPablo Dobarro
The face set ID is sequential, so implementing this was straightforward. Suggested by Jeroen Bakker Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7123
2020-03-12Fix Face Set operators not modifying sigle poly Face SetsPablo Dobarro
The face_set_set function which sets a face sets given a vertex index can ignore all modifications to hidden face sets, so we can skip all vertex visibility checks outside that function. This makes the code faster, simpler and fixes multiple bugs. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7122
2020-03-12Fix T74646: Pick a random face set to be rendered white when randomizing the ↵Pablo Dobarro
colors The previous solution was also working fine as the white face set has no meaning, but now it is a little bit more random. Also, bigger face sets have more chance of getting the white color. Reviewed By: jbakker Maniphest Tasks: T74646 Differential Revision: https://developer.blender.org/D7111