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-01-09Cleanup: remove unused struct membersCampbell Barton
Non-projection painting in the viewport is no longer supported, remove struct members used for this.
2021-01-09Cleanup: use bool arguments & variablesCampbell Barton
2021-01-09Fix UV selection threshold which ignored image aspect and zoom levelCampbell Barton
Selecting UVs wasn't properly scaling based on the zoom or image aspect. This now matches vertex selection in the 3D view.
2021-01-06UndoType: Refactor: replace `use_context` boolean by a bitflag.Bastien Montagne
We will soon need more options here, sinmpler and cleaner to use a bitflag then.
2021-01-06Fix T84202: Sculpt lasso mask crash after remesh.Bastien Montagne
'Caused'/revealed by rBd29a720c45e5: Operators that fully re-create the mesh would previously rely on `sculpt_update_object` called from update code to get required sculpt-specific data layers re-added to the new mesh. Now instead put all code adding data to orig mesh for sculpt purpose into a new util function (`BKE_sculpt_ensure_orig_mesh_data`), and call that function when entering sculpt mode, and from voxel remesher code. This is contonuing effort to more clearly separate orig data from evaluated data handling/usage in sculpt code. TODO: there are likely other code paths that would need to call that new function? Reviewers: @sergey, @pablodp606 Subscribers:
2021-01-06Undo: Further tweak/fixes the 'use context' flag of undo types.Bastien Montagne
Note that this is fairly fragile still, especially in cases like paint cureve undo, which actually does not use context in most cases (and can be called with a NULL context), but do need it in one case. This will need a proper rework at some point.
2021-01-06UndoType: Fix some incinsistencies re context usage flag.Bastien Montagne
`use_context_for_encode` was not properly set regarding actual `encode` code for a few types.
2021-01-06Cleanup/refactor: UndoType: Clarify `use_context` variable.Bastien Montagne
Rename it to mark it is only for `encode` callbacks, fix `encode` callback of text undo to early fail in case it gets a NULL context, add an assert to `BKE_undosys_step_push_with_type` that context is not NULL when undotype requires a valid one. Note that in practice this should not change anything, currently it seems that we always get a valid context in `BKE_undosys_step_push_with_type`?
2021-01-05Cleanup: Undo code: `poll` function.Bastien Montagne
Remove obviously outdated comment, and explictely set `poll` to `NULL` in the one case it is not actually defined (sculpt undo).
2021-01-05Sculpt: use distance threshold for dyntopo symmetrizeCampbell Barton
This was only used for non-dyntopo symmetrize. There is no reason to use a hard-coded value in this case.
2021-01-05Fix T84364: Sculpt symmetrize fails with shape keysCampbell Barton
Use the BMesh symmetrize operator instead of using the modifier code. While we could support shape-keys with the existing code used by the mirror modifier, we'd need to add code-paths for evaluated mesh & bmesh conversion to handle shape-keys differently just for this one case, since we want to avoid copying & processing shape-keys layers for evaluated meshes in general.
2021-01-05BMesh: Add shape-key support to edit-mesh symmetrizeCampbell Barton
Symmetrize now flips shape-keys too since using the un-flipped locations creates an overlapping surface which isn't useful.
2021-01-04Cleanup: correct array size in argumentCampbell Barton
2020-12-29Fix T83439: Sculpt: Radial symmetry combined with mirroring results in ↵Philipp Oeser
texture offsets Looks like this has been wrong since the introduction in rB5505697ac508 10 years ago. To get the proper texture lookup in the mirrored area, first rotate, then translate/flip [instead of the other way around]. Maniphest Tasks: T83439 Differential Revision: https://developer.blender.org/D9897
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-12-24Cleanup: Fix capitalization in various UI stringsYevgeny Makarov
Approximately 195 changes of capitalization to conform to MLA title style. UI labels and property names should use MLA title case, while descriptions should be capitalized like regular prose, generally with only the start of a sentence capitalized. Differential Revision: https://developer.blender.org/D9922
2020-12-23Fix T84002: Sculpt: Masking operations crash if multires is in play.Bastien Montagne
This fixes the main issue there (essentially a followup to rB90e12e823ff0: Fix T81854: crash when undoing switch between sculpt and edit mode). We basically remove more (hopefully all the remaining!) modifications of orig mesh from `sculpt_update_object`, as those done here will not be immediately available in the evaluated data (that specific bug happened because masking data was added to orig mesh there, but not flushed to depsgraph evaluated one). This also goes towards a better separation between handling of evaluated data and orig one. Note that modification of orig mesh data can still happen, e.g. values in some cdlayers, but at least all pointers should now be valid in the evaluated mesh. There are still some issues, e.g. we now get an assert/crash in `multires_reshape_assign_final_coords_from_ccg` when undoing out of the Sculpt mode, presumably because subdiv_ccg data remains unchanged then (and hence still has the `has_mask` flag set), while actual mesh data do not have that cdlayer anymore... This commit also cleans up/simplifies some code, `ED_object_sculptmode_enter_ex` was (indirectly) calling `BKE_sculpt_face_sets_ensure_from_base_mesh_visibility` twice e.g.
2020-12-23Sculpt Undo: Fix broken memory size and potential use of uninitialized ↵Bastien Montagne
variables. That code looked really like a joke tbh... Random reported memory usage is not really that important, but the uninitialized items counts was potentially fairly severe.
2020-12-18UI: Don't use abbreviations in label textYevgeny Makarov
Expand abbreviations for words like "Bright" (instead of "Brightness"), "Premul", "Lib", "Dir", etc. Differential Revision: https://developer.blender.org/D9862
2020-12-16Fix T83856: Sculpt: anchored brushes with spherical falloff ignore topology ↵Philipp Oeser
automasking Anchored brushes with spherical falloff start off with zero radius, thus we have no pbvh nodes on the first brush step. This would prevent initializing the automasking cache [which only happens on the first brush step]. Maniphest Tasks: T83856 Differential Revision: https://developer.blender.org/D9873
2020-12-16Sculpt: Multires Displacement SmearPablo Dobarro
This tool implements smearing for multires displacement over the limit surface, similar to how smearing for colors and topology slide works. When used the displacement values of the vertices "slide" over the topology, creating the effect of smearing the surface detail. As the brush just modifies displacement values instead of coordinates, the total displacement of the affected area doesn't change. This means that this smearing effect can be used multiple times over the same area without generating any artifacts in the topology. When the brush is used with the pinch or expand smear modes, displacement differences are pushed into the same area, creating hard surface effects without pinching the topology. As any other brush that relies on the limit surface (like displacement erasers), this will work better after using apply base. Reviewed By: sergey, JulienKaspar, dbystedt Differential Revision: https://developer.blender.org/D9659
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-12-15Sculpt: Fair Face Sets operation for Face Set EditPablo Dobarro
This implements a mesh fairing algorithm and implements the fair operations for Face Set edit. This edit operations create a smooth as possible geometry patch in the area of the selected Face Set. The mesh fairing algorithm is designed by Brett Fedack for the addon "Mesh Fairing": https://github.com/fedackb/mesh-fairing, with some modifications: - The main fairing function in BKE_mesh_fair.h does not triangulate the mesh. For the test I did in sculpt mode results are good enough without triangulating the topology. Depending on the use and the result quality needed for a particular tool, the mesh can be triangulate in the affected area before starting fairing. - Cotangents loop weights are not implemented yet. The idea is to also expose the vertex and loop weights in a different function in case a tool needs to set up custom weights. This algorithm will also be used to solve the limitations of line project and implement the Lasso Project and Polyline Project tools. It can also be used in tools in other areas of Blender, like Edit Mode or future retopology tools. Reviewed By: brecht Differential Revision: https://developer.blender.org/D9603
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-15Fix T83201: Cloth brush performance regressionPablo Dobarro
The if statement of the dynamic area mode branch should be an else if. When using local mode, this was running both the local and global code. I moved this code to sculpt_cloth and refactored it to use a switch case to prevent this from happening again. Reviewed By: mont29 Maniphest Tasks: T83201 Differential Revision: https://developer.blender.org/D9762
2020-12-15Cleanup: reduce indirect DNA header inclusionCampbell Barton
Remove DNA headers, using forward declarations where possible. Also removed duplicate header, header including it's self and unnecessary inclusion of libc system headers from BKE header.
2020-12-14Cleanup: Fix capitalization in various placesYevgeny Makarov
Approximately 33 changes of capitalization to conform to MLA title style. Differential Revision: https://developer.blender.org/D9796 Reviewed by Julian Eisel
2020-12-11UI: Consistent Range DescriptionsYevgeny Makarov
Unifying range descriptions as a value 'to' a value. Differential Revision: https://developer.blender.org/D9771 Reviewed by Julian Eisel
2020-12-11Cleanup: spelling, expand on FCurve.rna_path docstringCampbell Barton
2020-12-10Sculpt: Elastic deform type for Snake HookPablo Dobarro
This adds deformation types to snake hook and the elastic deformation type. This mode deforms the mesh using a kelvinlet instead of applying the displacement directly inside the brush radius, which is great for stylized shapes sketching. Changes in rake rotation when using elastic are too strong when set to 1, so I'll add a nicer way to support rake rotations with smoother transitions in the future. Reviewed By: sergey, JulienKaspar Differential Revision: https://developer.blender.org/D9560
2020-12-08Spelling: Bit Depth Compound ModifiersYevgeny Makarov
Correct usage of compound modifiers like '32-bit'. Differential Revision: https://developer.blender.org/D9769 Reviewed by Julian Eisel
2020-12-07Fix T81745: Auto Weights fails with Mirror mod + Vertex Groups XSybren A. Stüvel
Fix the Assign Automatic Weights operator in weight paint mode when the Vertex Groups X option is enabled. This issue was probably introduced in rB5502517c3c12 where `me->editflag & ME_EDIT_MIRROR_X` was replaced by either `me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY` or `me->symmetry & ME_SYMMETRY_X`. In this case, the former wasn't working, so I replaced it with the latter.
2020-12-07UI: Fix mistakes in UI messages.Bastien Montagne
2020-12-07Cleanup: spellingCampbell Barton
2020-12-04Cleanup: clang-formatSybren A. Stüvel
Rerun `make format`. No functional changes.
2020-12-04Sculpt: Wet paint area radiusPablo Dobarro
This adds a new property to the sculpt vertex color paint brush to limit the area of the brush that is going to be used to sample the wet paint color. This is exactly the same concept as normal radius and area radius that exist for sculpting brushes for sampling the surface depth and orientation. When working near color hard edges, this allows to prevent the color from the other side of the edge to blend into the wet paint. With 1.0 (the previous default) wet paint radius, as soon as the brush touches one vertex of the other color, the wet paint mix color changes, making it impossible to maintain the border between the two colors. Reviewed By: sergey, dbystedt, JulienKaspar Differential Revision: https://developer.blender.org/D9587
2020-12-04Sculpt: Allow inverting the Erase Displacement mesh filterPablo Dobarro
When inverting erase displacement the filter can increase the displacement over the limit surface. After using apply base, this can be used as an alternative intensify details as it usually gives better results. This is the same concept as smoothing inverting to intensify details. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9679
2020-12-01Fix sculpt transform incorrently flipping displacement in Y and Z axisPablo Dobarro
These functions were only checking the X axis for flipping the displacement for a symmetry area depending on the initial position of the pivot. This affects transform and any other tools that transform vertices and applies symmetry based on areas (the pose brush, for example). Reviewed By: sergey Differential Revision: https://developer.blender.org/D9654
2020-11-30Cleanup: Use "region" for ARegion variable namesHans Goudey
As proposed in T74432 and already implemented in several commits, "region" is the preferred name for `ARegion` variables, rather than any variant of "ar". This commit changes a few "ar" variables that have popped up over time and also adjusted names of variants like "arnew".
2020-11-27Sculpt: Refactor transform code to allow incremental updatesPablo Dobarro
This adds support for incremental updates in the sculpt transform code. Now tools can define if they need the displacement applied for the original coordinates or incrementally. This is needed for features like elastic transform or cloth deformation target in the transform tool. No functional changes. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9547
2020-11-26Fix Edit Face Set operator not being cancelled when the cursor is not over ↵Pablo Dobarro
the mesh If the cursor is not over the mesh, the operator was still using the last Face Set ID updated by the drawing cursor code when the cursor was over the mesh. This now cancels the operator instead of modifying a Face Set that will look random to the user. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9545
2020-11-18Cleanup: clarify precedence of operationsCampbell Barton
2020-11-18Fix use of operator flag as booleanCampbell Barton
Error in cb9de95d61b32f90788875f20e046095bb6310ad
2020-11-12Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-12Sculpt: fix face set extract clicking in empty spacePhilipp Oeser
Should not do anything in that case. ref T82615 Maniphest Tasks: T82615 Differential Revision: https://developer.blender.org/D9532
2020-11-12Sculpt: use ESC key in addition to RMB to cancel eyedropperPhilipp Oeser
This is more in line to other eyedropper usages throughout blender. Affected operators: - Sample Dyntopo detail - Extract Face Set (as reported in T82615) ref T82615 Maniphest Tasks: T82615 Differential Revision: https://developer.blender.org/D9531
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-12Merge branch 'blender-v2.91-release'Jeroen Bakker
2020-11-12Merge branch 'blender-v2.91-release'Jeroen Bakker
2020-11-12Fix T82093: Sampled Colors Mismatch When Painting (Partial)Jeroen Bakker
When painting in the image editor on data images (Non-color, Raw) the color mismatched between the sampled color and the actual effect that the painting has on the image. The root cause is that the sampling is color managed, but the painting still uses a fixed color management pipeline with a lot of assumptions. Due to recent changes the drawing of the image editor is color managed, but the painting isn't what made these changes show up. This patch is a work-a-round so that the sampled colors and the effect the paint has on the texture matches. This isn't the correct solution as that would be to migrate all the painting tools to use proper color management. Reviewed By: Pablo Dobarro Differential Revision: https://developer.blender.org/D9411