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-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
2020-09-05Cleanup: spellingCampbell Barton
2020-09-05GPUTexture: Change texture creation APIClément Foucault
This is to modernize the API: - Add meaningful name to all textures (except DRW textures). - Remove unused err_out argument: only used for offscreen python. - Add mipmap count to creation functions for future changes. - Clarify the data usage in creation functions. This is a cleanup commit, there is no functional change. # Conflicts: # source/blender/gpu/GPU_texture.h
2020-09-05Cleanup: GPUTexture: Remove use of GPU_texture_create_nDClément Foucault
Use creation + update function instead.
2020-09-05GPUTexture: Remove bind to edit callsClément Foucault
This is going to be unecessary after the GPU opengl texture backend refactor. For now add a save/restore mechanism to leave the state untouched. Also remove some calls where the caller would bind to particular binding point and set the shader uniform.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
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-04Fix T80273: Restrict option in weight paint doesn't work with gradientPhilipp Oeser
With the 'Restrict' option, the gradient should be restricted to the assigned vertex, just like the other weight paint tools. Maniphest Tasks: T80273 Differential Revision: https://developer.blender.org/D8761
2020-09-03Sculpt: Face Set Extract OperatorPablo Dobarro
This implements a Face Set Extract operator, which is similar to mask extract. This operator uses a picker to select and Face Set in the mesh and extract the geometry directly to a new object. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8599
2020-09-03Sculpt: Remove unused code in Clay StripsPablo Dobarro
This was doing a matrix inversion per vertex per stroke step and it was unused. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8791
2020-09-03Fix cloth brush not working with anchored strokePablo Dobarro
All brushes except for grab need delta for tip orientation in order to work with anchored stroke, not only snake hook, which is the one that needs it always. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8789
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-09-03Fix T63125: Gpencil: bones cannot be selected in weightpaint modePhilipp Oeser
Some underlying functionality was not ready for greasepencil: - BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist) - BKE_modifiers_is_deformed_by_armature - checks in drawing code - checks in (pose) selection code A couple of changes to make this work: - `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`) - `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) -- (now use new `OB_MODE_ALL_WEIGHT_PAINT`) - `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint` This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode) Reviewed By: campbellbarton Maniphest Tasks: T63125 Differential Revision: https://developer.blender.org/D8483
2020-09-02Fix Cloth Snake Hook brush not using pressurePablo Dobarro
The Snake Hook deformation mode was using the same strength as grab (not supporting pressure), but this deformation mode supports pressure. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8724