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-10-13Cleanup: remove redundant assignment in SCULPT_brush_test_initPhilipp Oeser
As discussed in D9120, this was an oversight in rBe0c792135adf, the same assignment already happens a couple of lines above.
2020-10-13Fix sculpting/painting with viewport clipping and radial symmetryPhilipp Oeser
This was reported for sculpting, the same is true for weightpaint or vertexpaint though. When viewport clipping and radial symmetry are enabled, the 'sculpt_brush_test_clipping()' function was not considering radial symmetry at all, so if the coordinate was outside the clipping planes, no action would take place. Now the coordinte is brought back to where the stroke actually happens and that is checked against clipping. Since other mirroring options while painting/sculpting (as well as editmode operations with mirroring) usually still take place even if the mirrored coord is outside the clipping planes, this should also be the case for radial symmetry. This grows the 'SculptBrushTest' struct a bit, but should be acceptable? Fixes T81466 Maniphest Tasks: T81466 Differential Revision: https://developer.blender.org/D9120
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-08Fix sculpt raycast function returning wrong valuePablo Dobarro
When sampled normals were disabled SCULPT_cursor_geometry_info_update was returning false instead of the value from the raycast data.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07UI: Fix capitalization in various placesYevgeny Makarov
Follow the MLA style, agreed upon in T79589. This means "from" within UI labels should be lowercase. Differential Revision: https://developer.blender.org/D8345
2020-10-07Fix T81461: Weight paint crash with "Vertex Groups X Symmetry" optionPhilipp Oeser
In that case, weightpainting would still be done threaded, but current mirroring code cannot be run in parallel. Caused by rB5502517c3c12 [which was checking mesh 'flag', needs to be 'editflag' -- thus test was always true]. Reviewers: pablodp606 Maniphest Tasks: T81461 Differential Revision: https://developer.blender.org/D9126
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: Modify damping using the simulation factor of the cloth brushPablo Dobarro
This helps blending artifacts with dynamic simulation areas as the damping increases when the vertex. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D9084
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-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-10-02Cleanup: clang-formatLukas Stockner
2020-10-01Fix warnings in cloth brush int castsPablo Dobarro
Use POINTER_AS_INT instead Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D9083
2020-10-01Fix T80873: Grab active vertex preview not working with shape keysPablo Dobarro
When a Shape Key is active, use the PBVH deformed coordinates for the preview. Reviewed By: sergey Maniphest Tasks: T80873 Differential Revision: https://developer.blender.org/D8921
2020-10-01Paint: Ignore inbetween events for anchored strokesPablo Dobarro
When using anchored strokes, inbetween events are not needed since there is no stroke path to be reconstructed. Handling the inbewteen events are only producing unnecessary updates, creating performance issues. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D9053
2020-10-01Sculpt: Cloth Simulation Dynamic area modePablo Dobarro
This simulation area mode moves the active area with the brush. When enabled, the cloth brush has no restrictions on stroke length, area or mesh vertex count. In order to work, this enables PBVH nodes dynamically for simulation as the stroke location moves and builds the constraints for new nodes during the stroke. When a node is not inside the simulated area, all the constraints that were created for it and vertex collisions are not computed. The simulation limits falloff areas and constraints tweaking control how the simulated and no simulated nodes blend. Reviewed By: sergey, zeddb Differential Revision: https://developer.blender.org/D8726
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-29Sculpt: Preserve Mesh visibility from edit mode using the Face SetsPablo Dobarro
Before this change, when users switch from edit mode to sculpt mode, the entire mesh would be visible. Even if in the edit mesh mode part of it was set to invisible. With this change the visibility is preserved, by creating a separate face set for the visible and invisible parts of the mesh and setting their initial visibility. Implementation details: This adds a function to initialize a new Face Set datalayer taking the current mesh visibility into account which is stored in the ME_HIDE flag of the vertices. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8901
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-24Cleanup: spellingCampbell Barton
2020-09-22Cleanup in style from previous commit.Bastien Montagne
Forgot that arc land also did the pus ot originh.
2020-09-22Fix T80859: Thread safe pixeldata concersion from float to uchar and v.v.Martijn Versteegh
I created a bugreport T80859 earlier. The problem is in the file source/blender/editors/sculpt_paint/paint_image_proj.c (line numbers against commit d376aea61) at the lines 5309 and 5320 the functions `IMB_rect_from_float(...)` and `IMB_float_from_rect(...)` are called from threaded code on a shared ibuf. However, ps->reproject_ibuf is shared between threads, so this is not thread-safe. This is a race condition and leads to wrong output when projecting float data onto a uchar texture or vice versa on a multithreaded system. The checks on line 5308 and 5319 are already a race condition. I created this patch which fixes the problem , but I'm not sure if I'm overlooking something. This makes sure reproject_ibuf contains the correct formats *before* the threadpool is started. I replaced the original location of the conversions with BLI_asserts(). That may be overkill? Reviewed By: #sculpt_paint_texture, mont29 Maniphest Tasks: T80859 Differential Revision: https://developer.blender.org/D8936
2020-09-21Various fixes in UI messages.Bastien Montagne
Along some other typos in comments or variable names.
2020-09-21Cleanup: move some paint helpers to ED_ 'namespace'.Bastien Montagne
Those two functions had `BKE_` prefix, were defined in BKE headers, but implemented in ED code, yuck. Moved everything to ED area for now, since those do not look fondamental enough to belong to BKE, and none of their usages requires it currently.
2020-09-21Fix T79373: Forbid painting on linked image from 3DView.Bastien Montagne
As noted by @lichtwerk (thanks), one can have a local object and/or material using a linked image data-block, this case needs some different handling to prevent painting on such linked image. For now, tweak `BKE_paint_proj_mesh_data_check` (eeeek, that name prefix!) to consider paintslots with linked image as 'non-existing'.
2020-09-21Fix T79373: Forbid painting on linked image.Bastien Montagne
There is just no reason to support that kind of useless behavior. Some remote TODO could be to define a process based on liboverride and layers.
2020-09-21Cleanup: Sculpt/Paint ED code: correct return constant types.Bastien Montagne
Mainly use false/true for bool, but also a few others. No change in behavior expected.
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-18Cleanup: Resolve warningsJulian Eisel
Unused variables, missing include for declaration, missing 'static' specifier. Also rename function to match naming convention.
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-18Sculpt: Scale Cloth FilterPablo Dobarro
This filter scales the mesh as it was a softbody, producing folds in the surface. The orientation of the folds can be controlled using the filter axis and orientation. This is an example of a cloth filter that uses deform coordinates instead of forces, but probably it does not make much sense to expose it to the user in a different way and with different parameters. I'll remove FilterCache->enabled_force_axis in a later commit and use always enabled_axis in SCULPT_filter_zero_disabled_axis_components for both forces and deformation filters, so this function can also be used in the mesh filter. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8661
2020-09-18Sculpt: Lower the default cloth deformation constraints strengthPablo Dobarro
The deformation constraints strength were too strong and they were preventing the cloth effects of the brushes with cloth deformation target to create folds properly. This lowers the default, making the simulation follow the deformation in a more relaxed way. I'll make a separate patch to expose this as a property for certain brushes and cloth deformers that may need higher values (like boundary with loop falloff on a low poly mesh), but I think this default will work better for most use cases. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8884
2020-09-18Revert "Fix T79523 Paint Cursor: Wide line not supported on OSX"Clément Foucault
This commit caused regression on some sculpt paint cursors. A better approach is being worked on. This reverts commit 6ade522f277fb74d4691973b7bb55840300043a2.
2020-09-18Fix T80885: Texture paint camera project crashes after undo/redoCampbell Barton
Unmatched ED_image_undo_push_{begin/end}, add doc-strings noting why this is needed. Thanks to @Baardaap for the initial fix.
2020-09-18Fix Brushes with deformation target being affected by sim areasPablo Dobarro
Brushes that target the cloth simulation but are not the cloth brush affect the entire mesh, so they don't have simulation areas and falloff. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8885
2020-09-18Fix bad allocation in mask sculpt gesturesPablo Dobarro
Reviewed By: sergey Differential Revision: https://developer.blender.org/D8886
2020-09-16Fix T79523 Paint Cursor: Wide line not supported on OSXClément Foucault
This replace the use of GPU_line_width by the specialized GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR shader.
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-12Fix remaining GL calls/type preventing from building due to recent cleanupClément Foucault
2020-09-12Cleanup: Remove GLEW dependencies outside of GL moduleClément Foucault
2020-09-12Fix T71605: Crash toggling dynamic topology in background modeCampbell Barton
Support toggling without an undo stack in background mode.
2020-09-10Sculpt: Enable pen pressure for Scrape/Fill Area RadiusPablo Dobarro
This should improve the issue with Scrape accumulation in concave surfaces. When the strength of the brush is higher, the area radius is also bigger, so the scrape plane is more stable preventing it from accumulating displacement in the same area. The Scrape/Fill default presets are also updated to include this functionality. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8821
2020-09-10Fix T79754: Boundary Brush crashing with symmetry enabledPablo Dobarro
When creating the boundaries for the symmetry passess, it could happen that a symmetrical vertex is not found inside the radius of the brush. In that case, the function to initialize a new boundary was called with index -1 (BOUNDARY_VERTEX_NONE), so this function should also check that the initial vertex that is going to be used to find the boundary is a valid index. Reviewed By: sergey Maniphest Tasks: T79754 Differential Revision: https://developer.blender.org/D8860
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-09-07GPU: Rename gpu_extensions to gpu_capabilitiesClément Foucault
This makes more sense as this module has more to it than just GL extensions.
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-07Fix T79914: Grab active vertex using wrong coordinatesPablo Dobarro
This was introduced in the first commit of the cloth brush. In order to support the cloth brush deformations with subsurf modifiers, the sculpt API was changed to return the deformed coordinates from the PBVH instead of the mesh coordinates. When using grab active vertex and rendering the original mesh wireframe it should render the undeformed mesh coordinates when available. Reviewed By: sergey Maniphest Tasks: T79914 Differential Revision: https://developer.blender.org/D8630
2020-09-07Fix Boundary Brush not working with partially hidden meshesPablo Dobarro
Now when a mesh is partially hidden using Face Sets, the open boundary the hidden geometry produces is also detected by the brush. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8819