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-20Cleanup: Make function static, use const object argumentHans Goudey
Also use `const Curve *` instead of `const Object *`, since the function works at a lower level than objects anyway. And also remove another unused function. Since this section of code for converting curves to meshes will likely be replaced, it's nicer to see which parts actually remain used at this point.
2021-07-20Cleanup: Remove unused functionHans Goudey
2021-07-07Cleanup: update filename referencesCampbell Barton
2021-07-01Cleanup: split normal calculation into it's own fileCampbell Barton
Normals now includes many functions including normal splitting & custom normal manipulation split this into it's own file to centralize related functions.
2021-06-28Cleanup: Use const argumentsHans Goudey
2021-06-20Cleanup: make BKE_mesh_loops_to_tessdata a static functionCampbell Barton
2021-06-20Mesh: optimize object mode face tessellationCampbell Barton
- Multi-thread BKE_mesh_recalc_looptri. - Add BKE_mesh_recalc_looptri_with_normals, this skips having to calculate normals for ngons. Exact performance depends on number of faces, size of ngons and available CPU cores. For high poly meshes the isolated improvement to BKE_mesh_recalc_looptri in my tests was between 6.7x .. 25.0x, with the largest gains seen in meshes containing ngons with many sides. The overall speedup for high poly meshes containing quads and triangles is only ~20% although ngon heavy meshes can be much faster.
2021-06-18Cleanup: rename test_index_face -> BKE_mesh_mface_index_validateCampbell Barton
2021-06-18Cleanup: remove unused MFace custom-data utilitiesCampbell Barton
Remove: - BKE_mesh_loops_to_mface_corners - BKE_mesh_tangent_loops_to_tessdata
2021-06-18Cleanup: move mesh tessellation into it's own fileCampbell Barton
This matches BMesh which also has tessellation in it's own file. Using a separate file helps with organization when extracting code into smaller functions.
2021-06-17Cleanup: split BKE_mesh_copy_settings into two functionsCampbell Barton
- BKE_mesh_copy_parameters_for_eval to be used for evaluated meshes only as it doesn't handle ID user-counts. - BKE_mesh_copy_parameters is a general function for copying parameters between meshes.
2021-05-17Merge branch 'blender-v2.93-release'Brecht Van Lommel
2021-05-17Fix T86278: vertex color baking not working with modifiersBrecht Van Lommel
As in the old Blender Internal baking code, this still relies on there being a good mapping to the original vertices.
2021-04-30Cleanup: correct commentCampbell Barton
2021-01-09Cleanup: use bool arguments & variablesCampbell Barton
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-12-14Blenkernel: move DerivedMesh.c to c++Jacques Lucke
Required changes to make it compile with clang tidy: * Use c++ includes like (e.g. climits instead limits.h). * Insert type casts when casting from void* to something else. * Replace NULL with nullptr. * Insert casts from int to enum. * Replace designed initializers (not supported in C++ yet). * Use blender::Vector instead of BLI_array_staticdeclare (does not compile with C++). * Replace typedef statements. Ref T83357.
2020-11-06Merge branch 'blender-v2.91-release' into masterPhilipp Oeser
2020-11-06Fix T81997: Subsurf Optimal Display sticks after object conversionPhilipp Oeser
When using Optimal Display, some edges are not flagged `ME_EDGEDRAW` | `ME_EDGERENDER`. When the modifier is applied through the UI in the modifier stack this is not an issue because the `modifyMesh` callback is run with `MOD_APPLY_TO_BASE_MESH` (this will effectively turn of Optimal Display). When converting to mesh though, this will just get an evaluated mesh (where the edge flags are still the same as with the subdivision modifier). Now ensure every edge is flagged to draw after conversion. Maniphest Tasks: T81997 Differential Revision: https://developer.blender.org/D9331
2020-10-27Cleanup: Use const for PointCloud variableHans Goudey
2020-10-19Volumes: new Volume to Mesh modifierJacques Lucke
This modifier is the opposite of the recently added Mesh to Volume modifier. It converts the "surface" of a volume into a mesh. The "surface" is defined by a threshold value. All voxels with a density higher than the threshold are considered to be inside the volume, while all others will be outside. By default, the resolution of the generated mesh depends on the voxel size of the volume grid. The resolution can be customized. It should be noted that a lower resolution might not make this modifier faster. This is because we have to downsample the openvdb grid, which isn't a cheap operation. Converting a mesh to a volume and then back to a mesh is possible, but it does require two separate mesh objects for now. Reviewers: brecht Differential Revision: https://developer.blender.org/D9141
2020-10-09BKE: parallelize BKE_mesh_calc_edgesJacques Lucke
`BKE_mesh_calc_edges` was the main performance bottleneck in D9141. While openvdb only needed ~115ms, calculating the edges afterwards took ~960ms. Now with some parallelization this is reduced to ~210ms. Parallelizing `BKE_mesh_calc_edges` is not entirely trivial, because it has to perform deduplication and some other things that have to happen in a certain order. Even though the multithreading improves performance with more threads, there are diminishing returns when too many threads are used in this function. The speedup is mainly achieved by having multiple hash tables that are filled in parallel. The distribution of the edges to hash tables is based on a hash (that is different from the hash used in the actual hash tables). I moved the function to C++, because that made it easier for me to optimize it. Furthermore, I added `BLI_task.hh` which contains some light tbb wrappers for parallelization. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D9151
2020-10-09CleanUp: Introduce `eMeshBatchDirtyMode` enumJeroen Bakker
It used to be an int mode.
2020-10-09Revert "CleanUp: Introduce `eMeshBatchDirtyMode` enum"Jeroen Bakker
This reverts commit 0796807720882731cdb70be144aa182e9b0b9ee5.
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-10-07CleanUp: Introduce `eMeshBatchDirtyMode` enumJeroen Bakker
It used to be an `int mode`.
2020-09-18Cleanup: remove unused navmesh codePhilipp Oeser
These were leftovers from the BGE removal. Differential Revision: https://developer.blender.org/D8862
2020-09-17Pointclouds: support mesh <-> pointcloud in convert operatorPhilipp Oeser
Just converts verts to points and vice versa. Materials and Attribute layers are preserved (so for example if you set custom radii on the pointcloud, convert to mesh, then convert back to pointcloud, this will be preserved). Also not add a Radius layer by default (it is still added and filled when adding a pointcloud object from the menu), a global Radius property that will be used if there is no radius attribute can be added later. A Radius attribute can also be added in the pointcloud data properties (and filled via python). This will also add a new utility function that copies materials between datablocks: BKE_id_materials_copy ref T75717 Differential Revision: https://developer.blender.org/D7391
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
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-08-02Cleanup: pass const matricesCampbell Barton
Also order return matrices last.
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-06-18Fix T65986: Inaccurate center of mass, calculating mesh centerCampbell Barton
Use a median center of polygons as an initial value for volume center calculation since the volume accumulation quickly generates very large numbers that become inaccurate if the geometry is too far from it's current center.
2020-06-10Cleanup: move BKE_mesh_wrapper functions into own headerCampbell Barton
2020-06-10Mesh: utility functions to access wrapped mesh coordinatesCampbell Barton
2020-05-25Mesh: skip conversion from edit-mesh to mesh in edit-modeCampbell Barton
This resolves a performance regression in 2.8x where every edit-mode update performed an edit-mesh to mesh conversion. Now the conversion will be lazily initialized if/when it's required. New BKE_mesh_wrapper_* functions abstract over mesh data access. Currently only edit-mesh and regular meshes are supported. In the future sub-surface meshes may be supported too.
2020-03-17Cleanup: use more descriptive variable name for the data-maskCampbell Barton
Make it explicit this data mask is added to the default mask.
2020-03-06Cleanup: Mesh: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2020-02-26Cleanup: reduce CDDM use, remove unused function callsCampbell Barton
2020-02-07Cleanup: use of 'unsigned'Campbell Barton
- Replace 'unsigned' used on it's own with 'uint'. - Replace 'unsigned const char' with 'const uchar'.
2020-01-30Fix T65146: Curve Texture Coordinates in Cycles and Eevee differClément Foucault
Remove the use UV for mapping option.
2019-09-23Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-23Cleanup: remove unimplemented texture space rotation variablesBrecht Van Lommel
2019-09-23Cleanup: remove Mesh.bb and Curve.bb, no reason for these to be persistentBrecht Van Lommel
These were only strictly valid for texture space calculation, don't store them since they should not be used after that. Only store a flag to indicate if the auto texture space has been evaluated. In the future it might make sense to store bounding boxes at the mesh level to speed up bounding box computation for multiple objects using the same mesh, but then it will need to be implemented differently.
2019-09-21Revert "Modifiers: every modifier now copies mesh settings, fixing texture ↵Brecht Van Lommel
space issues" This reverts commit e7a514369fe700dcc5a1fe433c8f709ed9595ded, it introduces a bug in selection in edit mode. Fixes T70103: can't select extruded Vertex Ref T64739
2019-09-19Modifiers: every modifier now copies mesh settings, fixing texture space issuesBrecht Van Lommel
Modifier stack evaluation would copy mesh settings other than mesh topology automatically, outside of the individual modifier evaluation. This leads to hard to understand code, and makes it unclear which settings are available in following modifiers, and which only after the entire stack is evaluated. Now every modifier is responsible to ensure the mesh it outputs preserves materials, texture space and other settings, or alters them as needed. Fixes T64739: incorrect texture space for various modifiers Differential Revision: https://developer.blender.org/D5808
2019-09-09Added function to calculate the total area of a mesh.Sebastian Parborg
2019-09-07Cleanup: includes in headersCampbell Barton
Forward declare structs where possible.
2019-08-27Fix multires modifier using too much memory outside of sculpt modeBrecht Van Lommel
This reduce memory usage by about 25% in object mode for multires meshes.