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
2022-10-12Merge remote-tracking branch 'origin' into sculpt-devJoseph Eagar
2022-10-08Set operator poll message when vertex group is lockedColin Basnett
Differential Revision: https://developer.blender.org/D16190
2022-10-05Merge remote-tracking branch 'origin' into sculpt-devJoseph Eagar
2022-10-04Cleanup: replace UNUSED macro with commented args in C++ codeHans Goudey
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
2022-10-01Merge remote-tracking branch 'origin' into sculpt-devJoseph Eagar
2022-09-25Cleanup: remove redundant double parenthesisCampbell Barton
2022-09-23Mesh: Move selection flags to generic attributesHans Goudey
Using the attribute name semantics from T97452, this patch moves the selection status of mesh elements from the `SELECT` of vertices, and edges, and the `ME_FACE_SEL` of faces to generic boolean attribute Storing this data as generic attributes can significantly simplify and improve code, as described in T95965. The attributes are called `.select_vert`, `.select_edge`, and `.select_poly`. The `.` prefix means they are "UI attributes",so they still contain original data edited by users, but they aren't meant to be accessed procedurally by the user in arbitrary situations. They are also be hidden in the spreadsheet and the attribute list. Until 4.0, the attributes are still written to and read from the mesh in the old way, so neither forward nor backward compatibility are affected. This means memory requirements will be increased by one byte per element when selection is used. When the flags are removed completely, requirements will decrease. Further notes: * The `MVert` flag is empty at runtime now, so it can be ignored. * `BMesh` is unchanged, otherwise the change would be much larger. * Many tests have slightly different results, since the selection attribute uses more generic propagation. Previously you couldn't really rely on edit mode selections being propagated procedurally. Now it mostly works as expected. Similar to 2480b55f216c Ref T95965 Differential Revision: https://developer.blender.org/D15795
2022-09-18Merge remote-tracking branch 'origin' into sculpt-devJoseph Eagar
2022-09-09Cleanup: move return arguments last, use `r_` prefixCampbell Barton
Also use '_num' suffix instead of '_tot'.
2022-09-09Fix T96787: Edit mode normalize fails to respect locked groupsNate Rupsis
Add BKE_object_defgroup_flip_map_unlocked which excludes locked groups from the flip-map. Reviewed By: zanqdo, campbellbarton Ref D15317
2022-09-07Cleanup: Tweak naming for recently added mesh accessorsHans Goudey
Use `verts` instead of `vertices` and `polys` instead of `polygons` in the API added in 05952aa94d33eeb50. This aligns better with existing naming where the shorter names are much more common.
2022-09-06Fix weight paint smoothing with vertex selection.Alexander Gavrilov
Broken in rB2480b55f216c3137 by incorrectly converting a boolean expression. There is also another suspect expression nearby.
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-use-bool-literals]Clément Foucault
2022-08-31Cleanup: break before the default case in switch statementsCampbell Barton
While missing the break before a default that only breaks isn't an error, it means adding new cases needs to remember to add the break for an existing case, changing the default case will also result in an unintended fall-through. Also avoid `default:;` and add an explicit break.
2022-08-26Cleanup: spelling in comments, formatCampbell Barton
2022-08-14Cleanup: Move object_vgroup.c to C++Hans Goudey