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-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Depsgraph: support flushing parameters without a full COW updateCampbell Barton
Avoid computationally expensive copying operations when only some settings have been modified. This is done by adding support for updating parameters without tagging for copy-on-write. Currently only mesh data blocks are supported, other data-blocks can be added individually. This prepares for changing values such as edit-mesh auto-smooth angle in edit-mode without duplicating all mesh-data. The benefit will only be seen when the user interface no longer tags all ID's for copy on write updates. ID_RECALC_GEOMETRY_ALL_MODES has been added to support situations where non edit-mode geometry is modified in edit-mode. While this isn't something user are likely to do, Python scripts may change the underlying mesh. Reviewed By: sergey Ref D11377
2021-06-23Fix T89249: incorrect mesh validate error with zeroed vertex normalsCampbell Barton
It's not an error for centered vertices to have a zero normal.
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-18Cleanup: replace 'unsigned in' with 'uint'Campbell Barton
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
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-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-24Cleanup: Break early in normal validationSebastian Parborg
Before we would continue checking normal array values even if we knew that the normal array would be conidered valid. Break early to avoid excess iterations and make the code more clear what it is doing. No functional changes.
2020-09-22Cleanup: reduce variable scopesJacques Lucke
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-08-07Cleanup: enable and silence Clang-Tidy readability-function-sizeSybren A. Stüvel
Enable Clang-Tidy's `readability-function-size` rule and add a few `NOLINT` markers to explicitly silence warnings for three functions. These functions are huge and would IMO benefit from splitting up, but are hard to without intimate knowledge of the code. At least by enabling the rule, we can start tweaking the values and refactoring other functions that bubble up as being too long/complex. No functional changes.
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-08-03Mesh: correct negative material indices when validatingCampbell Barton
Fixes corrupt mesh from T79451.
2020-05-12Fix T76514: Invalid geometry in Alembic crashes BlenderSybren A. Stüvel
Even though {T76514} is caused by invalid geometry, and thus technically constitutes a bug in the software that created the Alembic file, I would like Blender not to crash on importing such a file. The error in the Alembic file consists of invalid mesh loops, where consecutive loops refer to the same vertex. The `BKE_mesh_validate()` can actually correct these errors, so this commit focuses on two things: - Letting Blender survive the situation until the mesh is loaded, and - Detecting the error so that `BKE_mesh_validate()` can be called only when necessary. This ensures there is only a minimal impact on performance when loading actually valid data. Differential Revision: https://developer.blender.org/D7703 Reviewed By: JacquesLucke
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-02-11Fix T56108: Crash editing corrupted vertex groupsCampbell Barton
While the file in this report had corrupted values, this is avoidable without adding any extra overhead. Use unsigned vertex group indices since we don't need negative values, this is an alternative to checking they aren't negative in many places. Vertex group values over INT_MAX is still considered invalid, so any accidental unsigned wrapping won't be silently ignored.
2020-01-06Fix BKE_mesh_validate_arrays invalidating face selectionmano-wii
Use `totpoly` instead of `totface`. The original code was written for non-bmesh case and likely missed this update.
2019-10-10Fix T70617: mesh.from_pydata() misses first edge if there are facesCampbell Barton
2019-07-25Fix crash validating mesh polygons with invalid loop-startCampbell Barton
Add check for negative loop-start, fixes crash validating test file from T67605.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell 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-04-14Cleanup: doxy commentsCampbell Barton
Use doxy references to function and enums, also correct some names which became out of sync.
2019-03-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
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-02-01Logging: Use CLOG for blenkernelCampbell Barton
Part of D4277 by @sobakasu
2019-01-26Cleanup: blank lines over doxy headersCampbell Barton
2019-01-03Cleanup: preprocessor indentationCampbell Barton
2018-12-12Merge branch 'master' into blender2.8Campbell Barton
2018-12-12Cleanup: use colon separator after parameterCampbell Barton
Helps separate variable names from descriptive text. Was already used in some parts of the code, double space and dashes were used elsewhere.
2018-12-07Depsgraph: Remove duplicated sets of recalc/update flagsSergey Sharybin
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
2018-12-03Fix T57858: Add validation callback to CustomData layers.Bastien Montagne
Our mesh validation was only checking cd layout so far, not their actual data. While this might only be needed for a few types, this is a required addition for things like imported UVs, else we have no way to avoid nasty things like NANs & co. Note that more layer types may need that callback, time will say. For now added it to some obvious missing cases...
2018-10-24Fix T57366: Mesh.from_pydata invalid loose-edge stateCampbell Barton
2018-10-18Cleanup: Remove more #if 0 blocksJacques Lucke
Continuation of https://developer.blender.org/D3802 Reviewers: brecht Differential Revision: https://developer.blender.org/D3808
2018-09-25Modifiers: use Mesh instead of DerivedMesh for explode.Sebastian Parborg
Differential Revision: https://developer.blender.org/D3718
2018-09-24Merge branch 'master' into blender2.8Brecht Van Lommel
2018-09-24Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2018-09-19BLI_utildefines: rename pointer conversion macrosCampbell Barton
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-09-19Merge branch 'master' into blender2.8Campbell Barton
2018-07-13Merge branch 'master' into blender2.8Campbell Barton
2018-07-13Cleanup: right shift argumentsCampbell Barton
2018-07-01Merge branch 'master' into blender2.8Campbell Barton
2018-07-01RNA: use bool for boolean RNA typesCampbell Barton
We were using int's for bool arguments in BKE, just to avoid having wrapper functions.
2018-06-27Cleanup: remove some more DM usages...Bastien Montagne
2018-05-16Add BKE_mesh_is_validMai Lavelle
Non modifying version of `BKE_mesh_validate`, mirrors `DM_is_valid` more closely. Will be used in port of `mesh_calc_modifiers` from `DerivedMesh` to `Mesh`.