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-02-28Fix T85948 Exact boolean crash with some nonplanar ngons.Howard Trickey
Triangulating ngons could fail with the method that was being used: projecting along the dominant normal axis and then using CDT. It could fail if the ngon has self crossings or might be so after the described projection. Switched to using projection along the normal itself, and also to using polyfill which produces some kind of triangulation no matter what in such circumstances. This will also likely be faster if there are a lot of ngons in the meshes, since the exact arithmetic CDT was being used before, and now float arithmetic is used.
2021-02-25BLI: simplify adding an arbitrary value to a resource containerJacques Lucke
With this is becomes easily possible to store a lambda in a resource collector so that it will be freed when the resource collector is freed.
2021-02-25Cleanup: spellingCampbell Barton
2021-02-24Fix T85726 Workbench: Orthographic view is blurryClément Foucault
This was caused by the window_translate_m4 not offsetting the winmat in the right direction for perspective view. Thus leading to incorrect weights. The workbench sample weight computation was also inverted. This fix will change the sampling pattern for EEVEE too (it will just mirror it in perspective view).
2021-02-24Cleanup: spellingCampbell Barton
2021-02-23BLI: new FunctionRef typeJacques Lucke
Using `FunctionRef` is better than using `std::function`, templates and c function pointers in some cases. The trade offs are explained in more detail in code documentation. The following are some of the main benefits of using `FunctionRef`: * It is convenient to use with all kinds of callables. * It is cheaper to construct, copy and (possibly) call compared to `std::function`. * Functions taking a `FunctionRef` as parameter don't need to be declared in header files (as is necessary when using templates usually). Differential Revision: https://developer.blender.org/D10476
2021-02-22Cleanup: unused variableJacques Lucke
2021-02-22Change Exact Boolean modifier to skip round trip through BMesh.Howard Trickey
The Exact modifier code had been written to avoid using BMesh but in the initial release the modifier still converted all Meshes to BMeshes, and then after running the boolean code on the BMeshes, converted the result back to a Mesh. This change skips that. Most of the work here is in getting the Custom Data layers right. The approach taken is to merge default layers from all operand meshes into the final result, and then use the original verts, edges, polys, and loops to copy or interpolate the appropriate custom data layers from all operands into the result.
2021-02-21BLI: cleanup StringRef and Span and improve parameter validationJacques Lucke
Previously, methods like `Span.drop_front` would crash when more elements would be dropped than are available. While this is most efficient, it is not very practical in some use cases. Also other languages silently clamp the index, so one can easily write wrong code accidentally. Now, `Span.drop_front` and similar methods will only crash when n is negative. Too large values will be clamped down to their maximum possible value. While this is slightly less efficient, I did not have a case where this actually mattered yet. If it does matter in the future, we can add a separate `*_unchecked` method. This should not change the behavior of existing code.
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2021-02-17Cleanup: fix compiler warningsBrecht Van Lommel
2021-02-17BLI: use sse2neon to emulate SSE instructions with Arm NeonBrecht Van Lommel
* WITH_CPU_SSE was renamed to WITH_CPU_SIMD, and now covers both SSE and Neon. * For macOS sse2neon.h is included as part of the precompiled libraries. * For Linux it is enabled if the sse2neon.h header file is detected. However this library does not have official releases and is not shipped with any Linux distribution, so manual installation and configuration is required to get this working. Ref D8237, T78710
2021-02-17BLI: add BLI_simd.h header to wrap SSE includesBrecht Van Lommel
In preparation of adding Neon support. Ref D8237, T78710
2021-02-17Cleanup: spellingCampbell Barton
2021-02-15Cleanup: clang tidyJacques Lucke
2021-02-14Cleanup: spellingCampbell Barton
2021-02-14Cleanup: use doxy sectionsCampbell Barton
2021-02-13Cleanup: macro hygiene, use parenthesis around operatorsCampbell Barton
2021-02-12Geometry Nodes: Add operation setting to attribute randomize nodeHans Goudey
This commit adds a drop-down to the attribute randomize node to support a few operations on the values of existing attributes: "Replace/Create" (the existing behavior), "Add", "Subtract", and "Multiply". At this point, the operations are limited by what is simple to implement. More could be added in the future, but there isn't a strong use case for more complex operations anyway, and a second math node can be used. Differential Revision: https://developer.blender.org/D10269
2021-02-11Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-11BLI_math: add mid_v2_v2v2v2Campbell Barton
2021-02-10TBB: fix deprecation warnings with newer TBB versionsBrecht Van Lommel
* USD and OpenVDB headers use deprecated TBB headers, suppress all deprecation warnings there since we have no control over them. * For our own TBB includes, use the individual headers rather than the tbb.h that includes everything to avoid warnings, rather than suppressing all. This is in anticipation of the TBB 2020 upgrade in D10359. Ref D10361.
2021-02-10Merge branch 'blender-v2.92-release'Jacques Lucke
2021-02-10Fix T85514: exact match is not showing up in search menuJacques Lucke
The `get_shortest_word_index_that_startswith` function was not doing what it was supposed to do. This resulted in wrong matches.
2021-02-10Cleanup: typoJacques Lucke
Committing this to the release branch, to avoid merge conflicts with an upcoming fix.
2021-02-10Cleanup: spellingCampbell Barton
2021-02-09Cleanup: spellingCampbell Barton
2021-02-08Forgot to free a bvhtree with previous commit.Howard Trickey
2021-02-07Fix T84493 et al: New Boolean on Suzanne.Howard Trickey
While Boolean is not guaranteed to work if the operands are not volume-enclosing (technically: PWN - piecewise constant winding number), it needs to do something in those cases. This change makes more cases meet user expectations in T84493, T64544, T83403, T82642 (though very slow on that one). The original new boolean code used "generalized winding number" for this fallback; replaced this with code that uses raycasting. Raycasting would have been faster, but for unfortunately also switchd to per-triangle tests rather than per-patch tests since it is possible (e.g., with Suzanne) to have patches that are both inside and outside the other shape. That can make it much slower in some cases, sadly.
2021-02-06UI: Fix Typos in Comments and Docsluzpaz
Approximately 91 spelling corrections, almost all in comments. Differential Revision: https://developer.blender.org/D10288 Reviewed by Harley Acheson
2021-02-06Cleanup: malformed web addresses in commentsCampbell Barton
2021-02-05Cleanup: Use raw string literalSergey Sharybin
Resolves modernize-raw-string-literal Clang-Tidy warning The way warning works is it suggests to use raw literal when overhead of having escape characters is higher than the overhead of having raw literal syntax (talking about code size overhead). This means that the warning will not trigger for "foo\"bar". Differential Revision: https://developer.blender.org/D10322
2021-02-05Cleanup: Use lambda instead of function bindSergey Sharybin
More detailed explanation why it is a preferred way of coding nowadays can be found at https://clang.llvm.org/extra/clang-tidy/checks/modernize-avoid-bind.html Resolves modernize-avoid-bind Clang-Tidy warning. Differential Revision: https://developer.blender.org/D10320
2021-02-05Cleanup: Use transparent functorSergey Sharybin
Resolves modernize-use-transparent-functors Clang-Tidy warning. Differential Revision: https://developer.blender.org/D10323
2021-02-05Cleanup: Clang-tidy modernize-use-default-member-initAnkit Meel
Using assignment syntax as we don't use `{}` initialization yet. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9501
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-02-02Merge branch 'blender-v2.92-release'Robert Guetzkow
2021-02-02Fix T85225: Variable scope in ridged multi-fractal noiseRobert Guetzkow
This patch fixes a bug introduced in rB74188e65028d268af887ab2140e4253087410c1e. The commit incorrectly moved the declaration and intialization of the variable `pwr` inside the loop. Since the value was originally modified in each iteration based on it's previous value and `pwHL` through `pwr *= pwHL`, this change in scope was wrong. It resetted the value in each iteration. This patch moves the declaration of `pwr` outside the loop again. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10258
2021-02-02Merge branch 'blender-v2.92-release'Campbell Barton
2021-02-02creator: add missing '--debug-*' arguments under debugging optionsCampbell Barton
Only print "Other Options" when the heading has content to show.
2021-01-28Fix unused result from mmap() callSergey Sharybin
The unused result was reported by Clang-Tidy 11. It does make sense to check for the failed mmap() calls rather than quietly suppress errors. In this change failures are reported, but application execution is not aborted. This is a bit disputable, but it feels to be a safer thing to do now. It is unclear how to test the code though, as we don't have any tools in-place to simulate read errors. Differential Revision: https://developer.blender.org/D10223
2021-01-27Cleanup: spellingCampbell Barton
2021-01-27Merge remote-tracking branch 'origin/blender-v2.92-release'Ray Molenkamp
2021-01-27Windows: Fix wchar_t truncationRay Molenkamp
BLI_strncpy_wchar_from_utf8 made the assumption that wchar_t is UTF-32 bit regardless of environment, while this holds true on both mac and linux, on windows wchar_t is actually actually UTF-16. This resulted in the upper 16 bits being dropped from from some string conversions and prevented blender from starting when installed in a path with unicode code-points over 0xffff. There was also a fair bit of code duplication between BLI_strncpy_wchar_from_utf8 and BLI_str_utf8_as_unicode_and_size this change essentially removes all logic from BLI_strncpy_wchar_from_utf8 and calls the right function for the right environment. Reviewed By: brecht , Robert Guetzkow Differential Revision: https://developer.blender.org/D9822
2021-01-26Merge branch 'blender-v2.92-release'Sebastian Parborg
2021-01-26Fix T85049: Geometry Nodes: How to handle instances with shear?Sebastian Parborg
Use transform matrices instead of loc, rot, scale variables to store instance transforms. Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10211
2021-01-25Windows: Remove zero terminator from stack traceRay Molenkamp
Important lesson to be learned here, leaving comments is great and in the moment, they usually make sense. Many months later they may not quite make as much sense any more and time will have to be spend to figure out what was meant, all of this would have been averted with a better comment. The zero terminator in this case, I can find no evidence of it being used or relied on at any point. It does however break GTests's `EXPECT_EXIT` macro that stops looking in the output as soon as it sees the zts and doesn't end up looking at the actual assert text being thrown. Which in turn makes the`fcurve_active_keyframe`test fail when run in debug mode on windows.
2021-01-24Cleanup: email address formattingCampbell Barton
Match git style email addresses, ignored by the spell checker.
2021-01-22Merge branch 'blender-v2.92-release'Brecht Van Lommel
2021-01-22Fix T84745: more build errors with TBB 2021Brecht Van Lommel
* tbb::blocked_range moved to a different namespace and since the fix is non-trivial, remove some unused code that used this. * Task group priorities are no longer supported. It's unclear if they are useful at all right now and even set correctly, for now all tasks are equal priority with TBB 2021.