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-12-08Fix unexpected "/" path after normalizing empty directory pathJulian Eisel
Caused problems in the Asset Browser branch when passing an empty path. The function shouldn't blindly add a slash but sanity-check the input parameters first.
2020-12-07Cleanup: partial Clang-Tidy modernize-loop-convertSybren A. Stüvel
Modernize loops by using the `for(type variable : container)` syntax. Some loops were trivial to fix, whereas others required more attention to avoid semantic changes. I couldn't address all old-style loops, so this commit doesn't enable the `modernize-loop-convert` rule. Although Clang-Tidy's auto-fixer prefers to use `auto` for the loop variable declaration, I made as many declarations as possible explicit. To me this increases local readability, as you don't need to fully understand the container in order to understand the loop variable type. No functional changes.
2020-12-06Reorder fields in boolean's ITT_value to save memory.Howard Trickey
2020-12-05Add more timing hooks for boolean.Howard Trickey
2020-12-04Cleanup: Clang-Tidy, modernize-use-usingSybren A. Stüvel
Replace `typedef` with `using` in C++ code. In the case of `typedef struct SomeName { ... } SomeName;` I removed the `typedef` altogether, as this is unnecessary in C++. Such cases have been rewritten to `struct SomeName { ... };` No functional changes.
2020-12-04Cleanup: Clang-Tidy, modernize-deprecated-headersSybren A. Stüvel
No functional changes.
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-12-02BLI: add missing constJacques Lucke
2020-12-02Functions: add float2 cpp typeJacques Lucke
This also adds a hash function for `float2`, because `CPPType` expects that currently.
2020-11-30Fix T83196: bad matrix to quaternion precision near 180 degrees rotation.Alexander Gavrilov
Adjust the threshold for switching from the base case to trace > 0, based on very similar example code from www.euclideanspace.com to avoid float precision issues when trace is close to -1. Also, remove conversions to and from double, because using double here doesn't really have benefit, especially with the new threshold. Finally, add quaternion-matrix-quaternion round trip tests with full coverage for all 4 branches. Differential Revision: https://developer.blender.org/D9675
2020-11-28Speed up finding patch components in new boolean.Howard Trickey
By checking if a cell has already been processed in the finding patch component code, an enormous speedup happens. This only will be noticeable if there are lots of patches, and some cells with a large number of patches.
2020-11-28Speedups for finding cells in new boolean.Howard Trickey
In case where there are coplanar instersections where each part has a lot of triangles, the finding-cells algorithm was very inefficient. This uses a Set instead of a Vector to keep track of a cell's patches, avoids going through all patch x patch combinations, avoids going through all patches to renumber after a merge, and merges smaller patch-sixe cells into larger ones. All this reduces the time to find cells in the cited case by a factor of 10.
2020-11-28Fix T83023: incorrect shape of cyclic F-Curve with only two points.Alexander Gavrilov
The equation solver didn't handle the one unknown case correctly.
2020-11-27Add performance timing to mesh_boolean.cc.Howard Trickey
You can uncomment the PERFDEBUG define to get timings.
2020-11-25Fluid Particles: fix viscoelastic spring threading crash again after D7394.Alexander Gavrilov
Since D6133 fluid particle code uses thread local storage to collect springs created during a time step before adding them to the actual spring array. Prior to the switch to TBB there was a single finalize callback which was called on the main thread, so it could use psys_sph_flush_springs and insert the new entries into the final buffer. However in D7394 it was replaced with a reduce callback, which is supposed to be thread safe and have no side effects. This means that the only thing it can safely do is copy entries to the other temporary buffer. In addition, careful checking reveals that the 'classical' solver doesn't actually add springs, so reduce isn't needed there. Differential Revision: https://developer.blender.org/D9632
2020-11-25Nodes: deduplicate ping pong math operationJacques Lucke
The formula did not change. The only side effect of this change should be that the compositor node now does not divide by zero in some cases.
2020-11-24Speedups for new boolean. Better hash function for verts.Howard Trickey
The existing hash function didn't work well with Set's method of masking to the lower bits, because many verts have zeros in the lower bits. Also, replaced VectorSet with Set for Vert deduping.
2020-11-22Previous commit forgot to guard some things with #ifdef WITH_GMP.Howard Trickey
2020-11-21Improve speed of Constrained Delaunay Triangulation with exact arith.Howard Trickey
By using floating point filters, the speed improves by a factor of 2 to 10. This will help speed up some cases of the Exact Boolean modifier. Changed the interface of mpq2::isect_seg_seg to not return mu, as it was not needed and not calculating it saved 15% time.
2020-11-20Cleanup: spellingCampbell Barton
2020-11-17Merge branch 'blender-v2.91-release'Campbell Barton
2020-11-17BLI_rect: add a float version of the 'pad' functionCampbell Barton
2020-11-16Merge branch 'blender-v2.91-release'Robert Guetzkow
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-16Cleanup: clang-tidyCampbell Barton
2020-11-16Merge branch 'blender-v2.91-release'Howard Trickey
Bring in exact boolean fix.
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-13BLI_math: add floor_power_of_10, ceil_power_of_10Campbell Barton
Add utility functions to get the floor/ceiling of a float value to the next power of 10.
2020-11-11UI Code Quality: Convert Outliner Blender File mode to new tree buiding designJulian Eisel
See https://developer.blender.org/D9499. Also: * Add `space_outliner/tree/common.cc` for functions shared between display modes. * I had to add a cast to `ListBaseWrapper` to make it work with ID lists. * Cleanup: Remove internal `Tree` alias for `ListBase`. That was more confusing than helpful.
2020-11-10MSVC: Fix build warningRay Molenkamp
If a define of NOMINMAX was made before BLI_task.hh was included, the compiler would emit a warning C4005: 'NOMINMAX': macro redefinition warning, to work around this only define it if it is not already defined, and only undefine it if we were the ones that made the define earlier.
2020-11-09Cleanup: fix wrong merge, remove extra unique_ptr.Ankit Meel
Mistakes added in 3cb4c513080ebeead7c5629a7f0503fae9513803 and bec1765340c3c13f002882ce147762e4c38ed2c6 Reviewed By: sergey Differential Revision: https://developer.blender.org/D9514
2020-11-09Cleanup: fix some clang tidy issuesJacques Lucke
2020-11-09Cleanup: clang-formatCampbell Barton
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-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-07Merge new boolean fix from blender-v2.91-release.Howard Trickey
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-11-07Noise: fix uninitialized variable warning.Ankit Meel
Mistake in 74188e65028d
2020-11-07Cleanup: move plane array intersection into a functionCampbell Barton
Also add check to ensure a point isn't occluded by it's own plane, which could happen if a small epsilon values are passed in.
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-06Cleanup: Clang-Tidy, modernize-make-uniqueSergey Sharybin
2020-11-06Cleanup: Clang-Tidy, modernize-use-bool-literalsSergey Sharybin
2020-11-06Cleanup: Clang-Tidy, readability-redundant-member-initSergey Sharybin
2020-11-06Fix uninitialized valueAaron Carlisle
Own mistake in rB74188e65028d268af887ab2140e4253087410c1e
2020-11-06Cleanup: doxygen commentsCampbell Barton
2020-11-06Cleanup: use ELEM macro (>2 args)Campbell Barton
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-11-06Cleanup: use bool argument in BLI_noiseCampbell Barton
2020-11-06Cleanup: BLI_noiseCampbell Barton
Use common prefix as this collided with existing API's (eg BLI_voronoi). Also expand some non-obvious abbreviations: - 'g' -> 'generic' - 'vl' -> 'variable_lacunarity' - 'V' -> 'v3'