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
2020-11-17BLI_rect: add a float version of the 'pad' functionCampbell Barton
2020-11-16Fix T81271: Fix crash in BLI_gzopen on WindowsRobert Guetzkow
Previously the return value of `ufopen` wasn't checked and if it failed, `NULL` was passed into `fclose()` which resulted in a crash. This patch avoids this by returning from `BLI_gzopen` when the file cannot be created. Reviewed By: sebbas, iss Differential Revision: https://developer.blender.org/D9576
2020-11-16Fix T82736, Exact Boolean fail with repeated subtraction of same object.Howard Trickey
Two problems were fixed. One, the code for dissolving vertices left a face around if dissolving a vertex would leave less than three vertices. Instead, the face should be deleted. Two, with transformations like "rotate 180 degrees", this should be no problem with exact, but the current transformation matrix has very small non-zero entries where it shouldn't. Cleaning the transformation matrix makes it more likely that user expectations about coplanar faces will be fulfilled.
2020-11-08Fix T81651, exact boolean modifier incorrect if operand hidden.Howard Trickey
The code was trying to ignore hidden geometry when doing boolean, which is correct when used as a tool, but not when a modifier. Added a "keep_hidden" argument to bmesh_boolean to distinguish the two cases. Also fixed a bug when the tool is used with hidden geometry that is attached to unhidden geometry that is deleted by the operation.
2020-11-07Fix T82301, exact boolean fail on cube with bump.Howard Trickey
The code for determining coplanar clusters had a bug where it would miss some triangles. The fix for now is to just put triangles in the cluster if their bounding boxes overlap. This works but maybe makes clusters bigger then they have to be. I'll follow this commit with work on making the CDT routine faster when using exact arithmetic. Also removed a lot of unused code, and added some new intersect performance tests.
2020-10-31Fix new boolean performance bug.Howard Trickey
The code that decided to use a faster double version of plane side testing forgot to take an absolute value, so half the time the exact code was being used when it was unnecessary.
2020-10-29Fix blend_color_interpolate_byte returning wrong alpha in certain casePhilipp Oeser
When the combined alpha [the 'tmp' variable having the mixfactor applied already] - reached zero it was handled like a no-op (for the alpha as well) and just copied the first color. So e.g mixing 255/255/255/255 with 0/0/0/0 with a factor of 1.0 gave alpha of 255, which looks wrong. cases where tmp gets zero: src1 alpha:0 src2 alpha:whatever mixfactor 0.0 src1 alpha:whatever src2 alpha:0 mixfactor 1.0 src1 alpha:0 src2 alpha:0 mixfactor whatever Now set alpha to zero in that case. ref T81914 Maniphest Tasks: T81914 Differential Revision: https://developer.blender.org/D9357
2020-10-27BLI_rect: add resize_x/y functionsCampbell Barton
Without this, it's inconvenient to resize a single axis and doesn't read very well.
2020-10-26Fix own previous commit re testing of `BLI_rel_path`.Bastien Montagne
Windows would need its own version of those tests, for now just disabling them on that platform.
2020-10-26Fix T81421: "Saving As..." a blend file with a Script node file path filled ↵Bastien Montagne
with 1023 symbols crashes Blender. Usual lack of protection against buffer overflows when manipulating strings. Also add some basic tests for `BLI_path_rel`.
2020-10-25Fix T81999, Boolean Exact+Self Difference fails.Howard Trickey
A cell with winding number > 1 for the second operand was incorrectly included in the output.
2020-10-21Cleanup: Clang-tidy readability-named-parameterAnkit Meel
No functional change.
2020-10-20Cleanup: Clang-tidy silence readability-non-const-parameterAnkit Meel
This is a false alarm, `getFileSystemRepresentation` changes the return value argument. So used `NOLINTNEXTLINE`.
2020-10-19Spelling: MiscellaneousHarley Acheson
Corrects 34 miscellaneous misspelled words. Differential Revision: https://developer.blender.org/D9248 Reviewed by Campbell Barton
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-10-16Cleanup: spellingCampbell Barton
2020-10-16Windows: Fix build issue on windowsRay Molenkamp
TBB includes Windows.h which defines a min/max macro leading to issues when you want to use std::min and std::max. This change prevents Windows.h from defining them sidestepping the issue.
2020-10-14BLI_ghash_performance_test: Fix memory leaksAnkit Meel
Reviewed By: mont29 Differential Revision: https://developer.blender.org/D9210
2020-10-14Cleanup: multi-line comment blocksCampbell Barton
2020-10-12BLI: support looking up a key from a set or adding it when not existantJacques Lucke
2020-10-10Cleanup: spellingCampbell Barton
2020-10-10Cleanup: remove unnecessary commentsCampbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-10-09Cleanup: alias: use const, remove unused variable.Ankit Meel
`targetIsDirectory` slipped through the code review of {D6679}/{rBafb1a64ccb81}. `BLI_is_dir` exists to check for directory status of a file. Remove some `else-after-return`s. Use `r_` prefix for return value arguments, and move it to the end in the list of arguments.
2020-10-09Fix New Boolean bug that left some stray vertices.Howard Trickey
The routine to find dissolvable vertices had a check to ensure that the vertex was exactly in line with the two neighbors. I have convinced myself that this check is unneccesary (it was failing with only a 1e-9 difference from 0 on a cross check), so have removed it.
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-10-08T81340: UBSan: load of value .. not valid for GPU enum typeAnkit Meel
The underlying type of the enum cannot be fixed here due to its usage in C code. All the values possible in the width of the underlying type are not valid for an enum. Only 0 to (2*max - 1) if all enumerators are unsigned. So the macro asks for the biggest value among the //listed// ones. If any enumerator C is set to say `A|B`, then C would be the maximum. (2*max-1) is used as the mask. The warnings (for each enum modified in this commit): GPU_vertex_buffer.h:43:1: runtime error: load of value 4294967291 which is not a valid value for type 'GPUVertBufStatus' https://github.com/llvm/llvm-project/commit/1c2c9867 Ref T81340 Reviewed By: fclem Differential Revision: https://developer.blender.org/D9067
2020-10-06BLI: escape double quotes in dot exportJacques Lucke
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-10-02Cleanup: trailing spaceCampbell Barton
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-30Cleanup: use angle-brackets for email addressesCampbell Barton
This is already the most widely used convention. Use this so `make check_spelling_c` will ignore all email addresses.
2020-09-30Cleanup: sort cmake file listsCampbell Barton
2020-09-22Fix T80444: Triangle-Triangle intersection regression in 2.90Germano Cavalcante
The problem is due to lack of precision with small and coplanar triangles. Also, triangles that have vertices with the same coordinate are at the threshold of the intersection. We could add an epsilon to consider the minimum distance for intersection. But that would add a lot of overhead to the code. The solution used is to increase precision using doubles.
2020-09-21Fix T80899: Crash on editing multiple UVs of multiple different objects at ↵Sebastian Parborg
the same time The issue was two fold. First something sets the loop element tag and doesn't clear it before the UV code in question tries to use the tags. Added a sanity clear to make sure that it operates on a clean tag state. The next one was that the UV maps in question had quite a few points that had zero length UV loop edges. This would lead to division by zero. Reviewed By: Jeroen Bakker, Brecht Differential Revision: http://developer.blender.org/D8967
2020-09-20Fix (unreported) wrong definition of `ssize_t` for windows.Bastien Montagne
Since at least MSVC2010 there is a `SSIZE_T` available for windows, use it to typedef `ssize_t` on this platform.
2020-09-20Fix a wrong return type (float instead of double) in double2.hhHoward Trickey
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-09-18Cleanup: remove unused global locks from BLI_threadsCampbell Barton
2020-09-17Tests: bundle tests for some modules in their own executablesBrecht Van Lommel
The ffmpeg, guardedalloc and blenlib are quite isolated and putting them in their own executable separate from blender_test is faster for development than linking the entire blender_tests executable. For Cycles, this also bundles all the unit tests into one executable. Ref T79958 Differential Revision: https://developer.blender.org/D8714
2020-09-17CMake: clean up setting of platform specific linker flagsBrecht Van Lommel
Set flags directly on the target, and use common function for all cases. This refactoring helps with the next commit for test executables. Ref D8714
2020-09-16Fix (unreported) buffer overflow in BLI_system_cpu_brand_string helper.Bastien Montagne
Since this buffer is used as an array of 12 32bits integers, and C++ string expect a NULL-terminated C-string, we need an extra char to ensure last one is always NULL. See D8906. Thanks to @brecht for noting this one too.
2020-09-13Apply patch D8816, from Zachary(AFWS) for collection boolean operand.Howard Trickey
Also added code so that exact solver does the whole collection at once. This patch allows users to use a collection (as an alternative to Object) for the boolean modifier operand, and therefore get rid of a long modifier stack.
2020-09-12BLI: Fix bitscan_forward_uint64 unix implementationClément Foucault
2020-09-12Cleanup: missing-variable-declarations warningCampbell Barton
2020-09-11Cleanup: make formatJacques Lucke
2020-09-11Cleanup: spelling, correct commentsCampbell Barton
2020-09-10Cleanup: Fix bad spelling in previous commit.Ray Molenkamp
Thanks for @deadpin for noticing!
2020-09-10Cleanup: Update doc string for BLI_getenvRay Molenkamp
The reason for this functions existence was poorly documented