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-13Fix Boundary Brush symmetry with no constant falloffPablo Dobarro
When using constant falloff symmetry was working fine because the same deformation is applied twice on the same vertices. When using no constant falloffs, the deformation is different between symmetry passes, so vertices need to be separated by symmetry areas to get the right deformation from its symmetry pass without being overwriten by the next one. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8541
2020-08-13Sculpt: Boundary Brush Falloff Types and OffsetPablo Dobarro
This adds the boundary_falloff_type and boundary_offset to control how the falloff of the Boundary Brush is applied. Boundary Origin Offset is the same concept as the Pose Origin offset in the Pose Brush. It is a multiplier that adds extra length to the brush radius to locate the deformation pivot further from the boundary without affecting the falloff. The Falloff type includes Constant (previous default), brush radius, loop and loop and invert. Loop and Loop and Invert can be used to create deformation patterns in a mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8526
2020-08-12Sculpt: Multires Displacement Eraser BrushPablo Dobarro
This brush deletes displacement information of the Multires Modifier, resetting the mesh to the subdivision limit surface. This can be use to easily delete parts of the sculpt or to fix reprojection artifacts after applying a shrinkwrap. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8543
2020-08-12Sculpt: Expose Edit Face Set as a toolPablo Dobarro
Previously the way to use this operations was using the shortcut Ctrl + W and Ctrl + Alt + W, which was not very discoverable and it was limiting the amount of options that can be added to the operator.Now the same functionality of the operator is available as a tool, which will make easier to add other editing operations and options without adding more entries to the keymap. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8545
2020-08-12Cleanup: Remove explicit float casts in sculpt codePablo Dobarro
Differential Revision: https://developer.blender.org/D8553
2020-08-12Clenaup: Rename random_access_init to random_access_ensurePablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8529
2020-08-12Cleanup: Use clamp_f instead of CLAMP in sculpt codePablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8528
2020-08-12Fix Sculpt Filters operator namingPablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8523
2020-08-12Merge branch 'blender-v2.90-release'Philipp Oeser
2020-08-12Fix T79622: Mesh Filter on a locked Shape crashesPhilipp Oeser
For a locked shapekey, a SculptSession's orig_cos / deform_cos / deform_imats are not initialized (they only are when deform_modifiers_active is true -- this in turn is only true for shapekeys if they are //not// locked [and for deforming modifiers of course]) We can just update that keyblock with sculpt_update_keyblock() in case of a locked shapekey Maniphest Tasks: T79622 Differential Revision: https://developer.blender.org/D8499
2020-08-11Sculpt: Option to not modify hidden Face Sets in Face Sets EditPablo Dobarro
This options allows to perform Face Sets operations while preserving the mesh visibility. Edit hidden face sets is enabled by default in order to expand the visible area of the mesh with the grow/shrink operator, but this can be changed in the keymap per edit operation as more operations are supported. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8029
2020-08-11Cleanup: spellingCampbell Barton
2020-08-10Sculpt: Option to mask front faces only using Lasso and Box MaskPablo Dobarro
This adds a property that checks the normals of each vertex against the view direction to decide if they should be masked (similar to the "Front Faces Only" option works for brushes. Reviewed By: sergey Maniphest Tasks: T77637 Differential Revision: https://developer.blender.org/D8448
2020-08-10Sculpt: Boundary BrushPablo Dobarro
This brush includes a set of deformation modes designed to deform and control the shape of the mesh boundaries, which are really hard to do with regular sculpt brushes (and even in edit mode). This is useful for creating cloth assets and hard surface base meshes. The brush detects the mesh boundary closest to the active vertex and propagates the deformation using the brush falloff into the mesh. It includes bend, expand, inflate, grab and twist deform modes. The main use cases of this brush are the Bend and Expand deformation modes, which depend on a grid topology to create the best results. In order to do further adjustments and tweaks to the result of these deformation modes, the brush also includes the Inflate, Grab and Twist deformation modes, which do not depend that much on the topology. Grab and Inflate are the same operation that is implemented in the Grab and Inflate tools, they are also available in the boundary brush as producing deformations with regular brushes in these areas is very hard to control. Even if this brush can produce deformations in triangle meshes and meshes with a non-regular quad grid, the more regular and clean the topology is, the better. Most of the assets this brush is intended to deform are always created from a cylindrical or plane quad grid, so it should be fine. Also, its algorithms can be improved in future versions to handle more corner cases and topology patterns. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8356
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Fix failing assert when entering Texture Paint modeJulian Eisel
Was unbinding the shader twice.
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenlib` module. Not all warnings are addressed in this commit. No functional changes.
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-06Merge branch 'blender-v2.90-release'Pablo Dobarro
2020-08-06Fix Pose Brush FK mode detecting wrong rotation originPablo Dobarro
The Pose FK mode assings the rotation origin to the boundary of the last visited face set in the floodfill operation. In some cases, the topology of the model may make the flood fill operation to visit a face set as the first one (assinging it to target) and visit it again as the last one (assinging it to origin). This will make the pose brush to default the origin and target to the brush location and not to the face sets as it considers that there is only one possible boundary. This adds a GSet to ensure that a particular face set is not visited twice in the flood fill, fixing these cases. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7984
2020-08-06Sculpt: Cloth Brush simulation area propertyPablo Dobarro
This makes possible to choose between a local and a global simulation when the cloth brush is used. Local simulation is the current default. When global simulation is enabled, the cloth brush simulates the entire mesh without taking any simulation limits into account. This was possible before by setting the simulation limits to 10 (the current maximum value allowed) so the entire mesh was inside the limits, but this was a hack as the limits scale with the radius and there should not be any limitation on how big the simulated area can be to be able to simulate an entire object. This also allows to make a more clear distinction between cloth brush presets that are intended to be used in local areas to add details or globally to generate the base shape of the mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8481
2020-08-06Cleanup: Paint Cursor RefactorPablo Dobarro
The paint_draw_cursor function was handling the cursor drawing for 2D and 3D views of all paint modes, calculating the brush radius, updating the SculptSession data and updating and drawing all sculpt cursor overlays for different tools. It was almost impossible to understand when and what was being drawn and in which state the GPU matrix was. Now everyting is organized into different functions, with clear separation between modes, sculpt tool overlays and different drawing setups. Update and drawing functions are also separated (this allows to skip one PBVH query on each cursor drawing). Reviewed By: sergey Differential Revision: https://developer.blender.org/D8206
2020-08-06Cleanup: undeclared warningsCampbell Barton
2020-08-06Cleanup: no need for plural for term 'collision'Campbell Barton
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-06Sculpt: Sharpen Mesh Filter curvature smoothing and intensify detailsPablo Dobarro
This adds a curvature smoothing and intensify details properties to control the result of the Sharpen Mesh Filter. Curvature smoothing removes high frequency details from the precalculated sharpen data, so the filter result has much smoother surfaces and cleaner sharpen lines; Intensify details displaces the vertices of creases and valleys in the direction opposite to its neighbors average, so it intensifies high frequency details in those areas, producing more noisy and sharp shapes: Both this properties can be used in combination to achieve a good balance of high and low frequency details depending on the shape and the desired result. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8447
2020-08-05Sculpt: Option to lock the rotation in the Pose Brush scale deform modePablo Dobarro
The scale deform mode includes rotation by default, so when when scaling down a part of the models it becomes harder to control as the effect of the rotation less predictable (similar to using trackball rotation in a very small radius). This locks the rotation of the segment, so parts of the model can be scaled down in a more predictable way. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8465
2020-08-05Sculpt: Cloth brush Pin Simulation Boundary propertyPablo Dobarro
The cloth brush has a defined simulated area with a falloff. In the falloff area (the area between the dashed white circle and the exterior white circle), simulation properties change in order to fade out the simulation deformation effects towards the boundary. With some brushes and stroke types (like anchored strokes with pinching or grabbing with full strength), it is possible to apply more force than what the boundary falloff can compensate, so the simulation breaks when this happens. This option pins the falloff area with softbody constraints, This produces a much better deformation falloff and it is no longer possible to move the vertices near the simulation boundary, so the simulation won't break no matter the strength of the forces applied inside the simulated areas. This is an option as it is particularly useful for some brushes to add localized details, but for brushes that are supposed to deform the entire mesh (like the grab brush in D8424), this can add unwanted softbody constraints that affect the simulation result. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8435
2020-08-04Sculpt: Split Box Mask into its own operatorPablo Dobarro
Box mask is not a selection, so it should not be part of the select operator. This allows to add more sculpt mode specific functionality and properties and to share more code with the lasso mask operator in a later refactor. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8456
2020-08-04Merge branch 'blender-v2.90-release'Bastien Montagne
Conflicts: source/blender/editors/gpencil/gpencil_primitive.c
2020-08-04Cleanup: typos & co in UI messages (and some other places).Bastien Montagne
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-08-01Cleanup: spellingCampbell Barton
2020-07-30Cleanup: Use MEM_calloc_arrayN in the Cloth BrushPablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8432
2020-07-30Sculpt: Use constraints in cloth deform brushesPablo Dobarro
Previously, deform brushes were modifying the final positions in the simulation directly, which was causing all sorts of artifacts in the deformed area and problems with other features of the solver. Now these brushes deform a separate array of positions and the solver adds constraints to them, so the real vertices are moved when solving the constraints. This prevents those artifacts and gives the brush a much better behavior. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8424
2020-07-30Sculpt: Enable persistent base for the cloth brushPablo Dobarro
The cloth brush builds the constraints when the stroke starts usign the current state of the mesh. This means that deformations profuced by the simulattion will accumulate after multiple strokes as it will always start from the previous deformed state. While this is useful in many cases, for other uses it is convenient to always simulate the same initial shape, but applying different forces to it. The persistent base options work like the persistent base in the layer brush and allows the cloth brush to not accumulate deformation after each stroke. When enabled, constraints are created for the shape stored in the persistent base instead of from the current state of the mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8428
2020-07-30Cleanup: warningsCampbell Barton
2020-07-30Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRWClément Foucault
2020-07-30Cleanup: Split gpu_texture_image.c into BKE and IMB modulesClément Foucault
This is in order to disolve GPU_draw.h into more meaningful code blocks. All the Image related function are in `image_gpu.c`. All the MovieClip related function are in `movieclip.c`. The IMB module now has a connection with GPU. This is not strickly necessary and the code could be move to `image_gpu.c` if needed. The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29Sculpt: Cloth Brush Soft Body Influence propertyPablo Dobarro
This property adds constraints to the simulation using the initial location of the vertices, making it behave like a soft body. The strength of these constraints can be modified with the brush parameter. This makes some deformation modes more subtle and predictable, making it possible to use the cloth brush to add surface detail in a more controllable way without loosing completely the original shape of the mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7845
2020-07-29Merge branch 'blender-v2.90-release'Pablo Dobarro
2020-07-29Fix Cloth Brush global Sculpt gravity applied in the wrong falloffPablo Dobarro
Previously, gravity was only applied in the real brush radius, not in the whole simulation radius. For most deformation modes, applying gravity to the entire simulation instead of just to the brush radius and scaled by the radius (like a regular sculpt brush) makes more sense. After this fix and with the cloth collisions patch applied, it is possible to do things like this with the cloth grab brush. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8406
2020-07-29Fix T79054: Crash with Cloth Brush and anchored strokePablo Dobarro
As the comment says, anchored stroke can't rely on the first stroke iteration for creating the simulation data. Probably lost in a cleanup. I also made that anchored stroke doesn't restore the mesh state in the cloth brush, so it can create the simulation effect. Reviewed By: sergey Maniphest Tasks: T79054 Differential Revision: https://developer.blender.org/D8348
2020-07-29Merge branch 'blender-v2.90-release'Germano Cavalcante
2020-07-29Fix T79355: switch to texture paint workspace changes image in other workspacesBrecht Van Lommel
Only automatically change image in editor to follow texture paint editors and workspaces that are visible.
2020-07-29Cleanup: declare static variablesCampbell Barton
2020-07-27Fix Sculpt Relax operation when deforming mesh boundariesPablo Dobarro
Previously, mesh boundaries were relaxed as any other vertex, which was causing artifacts and unwanted deformation. In order to prevent this, the mesh filter was using the automasking system to lock the boundary vertices, which was hacked into the tool. For the brush, the only solution was to enable boundary automasking to lock those vertices in plance. Now the relax vertex function slides the boundary vertices along the mesh boundary edges, relaxing all the topology correctly while preserving the shape of the mesh. The automasking hack in the relax mesh filter was also removed as now vertices slide correctly along the boundary. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8350