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-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-13Undo System: avoid redundant decoding on undoCampbell Barton
In most cases the undo system was loading undo steps twice. This was needed since some undo systems (sculpt, paint, text) require stepping out of the current undo step. Use a flag to limit this to the undo systems that need it. This improves performance for other undo systems. This gives around 1.96x speedup in edit-mesh for high-poly objects. Reviewed by: mont29 Ref D11893
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-05Cleanup: spelling, punctuationCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Cleanup: Use const variables for object's evaluated meshHans Goudey
Generally the evaluated mesh should not be changed, since that is the job of the modifier stack. Current code is far from const correct in that regard. This commit uses a const variable for the reult of `BKE_object_get_evaluated_mesh` in some cases. The most common remaining case is retrieving a BVH tree from the mesh.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Fix T89221: Sculpt tools symmetry failing with non symmetrical meshesPablo Dobarro
SCULPT_nearest_vertex_get expects a distance, not a distance squared. This should make symmetry work as expected, but it still can fail if the mesh topology is not completely symmetrical. Reviewed By: JacquesLucke Maniphest Tasks: T89221 Differential Revision: https://developer.blender.org/D11642
2021-06-23Cleanup: reformat trailing comments that caused line wrappingCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-15BLI: use explicit task isolation, no longer part of parallel operationsBrecht Van Lommel
After looking into task isolation issues with Sergey, we couldn't find the reason behind the deadlocks that we are getting in T87938 and a Sprite Fright file involving motion blur renders. There is no apparent place where we adding or waiting on tasks in a task group from different isolation regions, which is what is known to cause problems. Yet it still hangs. Either we do not understand some limitation of TBB isolation, or there is a bug in TBB, but we could not figure it out. Instead the idea is to use isolation only where we know we need it: when holding a mutex lock and then doing some multithreaded operation within that locked region. Three places where we do this now: * Generated images * Cached BVH tree building * OpenVDB lazy grid loading Compared to the more automatic approach previously used, there is the downside that it is easy to miss places where we need isolation. Yet doing it more automatically is also causing unexpected issue and bugs that we found no solution for, so this seems better. Patch implemented by Sergey and me. Differential Revision: https://developer.blender.org/D11603
2021-06-13Cleanup: redundant initializationCampbell Barton
These were limited to obvious cases. Some less obvious cases were kept as refactoring might make them necessary in future.
2021-06-10Cleanup: spelling in commentsCampbell Barton
2021-06-08BLI: support disabling task isolation in task poolJacques Lucke
Under some circumstances using task isolation can cause deadlocks. Previously, our task pool implementation would run all tasks in an isolated region. Now using task isolation is optional and can be turned on/off for individual task pools. Task pools that spawn new tasks recursively should never enable task isolation. There is a new check that finds these cases at runtime. Right now this check is disabled, so that this commit is a pure refactor. It will be enabled in an upcoming commit. This fixes T88598. Differential Revision: https://developer.blender.org/D11415
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-06-01Cleanup: correct sculpt quat argument sizeCampbell Barton
2021-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
2021-06-01Fix buffer overrun in paint_line_strokes_spacingCampbell Barton
Error in 87cafe92ce2f99d8da620b80e1c26f8078554f93
2021-05-21Cleanup: quiet -Warray-parameter warnings from GCC11Campbell Barton
Some warnings remain that require larger changes.
2021-05-18Merge branch 'blender-v2.93-release'Pablo Dobarro
2021-05-18Fix T88230: Properly handle Face Set visibility in Expand Face Sets editingPablo Dobarro
Expand is not expected to update the visibility state of the PBVH, only the Face Sets IDs. If visibility updates are made accidentally, PBVH rendering breaks. In order for this to work properly, the following fixes are needed: - Expand should always check for active component before attempting to modify a Face Set ID - Expand should always check the visibility state on original_face_sets, as it is the array that contains the visiblilty state that corresponds with the current state used for PBVH rendering. This implies that after any modification done by Expand, the visibility state of ss->face_sets and expand_cache->original_face_sets should match (like in any other tool that does not modify visibility). - Expand should never modify the Face Set ID of a poly that is hidden in expand_cache->original_face_sets. - When deleting an ID, hidden Face Sets should be skipped when picking IDs for content filling. This avoids introducing hidden IDs back into the visible geometry even after updating its visibility state. Reviewed By: JulienKaspar, JacquesLucke Maniphest Tasks: T88230 Differential Revision: https://developer.blender.org/D11243
2021-05-14Cleanup: clang-formatCampbell Barton
2021-05-14Fix sculpt neighbor iterator not taking visibility into accountPablo Dobarro
Sculpting tools are designed to ignore hidden geometry and behave like hidden geometry does not exist. When getting the neighbors of a vertex, now this takes into account hidden geometry to avoid returing neighbors which connected edge is not visible. This should make corner cases of a lot of tools work properly, especially when working in low poly meshes when is common to have a single face loop hidden. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D11007
2021-05-14Fix Sculpt tools showing the cursor of the previous active brushPablo Dobarro
When using a tool that is not a brush, the previously used brush preset will still be active in the tool settings, so the cursor will draw its custom reviews. This checks if the current active tool is a brush before drawing its previews. If it is not a brush tools, it draws a default white cursor. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9418
2021-05-12Merge branch 'blender-v2.93-release'Pablo Dobarro
2021-05-12Fix wrong loop count in Sculpt Expand codePablo Dobarro
Introduced when refactoring the function in 8815e3e3303933e2cc662f15fc9d11ca68a47d16
2021-05-10Merge branch 'blender-v2.93-release'Pablo Dobarro
2021-05-10Fix T88060: Expand freezing when deleting a Face Set with multiple loose partsPablo Dobarro
When checking if the mesh has only one Face Set only the current active component for expand needs to be checked. Otherwhise other components that won't be modified by Expand that contain other IDs will be taken into account, making the Face Set deletion go into an infinite loop. Reviewed By: JacquesLucke Maniphest Tasks: T88060 Differential Revision: https://developer.blender.org/D11169
2021-05-07GPencil: Add Bracket keymaps to increase/decrease brush sizeAntonio Vazquez
This add the missing keymaps. Requested by Jukien Kaspar. Differential Revision: https://developer.blender.org/D11183
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-04-27Fix T87474: Face Set visibility updates failing with single face loopPablo Dobarro
Face set visibility is already flushed to all mesh elements in the right way in SCULPT_visibility_sync_all_face_sets_to_vertices, calling BKE_mesh_flush_hidden_from_verts is legacy code from the previous visibility system that was causing the vertex visibility to take priority over face sets. When hidding a single loop, all vertices of those faces are still visibile, so this line was tagging all loop faces visible. This was leaving mesh/face set visibiltiy in an unconsistent state. Reviewed By: JacquesLucke Maniphest Tasks: T87474 Differential Revision: https://developer.blender.org/D11008
2021-04-27Fix T87596: Pose brush not using automasking optionsPablo Dobarro
Automasking cache factors were missing in the pose brush deform function. Reviewed By: JacquesLucke Maniphest Tasks: T87596 Differential Revision: https://developer.blender.org/D11005
2021-04-27Fix T87815: Sculpt: Curve stroke scene spacing not workingPhilipp Oeser
This was just not implemented for curve strokes when world spacing was introduced in rB87cafe92ce2f. Now do the equivalent of what was done in said commit in 'paint_space_stroke', now in 'paint_line_strokes_spacing' as well. Maniphest Tasks: T87815 Differential Revision: https://developer.blender.org/D11098
2021-04-08Cleanup: spellingCampbell Barton
2021-04-08Fix T87267: Texture Paint stencil texture not drawingPhilipp Oeser
Typo in {rBafcfc6eb0842}. Maniphest Tasks: T87267 Differential Revision: https://developer.blender.org/D10915
2021-04-02Fix T84520: Make the different weight paint code paths exclusive to each otherSebastian Parborg
Before this change, you could have the new sculpt symmetry code and the older weight paint symmetry code active at the same time. This would lead to users easily trashing their weigh paint data if they were not careful when switching between modes. Now the specific weight paint symmetry code is an exclusive toggle so the user can't accidentally mirror strokes and vertex groups at the same time. This also paves the way of supporting Y and Z symmetry in the future for weight groups mirroring if we decide to add it in the future. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D10426
2021-03-28Fix T86060: Texture Paint clone tool misleading texture UICampbell Barton
For projection painting tools besides the `DRAW` tool: - Don't show the texture from viewport stencil drawing. - Don't show the texture panel. Based on D10564 by @lichtwerk with own changes.
2021-03-18Cleanup: spellingCampbell Barton
2021-03-15Comments: notes on sculpt/image undo looping logicCampbell Barton
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-12Sculpt: Mask Init operatorPablo Dobarro
This operator initializes mask values for the entire mesh. It supports different modes for initializing those values, and more will be added in the future. The initial version supports generating a random mask per vertex, Face Sets or loose parts. These masks are useful for introducing variations in the model using the filters (both shapes and colors). Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10679
2021-03-12Fix T82532: Sculpt fails to redo the first sculpt session strokeCampbell Barton
Sculpt undo relied on having a mode-changing undo step to properly apply changes. However this isn't the case with startup files or when mixing global undo steps with sculpt (see T82851, also fixed). Undo stepping logic follows image_undosys_step_decode_undo.
2021-03-12Cleanup: incorrect doxy section titleCampbell Barton
Also correct typo.
2021-03-10Cleanup: spellingCampbell Barton
2021-03-09Fix crash in boundary brush after refactorPablo Dobarro
A missing continue in this loop. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10610
2021-03-09Sculpt: Init Face Sets by Face Sets boundariesPablo Dobarro
This adds an extra option to the Face Sets Init operator to initialize individual Face Sets based on the current Face Sets boundaries. In particular, this is useful for splitting the patterns created by Expand into individual Face Sets for further editing. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10608
2021-03-09Sculpt: 'Unifiy' Dyntopo Detail Size operatorsPhilipp Oeser
Prior to rB99a7c917eab7, Shift + D was used to set detail size for both constant and relative detail (using radial control). The commit added an improved operator for doing this for constant detail (showing the triangle grid representation), but left the user without a shortcut to do this for relative detail. Interestingly rB99a7c917eab7 only changed this for the Blender keymap, the Industy Compatible keymap still has the "old" entry. This patch changes both keymaps to have both entries. For user experience, the real change here is to have both available on one 'primary' shortcut (Shift+D), the improved 'dyntopo_detail_size_edit' operator will now act on all possible cases. If it deals with constant detail, it acts as before, if it deals with relative detail etc, it will fallback to the "old" way of doing it via radial control instead. I assume this adresses what was stated in rB99a7c917eab7: "Deciding if both detail sizes can be unified needs a separate discussion" Also, move dyntopo_detail_size_edit to sculpt_detail.c Fixes T83828 Maniphest Tasks: T83828 Differential Revision: https://developer.blender.org/D9871
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.