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-23Fix: avoid creating improper rotation matrixJacques Lucke
This might change the rotation of some instances after a Curve to Points. Unfortunately, there is not much we can do about that, the math before was just wrong. The forward and up axis stayed the same though. Differential Revision: https://developer.blender.org/D12006
2021-07-23Another slight increase in speed for Delaunay CDT.Howard Trickey
When the new "need_ids" flag is false and the output type is not one of the valid BMesh kinds, there is no need to propagate even a dummy id to all of the faces.
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-21Fix incorrect use of BLI_assert with error stringsCampbell Barton
Some asserts were never raised because of invalid checks.
2021-07-21Fix bug in assert in delaunay test.Howard Trickey
Assert was trying to say x coords of arcs lined up, and didn't do that.
2021-07-20Cleanup: fix clang-tidy warning readability-qualified-autoSybren A. Stüvel
No functional changes.
2021-07-20Cleanup: fix clang-tidy readability-else-after-returnSybren A. Stüvel
No functional changes
2021-07-20Cleanup: fix clang-tidy warning modernize-use-nullptrSybren A. Stüvel
No functional changes.
2021-07-20Cleanup: use single back-tick quoting in commentsCampbell Barton
While doxygen supports both, conform to our style guide. Note that single back-tick's are already used in a majority of comments.
2021-07-20Cleanup: use doxygen style parameters in noise.cCampbell Barton
These used their own ad-hoc syntax.
2021-07-20Cleanup: added const keyword to BLI_dlrbTree search functions.Jeroen Bakker
2021-07-20Fix crash in delaunay C interface test.Howard Trickey
The test forgot to set the new need_ids field, which luckily exposed a bug in the C api for delaunay when that field is false. Fixed the bug and the test, and added a test for the need_ids false case.
2021-07-20Cleanup: reserve C++ comments for disabled codeCampbell Barton
Use C comments for plain text.
2021-07-20Cleanup: spellingCampbell Barton
2021-07-20Cleanup: Clang formatAaron Carlisle
2021-07-18Make it optional to track input->output mapping in delaunay_2d_calc.Howard Trickey
Some uses of delaunay_2d_calc don't need to know the original verts, edges, and faces that correspond to output elements. This change adds a "need_ids" value to the CDT input spec, default true, which tracks the input ids only when true. The python api mathutils.geometry.delaunay_2d_cdt gets an optional final bool argument that is the value of need_ids. If the argument is not supplied, it is true by default, so this won't break old uses of the API. On a sample text test, not tracking ids save about 30% of the runtime. For most inputs the difference will not be so dramatic: it only really kicks in if there are a lot of holes.
2021-07-18Speed up Delaunay raycast.Eric Abrahamsson
From Erik Abrahamsson, this uses parallel loops for raycasting. It speeds up one example with many crossings of a bezier curve, from 0.68s to 0.28s.
2021-07-18Greatly improve speed of Delaunay when have a lot of holes.Howard Trickey
Using part of a patch from Erik Abrahamsson, this replaces the use of linked lists for original id tracking by Sets. I had thought that the lists were unlikely to grow to more than a few elements, but when the mesh has a lot of holes (whose original ids go *outside* the hole, and therefore, most of the mesh), this assumption can be very wrong. On a Text regression test, the time went from 11.67s to 0.16s with this fix. I also tested to make sure that Boolean didn't slow down with this, and found it actually had a very slight speedup. Using Sets exposed a dependency on the ordering of the items in the id lists, luckily caught by a mesh intersect regression test, so fixed that.
2021-07-16Cleanup: reduce variable scope in task_iterator.cCampbell Barton
Would have prevented the error in 15cdcb4e9085c3cf35528c2f7e559955b4ff531a.
2021-07-16Fix error using uninitialized state in BLI_task_parallel_mempoolCampbell Barton
Single threaded operation used the state before it had variables written into it. Error in 15cdcb4e9085c3cf35528c2f7e559955b4ff531a.
2021-07-16Cleanup: remove redundant parenthesesCampbell Barton
2021-07-15Cleanup: improve comments, remove debug printfCampbell Barton
2021-07-15Cleanup: use raw strings, quiet clang-tidy warningsCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-15BLI_task: add a callback to initialize TLSCampbell Barton
Useful when TLS requires it's own allocated structures.
2021-07-15BLI_memarena: support merging memory arenasCampbell Barton
Useful when thread-local storage has it's own memory arena containing data which is kept after the multi-threaded operation has finished.
2021-07-13Cleanup: Use correct _WIN32/64 defines for MSVCJesse Yurkovich
Docs: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros Differential Revision: https://developer.blender.org/D11460
2021-07-12Blenlib: Add BLI_assert_msg() for printing an extra string if the assert failsJulian Eisel
It always bothered me that we'd do the `BLI_assert(... || !"message")` trick to print a message alongside the assert, while it should be trivial to have a way to pass an extra string as additional argument. This adds `BLI_assert_msg()` with a second argument for a message. E.g.: ``` BLI_assert_msg( params->rename_id == NULL, "File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile."); ``` On failure this will print like this: ``` 0 Blender 0x00000001140647a3 BLI_system_backtrace + 291 [...] 13 Blender 0x00000001092647a6 main + 3814 14 libdyld.dylib 0x00007fff203d8f5d start + 1 BLI_assert failed: source/blender/editors/space_file/file_ops.c:2352, file_directory_new_exec(), at 'params->rename_id == ((void*)0)' File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile. ``` Reviewed by: Sybren Stüvel, Jacques Lucke, Sergey Sharybin, Campbell Barton Differential Revision: https://developer.blender.org/D11827
2021-07-09Fix a compiler warning on Windows for Exact Boolean.Howard Trickey
For some reason, the Windows compiler didn't like the static function being used in the parallel_reduece.
2021-07-09Cleanup: use 'uint' for BLI_arrayCampbell Barton
2021-07-09BLI_array: add BLI_array_deduplicate_ordered utility & testsCampbell Barton
2021-07-08BLI: avoid calling deleted copy constructor in some compilersJacques Lucke
Previously, this did not compile in VS 2017, because `new T(initializer_())` would try to call the copy constructor of `T`. Now, `initializer_` will construct the `T` inplace.
2021-07-08Cleanup: spellingCampbell Barton
2021-07-08CMake: add missing headers, sort file listsCampbell Barton
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-06Various Exact Boolean parallelizations and optimizations.Erik Abrahamsson
From patch D11780 from Erik Abrahamsson. It parallelizes making the vertices, destruction of map entries, finding if the result is PWN, finding triangle adjacencies, and finding the ambient cell. The latter needs a parallel_reduce from tbb, so added one into BLI_task.hh so that if WITH_TBB is false, the code will still work. On Erik's 6-core machine, the elapsed time went from 17.5s to 11.8s (33% faster) on an intersection of two spheres with 3.1M faces. On Howard's 24-core machine, the elapsed time went from 18.7s to 10.8s for the same test.
2021-07-05Fix performance regression in Exact boolean due to exact triangulation.Howard Trickey
Went back to using Blender's polyfill for triangulation, which is much faster (time for a 3.1M face boolean went from 103s to 48s). Had to put in detection for the case that needs the exact triangulator (bug T86805), and also a fix for non-convex quads (bug T89330).
2021-07-05Cleanup: spelling, punctuationCampbell Barton
2021-07-05BLI: wrap more features off tbb::enumerable_thread_specificJacques Lucke
* Make the wrapper enumerable. * Support an initializer function.
2021-07-05BLI: add conversion constructor for destruct_ptrJacques Lucke
This allows converting between different `destruct_ptr` types (which is just a `std::unique_ptr` with a custom deleter). The most common use case is to convert from a derived type to the type of the base class.
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-07-02Copy Transforms: implement Remove Target Shear and more Mix options.Alexander Gavrilov
This constraint can be naturally viewed as a prototype for a future 4x4 matrix math node (or subset thereof), since its basic semantics already is matrix assignment. Thus it makes sense to add math options to this constraint to increase flexibility in the meantime. This patch adds support for several operations that would be useful: - An option to remove shear in the incoming target matrix. Shear is known to cause issues for various mathematical operations, so an option to remove it at key points is useful. Constraints based on Euler like Copy Rotation and Limit Rotation already have always enabled shear removal built in, because their math doesn't work correctly with shear. In the future node system shear removal would be a separate node (and currently Limit Rotation can be used as a Remove Shear constraint). However removing shear from the result of the target space conversion before mixing (similar to Copy Rotation) has to be built into Copy Transforms itself as an option. - More ways to combine the target and owner matrices. Similar to multiple Inherit Scale modes for parenting, there are multiple ways one may want to combine matrices based on context. This implements 3 variants for each of the Before/After modes (one of them already existing). - Full implements regular matrix multiplication as the most basic option. The downside is the risk of creating shear. - Aligned emulates the 'anti-shear' Aligned Inherit Scale mode, and basically uses Full for location, and Split for rotation/scale. (This choice already existed.) - Split Channels combines location, rotation and scale separately. Looking at D7547 there is demand for Split Channels in some cases, so I think it makes sense to include it in Copy Transforms too, so that the Mix menu items can be identical for it and the Action constraint. Differential Revision: https://developer.blender.org/D9469
2021-07-02Cleanup: spelling in commentsCampbell Barton
2021-07-01BLI_linklist_stack: use cast to prevent warnings when used in C++Campbell Barton
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-06-29Cleanup: clang-tidyCampbell Barton
2021-06-28Cleanup: Add function to create a CurveEval from a nurbs listHans Goudey
Sometimes the current spline list isn't part of the original curve, like when using the deformed control points, etc. This will be helpful in the curve modifier stack.
2021-06-28BLI: improve enum operatorsJacques Lucke
* Use unsigned integer types for bit operations. * Use 64 bit integer instead of 32 bit. * Support scoped enumes (aka `enum class`) by adding some more casts.
2021-06-28BLI_rand: support for randomizing bitmapsPiotr Makal
Add utility functions: - BLI_bitmap_randomize - BLI_rng_shuffle_bitmap Part of D11685