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-11-11Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-genericHans Goudey
2022-11-09Cleanup: fix types from f04f9cc3d021Chris Blackbourn
2022-11-09Cleanup: add unique_index_table to UvElementMapChris Blackbourn
In anticipation of UV Copy+Paste, we need fast access to indices of unique UvElements. Can also be used to improve performance and simplify code for UV Sculpt tools and UV Stitch. No user visible changes expected. Maniphest Tasks: T77911 See also: D16278
2022-10-14Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-10-13Cleanup: Use correct blenkernel namespace for mesh functionsHans Goudey
2022-10-07Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-10-07Cleanup: Avoid inconsistent naming in mesh topology APIHans Goudey
Mesh corners are called "loops" in the code currently. Avoid diverging naming and just use that convention in some newly added code.
2022-10-03Merge branch 'master' into refactor-mesh-position-genericHans Goudey
2022-09-28Mesh: Add C++ implementaiton of topology mappingsHans Goudey
Because they are friendlier to use in C++ code than the existing mesh mapping API, these mappings from one domain to another were often reimplemented in separate files. This commit moves some basic implementations to a `mesh_topology` namespace in the existing mesh mapping header file. These is plenty of room for performance improvement here, particularly by not using an array of Vectors, but that can come later. Split from D16029
2022-09-23Merge branch 'refactor-mesh-selection-generic' into ↵Hans Goudey
refactor-mesh-position-generic
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-23RenamingsHans Goudey
2022-09-12Start converting mesh positions to a generic attributeHans Goudey
2022-09-05Merge branch 'master' into refactor-mesh-selection-genericHans Goudey
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-08-14ProgressHans Goudey
2022-08-11Mesh: Move hide flags to generic attributesHans Goudey
This commit moves the hide status of mesh vertices, edges, and faces from the `ME_FLAG` to optional generic boolean attributes. Storing this data as generic attributes can significantly simplify and improve code, as described in T95965. The attributes are called `.hide_vert`, `.hide_edge`, and `.hide_poly`, using the attribute name semantics discussed in T97452. 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 by default, 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 the hide status is used. When the flags are removed completely, requirements will decrease when hiding is unused. Further notes: * Some code can be further simplified to skip some processing when the hide attributes don't exist. * The data is still stored in flags for `BMesh`, necessitating some complexity in the conversion to and from `Mesh`. * Access to the "hide" property of mesh elements in RNA is slower. The separate boolean arrays should be used where possible. Ref T95965 Differential Revision: https://developer.blender.org/D14685
2022-08-11Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Add element_map->island_total_uvs. Add element_map->island_total_unique_uvs. Simplify callers based on new members. Add comments. Resolves: D15598
2022-08-11Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Add #bm_uv_ensure_head_table See also: D15598
2022-08-10Cleanup: spellingCampbell Barton
2022-08-08Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Rename vert -> vertex. Add `BM_uv_element_get_head`. See also: D15598
2022-08-08Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
Rename buf -> storage. See also: D15598
2022-08-07Cleanup: refactoring uvislands to prepare for python apiChris Blackbourn
See also: D15598
2022-07-13Fix T99659: Improve UV Island calculation with hidden faces.Chris Blackbourn
Simplify interface, regularize implementation and some light cleanup. See also: T79304 and D15419.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-26Cleanup: remove unused UvVertMap.flagCampbell Barton
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-02-15Cleanup: remove various unused definesCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-07-16Cleanup: Use const qualifier for UV vertex mapSergey Sharybin
2018-07-16Cleanup: More clear naming in UV vertex/element mappingsSergey Sharybin
Also use unsigned short for loop index within a polygon for UV vertex mapping, which matches UV element mapping.
2016-07-21Add BKE_mesh_calc_islands_loop_poly_uvmap and use it in new OSD UV subdiv.Bastien Montagne
Also renamed BKE_mesh_calc_islands_loop_poly_uv to BKE_mesh_calc_islands_loop_poly_edgeseam, to avoid confusion...
2016-07-21BKE mesh mapping: add new BKE_mesh_edge_loop_map_create().Bastien Montagne
Maps edges to all their pair of loops.
2016-05-21BKE Mesh mapping: add 'vert to looptri' mapping generator.Bastien Montagne
2016-04-05Fix UV-Editor crashes w/ over SHRT_MAX UV'sCampbell Barton
2016-03-22Mesh API: add BKE_mesh_vert_edge_vert_map_createCampbell Barton
Handy when you need to reference connected verts directly.
2015-07-23Utility function to get poly -> looptri mappingCampbell Barton
2015-07-20Resolve compiler warning for clangCampbell Barton
2015-07-17Add macro BKE_MESH_TESSTRI_VINDEX_ORDERCampbell Barton
gives the index of a vertex in a looptri
2015-05-17BMesh: don't check winding for uv-vert-mapCampbell Barton
Made link-select separate front/back with projected UV's