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
2021-06-01BMesh: remove checks for tessellating 2 sided facesCampbell Barton
2 sided faces aren't supported and will cause problems in many areas of Blender's code. Removing (implied) support for faces with fewer than 3 sides means the total number of triangles is known ahead of time. This simplifies adding support for multi-threading and partial updates to an existing tessellation - as the face and loop indices can be used to access the range of triangles associated with a face. Also correct outdated comments.
2021-04-30Fix sculpt mask operator crash running without a 3D viewCampbell Barton
Add missing operator poll, depend on the 3D view for all sculpt paint/mask operators.
2021-03-13Cleanup: add BKE_pbvh_vertex_iter_begin to clang-formatPablo Dobarro
Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10707
2021-03-08Speedup for usual non-manifold exact boolean case.Howard Trickey
The commit rB6f63417b500d that made exact boolean work on meshes with holes (like Suzanne) unfortunately dramatically slowed things down on other non-manifold meshes that don't have holes and didn't need the per-triangle insideness test. This adds a hole_tolerant parameter, false by default, that the user can enable to get good results on non-manifold meshes with holes. Using false for this parameter speeds up the time from 90 seconds to 10 seconds on an example with 1.2M triangles.
2021-02-11Cleanup: clang-format, spellingCampbell Barton
2021-02-10Fix Sculpt Gestures using normal orientation with translated objectsPablo Dobarro
This fixes two issues that were preveting normal orientation for working: - The translation of component of the object matrix should not be considered when converting a normal to world space. - Whe using cursor for depth, the depth for the shape should be taken directly from the cursor (which is already unprojected and updated) instead of from the brush, which may have not been updated. Reviewed By: dbystedt, JacquesLucke Differential Revision: https://developer.blender.org/D10231
2021-02-03Fix T84370: Project tool not working with shape keysPablo Dobarro
A missing flush of the deformed PBVH coordinates to the shape key. Reviewed By: JacquesLucke Maniphest Tasks: T84370 Differential Revision: https://developer.blender.org/D10174
2020-12-15Fix T83504: Cancel trim operators when there is no geometryPablo Dobarro
The boolean solver crashes when there is no geometry in the mesh. Also, using the trimming tools without a valid intersection in the PBVH will make the orientation and position functionality of the trimming shape not work, so this is the safer solution. Reviewed By: mont29 Maniphest Tasks: T83504 Differential Revision: https://developer.blender.org/D9777
2020-12-07UI: Fix mistakes in UI messages.Bastien Montagne
2020-11-18Cleanup: clarify precedence of operationsCampbell Barton
2020-11-12Fix T82388: Sculpt mode: Unexpected undo behavior.Bastien Montagne
Issue exposed by rB4c7b1766a7f1. Main idea is that non-memfile first undo step should check into previous memfile and tag the ID it is editing as `future_changed`. That way, when we go back and undo to the memfile, said IDs are properly detected as changed and re-read from the memfile. Otherwise, undo system sees them as unchanged, and just re-use the current data instead. Note that currently only Sculpt mode seems affected (probably because it is storing the mode switch itself as a Sculpt undo step instead of a memfile one), but similar action might be needed in some other cases too. Maniphest Tasks: T82388 Differential Revision: https://developer.blender.org/D9510
2020-11-09Merge branch 'blender-v2.91-release' into masterJacques Lucke
2020-11-09Sculpt: Fix off-by-one error when creating bitmap for lasso gestureJacques Lucke
Reviewers: pablodp606 Differential Revision: https://developer.blender.org/D9472
2020-11-08Fix T81651, exact boolean modifier incorrect if operand hidden.Howard Trickey
The code was trying to ignore hidden geometry when doing boolean, which is correct when used as a tool, but not when a modifier. Added a "keep_hidden" argument to bmesh_boolean to distinguish the two cases. Also fixed a bug when the tool is used with hidden geometry that is attached to unhidden geometry that is deleted by the operation.
2020-11-08Fix T81651, exact boolean modifier incorrect if operand hidden.Howard Trickey
The code was trying to ignore hidden geometry when doing boolean, which is correct when used as a tool, but not when a modifier. Added a "keep_hidden" argument to bmesh_boolean to distinguish the two cases. Also fixed a bug when the tool is used with hidden geometry that is attached to unhidden geometry that is deleted by the operation.
2020-11-06Merge branch 'blender-v2.91-release'Pablo Dobarro
2020-11-06Fix memory leaks in sculpt mode trimming toolsPablo Dobarro
BKE_mesh_free() seems to not free the meshes correctly, so using BKE_id_free() instead. The looptri array was also not freed. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9426
2020-11-04Merge branch 'blender-v2.91-release'Pablo Dobarro
2020-11-04Fix T81799: Enable use self in trimming tool booleansPablo Dobarro
This enables self intersections in the sculpt trimming tools boolean operations. This should fix wrong booleans results after using the operator to add new disconnected geometry with the join mode. Reviewed By: sergey Maniphest Tasks: T81799 Differential Revision: https://developer.blender.org/D9423
2020-10-31Cleanup: clang-formatLukas Stockner
2020-10-30Sculpt: Add normal orientation to lasso trim toolPablo Dobarro
This adds an option to orientate the trimming shape using the surface normal instead of the view when lasso trim is used. Reviewed By: dbystedt, sergey Differential Revision: https://developer.blender.org/D9231
2020-10-26Sculpt: Option to limit the action of line gestures to the segmentPablo Dobarro
This adds a tool property for sculpt line gesture tools (line and project) to limits its effect to the segment of the gesture instead of using the infinite line to bisect the mesh in two parts. To achieve that, the line gesture now has two extra side planes that can be enabled/disabled for getting the nodes from the PBVH and to test the vertices. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9307
2020-10-21Fix T81929: Sculpt: Mask operators missing drawing update on meshes withPhilipp Oeser
shapekeys/modifiers This was failing for all mask filters (sharpen, grow, invert, clear, shrink, contrast, smooth) and mask gestures (box, lasso). Also have to recalc shading, use SCULPT_tag_update_overlays for this. ref D8956 Maniphest Tasks: T81929 Differential Revision: https://developer.blender.org/D9302
2020-10-21UI: Allow changing the active side of line gesturesPablo Dobarro
Line gesture use always the right side of the line as active (the area of the mesh that is going to be modified) by default. This adds the ability to change the active side when the line gesture is active by pressing the F key. This allows more freedom to position the line after starting the gestures, as it won't be required to cancel the operation or undo if the line was used in the wrong direction. Reviewed By: Severin Differential Revision: https://developer.blender.org/D9301
2020-10-21UI: Fix typo in sculpt trim tool descriptionHans Goudey
2020-10-20Fix T81776: Sculpt line gestures not working with transformed objectsPablo Dobarro
The line gesture plane should be in object space, not in world space.
2020-10-20Fix missing Sculpt Overlays updates when using modifiersPablo Dobarro
Now that sculpt mask and face sets can also be drawn without using the PBVH, these operators need these extra updates when the data changes. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8956
2020-10-18Sculpt: Fix (unreported) assert getting trimming cursor depth optionPhilipp Oeser
It is a boolean, not an enum.
2020-10-15Silence warningDalai Felinto
2020-10-15Sculpt: Use cursor depth in trimming gesturesPablo Dobarro
This adds an operator property to use the paint cursor radius and position for the depth of the trimming shape created by the trimming tools. When enabled, the shape is located in the surface point when the gesture started and it will have the depth of the cursor radius. When the cursor is not over the mesh, the shape will be positioned at the center of the depth of the whole object from the viewport camera. Reviewed By: dbystedt, sergey Differential Revision: https://developer.blender.org/D9129
2020-10-15Fix T80625: Trimming tools not working with transformed objectsPablo Dobarro
The code to handle object transforms was wrong. Now the trimming mesh and depts is calculated in world space, using the real view origin and normal and then stored in object space in the mesh and in the original coordinates array. As now both meshes for the boolean operation are in the same object space, the space conversion code can also be removed from the boolean function. Reviewed By: sergey Maniphest Tasks: T80625 Differential Revision: https://developer.blender.org/D8852
2020-10-06Sculpt: Union and Join mode for trim toolsPablo Dobarro
This enables a union boolean mode for the trimming gestures tools which adds geometry to the mesh instead of cutting it. It also adds a Join mode, which adds the geometry directly without using a boolean operation. Depending if you plan to use dyntopo or not, it is useful to have both options available. This is using the full depth of the object from the camera view for the depth of the geometry, but options for controlling the trimming depth in all modes are going to be added in later patches Reviewed By: mont29 Differential Revision: https://developer.blender.org/D9066
2020-10-05Fix T81343: Smooth shading normals not updating with line project toolPablo Dobarro
Just a missing update flag Reviewed By: mont29 Maniphest Tasks: T81343 Differential Revision: https://developer.blender.org/D9077
2020-10-05Sculpt: Preview the active side of the line gesturesPablo Dobarro
This adds a small gradient to the right side of the line to preview which side of the mesh is going to be affected by the gesture operation. Reviewed By: Severin Differential Revision: https://developer.blender.org/D9106
2020-09-29Sculpt: Line Project Gesture toolPablo Dobarro
This tool projects all vertices to the right of the plane defined by the line gesture towards the plane. By doing this, this tool can create cuts and plane surfaces in the mesh without modifying the geometry or using boolean operations, so it is much faster than bisecting the mesh for cases where the geometry was going to be remeshed afterwards. Added as experimental as it does not have icon. Reviewed By: sergey, Severin Differential Revision: https://developer.blender.org/D9021
2020-09-26Sculpt: Line gestures and Mask Line toolPablo Dobarro
This adds support for line gesture to SculptGestureContext and implements a Mask Line tool, which affects everything to the right of a plane defined by the straightline gesture. For this to work, a new WM_gesture_straightline_oneshot_modal is needed which only runs exec when the gesture is over. Added as experimental as it does not have icon. Reviewed By: Severin Differential Revision: https://developer.blender.org/D8722
2020-09-18Unify all XYZ symmetry options using Mesh SymmetryPablo Dobarro
This adds XYZ symmetry as a property of meshes and updates all modes to use the mesh symmetry by default to have a consistent tool behavior between all modes and when switching objects. Reviewed By: brecht, mano-wii, campbellbarton Maniphest Tasks: T79785 Differential Revision: https://developer.blender.org/D8587
2020-09-18Fix bad allocation in mask sculpt gesturesPablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8886
2020-09-13Apply patch D8816, from Zachary(AFWS) for collection boolean operand.Howard Trickey
Also added code so that exact solver does the whole collection at once. This patch allows users to use a collection (as an alternative to Object) for the boolean modifier operand, and therefore get rid of a long modifier stack.
2020-09-07Sculpt: Sculpt Trimming gestures toolsPablo Dobarro
This implements Box Trim as a boolean based trimming too gesture in sculpt mode. This is the intended way to remove parts of the sculpt instead of using box mask and mask slice. It also creates new face sets for the new faces created after the boolean operation. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8766
2020-09-05Cleanup: spellingCampbell Barton
2020-09-04Cleanup: Use function pointers in sculpt gesturesPablo Dobarro
This replaces the switch case and operation types with a SculptGestureOperation struct with callbacks. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8798
2020-09-03Sculpt: Sculpt Face Set gestures toolsPablo Dobarro
This implements the sculpt gesture lasso and box operators for face sets. They work the same way as the mask gesture operator and tools. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8716
2020-08-26Clenaup: Refactor Sculpt gesture mask operatorsPablo Dobarro
This refactors Box Mask and Lasso mask making both functions share the same code. After this change it should be easier to add new functionality, new gesture tools or implement new gesture modes. No functional changes. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8707
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-07Cleanup: pass arrays const where possibleCampbell Barton
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-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-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