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-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
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-27Fix T89330 Exact Boolean fails on a simple model.Howard Trickey
The problem was an optimization I put in to triangulate quads. It was wrong if the quad, after projecting onto a 2d plane, was not convex. Handling quads the same as other faces fixes the bug. Unfortunately, this will slow down Exact Boolean when the input has many quads (the usual case, of course). Will attempt to fix that with a later change, but for now, this at least restores correctness.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-25Fixes a warning where dst array size was wrong in theFabian Schempp
signiture of BLI_str_format_attribute_domain_size. Reviewer: Hans Goudey (Hoogly Boogly) Differential Revision: https://developer.blender.org/D11710
2021-06-25Cleanup: Clang formatHans Goudey
2021-06-25Spreadsheet: Dataset region for spreadsheet editorFabian Schempp
This patch adds a left aligned sidebar to the spreadsheet editor. This Sidebar can be used to navigate the geometry component types and attribute domains. It also provides a quick overview of domain sizes. It replaces the two dropdowns in the regions header. Next step will be to add the domain cycling shortcut using the CTRL + mouse wheel. Reviewer: Dalai Felinto (dfelinto), Julian Eisel (Severin), Hans Goudey (HooglyBoogly). Differential Revision: https://developer.blender.org/D11046
2021-06-24Cleanup: compiler warnings with clangBrecht Van Lommel
* Mark either all or no class methods with override * Don't use zero sized array since it has a different size in C and C++. Using a little more memory here is not significant. * Don't use deprecated mechanism to mark private GSet members in clang just like we don't for MSVC, it warns even for simple zero initialization.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Cleanup: clang-tidy quiet equals-default, nullptr warningsCampbell Barton
2021-06-23Cleanup: suppress clang-tidy warningsCampbell Barton
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-22Minor cleanup to previous commit introducing `BLI_math_time`.Bastien Montagne
Forgot to address latest review comments, sorry for the noise.`:wq
2021-06-22Add initial `BLI_math_time` with a 'seconds decompose' function.Bastien Montagne
Allows to decompose a given amount of seconds into a random set of days/hours/minutes/seconds/milliseconds values. Also add matching test. Differential Revision: https://developer.blender.org/D11581
2021-06-21Fix T89291: Objects with rotation deltas don't rotate in correct axesGermano Cavalcante
Quaternion correction was not implemented and Euler values were being incorrectly combined.
2021-06-21Cleanup: swap top/bottom args to planes_from_projmatCampbell Barton
X & Z were ordered min/max, where as Y was max/min.