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-01-22Merge branch 'blender-v2.92-release'Jacques Lucke
2021-01-22Revert "BLI: add conversion from float2 to float3"Jacques Lucke
This reverts commit 6ac0a3d83c8e5a39bd5356aa0d68e3166bd91e82.
2021-01-22Merge branch 'blender-v2.92-release'Jacques Lucke
2021-01-22BLI: add conversion from float2 to float3Jacques Lucke
Previously float2 was converted to float3 by implicitly converting to a float pointer first, which was then passed to the float3 constructor. This leads to uninitialized memory in the z component of the new float3.
2021-01-20Cleanup: clang-formatCampbell Barton
2021-01-20Cleanup: spellingCampbell Barton
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2021-01-20Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-20CMake: add missing headersCampbell Barton
Resolves 'cmake_consistency_check' reports.
2021-01-15Merge branch 'blender-v2.92-release'Hans Goudey
2021-01-15Fix T84745: build error with TBB 2021Brecht Van Lommel
task_group::is_canceling() was removed.
2021-01-15Cleanup: spellingCampbell Barton
2021-01-15Cleanup: use 'pragma once'Campbell Barton
2021-01-15Use mmap() IO for reading uncompressed .blendsLukas Stockner
Instead of submitting tons of tiny IO syscalls, we can speed things up significantly by `mmap`ing the .blend file into virtual memory and directly accessing it. In my local testing, this speeds up loading the Dweebs file with all its linked files from 19sec to 10sec (on Linux). As far as I can see, this should be supported on Linux, OSX and BSD. For Windows, a second code path uses `CreateFileMapping` and `MapViewOfFile` to achieve the same result. Reviewed By: mont29, brecht Differential Revision: https://developer.blender.org/D8246
2021-01-14Geometry Nodes: add implicit conversions for float2 and othersJacques Lucke
Some of these conversions are arbitrary to some degree. However, the user experience is better when at least something happens when converting between types, instead of just getting zeros. I left out a few conversions that I wasn't sure about yet. I also added conversions for float2.
2021-01-13Transform: geodesic distances for proportional edit connected modeBrecht Van Lommel
Use approximate geodesic distance computatiom that crosses through triangles rather than only along edges. Using only edges would give artifacts already on a simple grid. Fixes T78752, T35590, T43393, T53602 Differential Revision: https://developer.blender.org/D10068
2021-01-11BLI: fix math operationJacques Lucke
That fixes a stupid mistake of mine that was copied a couple of times.
2021-01-05Cleanup: remove UNUSED(..) from public function declarationsCampbell Barton
This doesn't serve any purpose and can become out of sync with the function it's self without reporting warnings.
2021-01-04Cleanup: use 'pragma once'Campbell Barton
Add explanations for cases the header-guard defines are still used.
2020-12-17Geometry Nodes: Make random attribute node stableHans Goudey
Currently, the random attribute node doesn't work well for most workflows because for any change in the input data it outputs completely different results. This patch adds an implicit seed attribute input to the node, referred to by "id". The attribute is hashed for each element using the CPPType system's hash method, meaning the attribute can have any data type. Supporting any data type is also important so any attribute can be copied into the "id" attribute and used as a seed. The "id" attribute is an example of a "reserved name" attribute, meaning attributes with this name can be used implicitly by nodes like the random attribute node. Although it makes it a bit more difficult to dig deeper, using the name implicitly rather than exposing it as an input should make the system more accessible and predictable. Differential Revision: https://developer.blender.org/D9832
2020-12-16Geometry Nodes: Poisson disk point distribution node/methodDalai Felinto
This patch does two things: * Introduce a Seed to the random distribution method * Bring in a new distribution method for the point scattering node Patch Review: https://developer.blender.org/D9787 Note: This commit doesn't not handle doversion. Which means that users need to manually update their files that were using the Point Distribute node and reconnect inputs to the "Maximum Density" socket. Original patch by Sebastian Parborg, with changes to not rely on the cy libraries and overall cleanup. Patch review by Jacques Lucke, besides help with the new "heap" system that was required for this algorithm. Based on Cem Yuksel. 2015. Sample Elimination for Generating Poisson Disk Sample. Sets. Computer Graphics Forum 34, 2 (May 2015), 25-32 http://www.cemyuksel.com/research/sampleelimination/
2020-12-16BLI: remove implicit casts between some span typesJacques Lucke
Casting pointers from one type to another does change the value of the pointer in some cases. Therefore, casting a span that contains pointers of one type to a span that contains pointers of another type, is not generally safe. In practice, this issue mainly comes up when dealing with classes that have a vtable. There are some special cases that are still allowed. For example, adding const to the pointer does not change the address. Also, casting to a void pointer is fine. In cases where implicit conversion is disabled, but one is sure that the cast is valid, an explicit call of `span.cast<NewType>()` can be used.
2020-12-16BLI: add new InplacePriorityQueue data structureJacques Lucke
This data structure adds priority queue functionality to an existing array. The underlying array is not changed. Instead, the priority queue maintains indices into the original array. Changing priorities of elements dynamically is supported, but the priority queue has to be informed of such changes. This data structure is needed for D9787.
2020-12-16BLI: constexpr Span, IndexRange, StringRef(Null/Base)Ankit Meel
Motivated by `std::string_view` being usable in const (compile-time) context. One functional change was needed for StringRef: `std::char_traits<char>::length(str)` instead of `strlen`. Reviewed By: JacquesLucke, LazyDodo Differential Revision: https://developer.blender.org/D9788
2020-12-16Cleanup: remove redundant struct declarationsCampbell Barton
2020-12-14Fix windows build.Alexander Gavrilov
2020-12-14Cleanup: path_util.c commentsCampbell Barton
2020-12-13Fix weird Swing+Twist decomposition with noncanonical quaternions.Alexander Gavrilov
It turns out that after the fix to T83196 (rB814b2787cadd) the matrix to quaternion conversion can produce noncanonical results in large areas of the rotation space, when previously this was limited to way smaller areas. This in turn causes Swing+Twist math to produce angles beyond 180 degrees, e.g. outputting a -120..240 range. This fixes both issues, ensuring that conversion outputs a canonical result, and decomposition canonifies its input. This was reported in chat by @jpbouza.
2020-12-11Fix: Fix potential memory leak in BLI_getenvRay Molenkamp
Issue introduced in rB87b19b3aba0c and unlikely to occur but no reason not to have correct code.
2020-12-11Fix: BLI_getenv returns ascii not UTF8 on windowsRay Molenkamp
BLI_getenv has always incorrectly returned ascii rather than UTF-8. This change corrects this behaviour. This resolves issues when the `BLENDER_USER_CONFIG` environment variable contains a path with Unicode characters on windows as reported in T74510 (but unlikely the root cause for the issue at hand there) Differential Revision: https://developer.blender.org/D9831 Reviewed by: brecht
2020-12-10Fix T83630 Exact Boolean assert failure in Debug build.Howard Trickey
I thought I had reasoned that the add_patch would only happen when the patch was not already in a cell, but I missed reasoning about merged cells. So switched to a set 'add' instead of 'add_new'.
2020-12-10BLI_string: return NULL from BLI_str_quoted_substrN on failureCampbell Barton
This was returning an empty allocated string, however almost all callers checked if the return value was NULL before freeing, making for misunderstandings on the intended use of this function. BCAnimationSampler::initialize_curves for example detected the f-curves animation type to 'bone' based on a non-NULL return value which never failed. Also fixes two leaks where the the result of BLI_str_quoted_substrN wasn't freed.
2020-12-10Fix BLI_str_quoted_substrN use with escaped stringsCampbell Barton
BLI_str_quoted_substrN didn't unescape the resulting string, yet all callers were using this with animation paths which are created using BLI_str_escape(). - Fix BLI_str_quoted_substrN use with escaped strings by calling BLI_str_unescape(). Note that it's possible we want an a version of this function that keeps escape characters. This could be added if it's required. - Fix end quote detection using BLI_str_escape_find_quote checking for `\"` isn't reliable since an even number of back-slashes before a quote means it's not escaped.
2020-12-10BLI_string: extract quote utility into BLI_str_escape_find_quoteCampbell Barton
Duplicate logic for this exists in BLI_str_quoted_substrN, which doesn't properly support escaping.
2020-12-10Cleanup: avoid '_ln' suffixCampbell Barton
Use '_len' or '_line_number'.
2020-12-10Cleanup: use snake-case instead of camel-caseCampbell Barton
2020-12-10BLI_string: support escaping additional control characterCampbell Barton
Add support for escaping \a, \b & \f for completeness, currently it's not required.
2020-12-10BLI_string: add BLI_str_unescape utility functionCampbell Barton
Performs the reverse of BLI_str_escape. This allows logic to be removed from RNA path handling.
2020-12-10Fix BLI_str_escape with control characters, add unit testsCampbell Barton
2020-12-10Cleanup: rename BLI_strescape to BLI_str_escapeCampbell Barton
Prepare for `BLI_str_unescape` which doesn't read well without the separator.
2020-12-09Cleanup: various clang tidy fixesJacques Lucke
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.