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-08-30Attributes: Improve custom data initialization optionsHans Goudey
When allocating new `CustomData` layers, often we do redundant initialization of arrays. For example, it's common that values are allocated, set to their default value, and then set to some other value. This is wasteful, and it negates the benefits of optimizations to the allocator like D15082. There are two reasons for this. The first is array-of-structs storage that makes it annoying to initialize values manually, and the second is confusing options in the Custom Data API. This patch addresses the latter. The `CustomData` "alloc type" options are rearranged. Now, besides the options that use existing layers, there are two remaining: * `CD_SET_DEFAULT` sets the default value. * Usually zeroes, but for colors this is white (how it was before). * Should be used when you add the layer but don't set all values. * `CD_CONSTRUCT` refers to the "default construct" C++ term. * Only necessary or defined for non-trivial types like vertex groups. * Doesn't do anything for trivial types like `int` or `float3`. * Should be used every other time, when all values will be set. The attribute API's `AttributeInit` types are updated as well. To update code, replace `CD_CALLOC` with `CD_SET_DEFAULT` and `CD_DEFAULT` with `CD_CONSTRUCT`. This doesn't cause any functional changes yet. Follow-up commits will change to avoid initializing new layers where the correctness is clear. Differential Revision: https://developer.blender.org/D15617
2022-06-08Attributes: Use names instead of layers for some functionsHans Goudey
This mirrors the C++ attribute API better, separates the implementation of attributes from CustomData slightly, and makes functions simpler, clearer, and safer. Also fix an issue with removing an attribute caused by 97712b018df71c meant the first attribute with the given type was removed instead of the attribute with the given name.
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
2021-12-03Cleanup: move public doc-strings into headers for 'bmesh'Campbell Barton
Some minor improvements to doc-strings too. Ref T92709
2021-03-18Cleanup: spellingCampbell Barton
2021-02-10Cleanup: update old commentsCampbell Barton
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
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-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: pass arrays const where possibleCampbell Barton
2020-08-07Cleanup: declare arrays arrays where possibleCampbell Barton
2020-07-03Cleanup: BMesh, 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/bmesh` module. No functional changes.
2020-07-01Transform: generalized custom-data correction supportGermano Cavalcante
Support custom-data correction based on surrounding geometry for all transformation modes of the mesh transform operators. The is the same logic used in Vert and Edge Slide. In order not to change the current default behavior, this property does not affect Vert and Edge Slide modes.
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
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-03-27Cleanup: style, use braces for bmeshCampbell Barton
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-06Cleanup: add trailing commas to structsCampbell Barton
Needed for clang formatting to workaround bug/limit, see: T53211
2018-12-14Cleanup: naming (mean -> median) see T47811Campbell Barton
2018-09-02Cleanup: comment blocksCampbell Barton
2018-06-04Cleanup: strip trailing space in bmesh moduleCampbell Barton
2018-01-10Task scheduler: Use const qualifier in callbacks for parallel rangeSergey Sharybin
2018-01-10Task scheduler: Use restrict pointer qualifierSergey Sharybin
Those pointers are never to be aliased, so let's be explicit about this and hope compiler does save some CPU ticks.
2018-01-09Task scheduler: Use single parallel range function with more flexible functionSergey Sharybin
Now all the fine-tuning is happening using parallel range settings structure, which avoid passing long lists of arguments, allows extend fine-tuning further, avoid having lots of various functions which basically does the same thing.
2018-01-09Task scheduler: Get rid of extended version of parallel range callbackSergey Sharybin
Wrap all arguments into TLS type of argument. Avoids some branching and also makes it easier to extend things in the future.
2017-11-26Removing OMP: bmesh_interp.cBastien Montagne
Performances tests on this one are quite surprising actually... Parallelized loop itself is at least 10 times quicker with new BLI_task code than it was with OMP. And subdividing e.g. a heavy mesh with 3 levels of multires (whole process) takes 8 seconds with new code, while 10 seconds with OMP one. And cherry on top, BLI_task code only uses about 50% of CPU load, while OMP one was at nearly 100%! In fact, I suspect OMP code was not properly declaring outside vars, generating a lot of uneeded locks. Also, raised the minimum level of subdiv to enable parallelization, tests here showed that we only start to get significant gain with subdiv levels of 4, below single threaded one is quicker.
2017-10-24Fix T53143: Knife Crash after Grid FillCampbell Barton
BM_ELEM_INTERNAL_TAG flag wasn't ensured to be cleared.
2017-01-11Add mid_v3_v3_array function and remove redundant functionsLuca Rood
Other than implementing a `mid_v3_v3_array` function, this removes `cent_tri_v3` and `cent_quad_v3` in favor of `mid_v3_v3v3v3` and `mid_v3_v3v3v3v3` respectively. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2459
2016-03-05Cleanup: quiet -Wcomma, cast to void where neededCampbell Barton
2015-11-04Add missing check for multires interpolationCampbell Barton
2015-11-03Cleanup: de-duplicate quad_coord & resolve_quad_uv_v2Campbell Barton
2015-11-03Edge/Vert slide: improve multires interpolationCampbell Barton
Need to re-interpolate the entire face, not just the connected loop. Also add BM_face_interp_multires()
2015-11-03BMesh: add BM_loop_interp_multires_ex which takes cached varsCampbell Barton
Avoid recalculating face centers (for each loop) when interpolating multires.
2015-07-01Cleanup: use cross_v2v2 functionCampbell Barton
2015-05-05Math Lib: rename fill_*, to copy_*Campbell Barton
matching convention for fixed length api, eg: copy_v3_fl
2015-04-28Cleanup: const correctnessCampbell Barton
2015-04-25Cleanup: use 8 space indent for multi-line argsCampbell Barton
2015-02-23Fix mismatch (missing 'const' to mactch funcs declarations).Bastien Montagne
Was breaking windows compile, reported by bdancer over IRC, thanks. Also, quite some annoying 'unused vars' warnings (debug-only vars).
2015-02-23CustomData: const correctnessCampbell Barton
2015-02-23Edge/Vert Slide: avoid redundant loop angle callsCampbell Barton
No need to calculate loop angle for each layer
2015-02-23Error in last commitCampbell Barton
Accidentally left in malloc/free
2015-02-23Fix error in recent vert/edge-slide commitsCampbell Barton
`CustomData_bmesh_interp_n` was expecting the 'dest' arg not to have its offset applied. This was a bit confusing since the source args have it applied, and in some cases we only have the destination with the offset.
2015-02-23CustomData: const correctness for interp()Campbell Barton
2015-02-16Vert/Edge Slide: better UV interpolationCampbell Barton
Ignore faces which the sliding vert is outside of.
2015-02-13BMesh: avoid ugly macro for loop interpolationCampbell Barton
Compiler optimizes to practically the same output
2015-02-11UV Island support for vertex & edge slideCampbell Barton
This ensures slide with `Correct UVs` enabled, keeps UV's (any loop custom-data) contiguous. Adds 2 key functions `BM_vert_loop_groups_data_layer_create` and `BM_vert_loop_groups_data_layer_merge` They work by collecting matching loop custom-data around the vertices loop-fan, and merging the custom-data after edits are made. Thanks to @mont29 for review!