Age | Commit message (Collapse) | Author |
|
|
|
This reverts commit 6ac0a3d83c8e5a39bd5356aa0d68e3166bd91e82.
|
|
|
|
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.
|
|
|
|
|
|
Comment blocks not conforming to convention.
|
|
|
|
Resolves 'cmake_consistency_check' reports.
|
|
|
|
task_group::is_canceling() was removed.
|
|
|
|
|
|
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
|
|
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.
|
|
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
|
|
That fixes a stupid mistake of mine that was copied a couple of times.
|
|
This doesn't serve any purpose and can become out of sync
with the function it's self without reporting warnings.
|
|
Add explanations for cases the header-guard defines are still used.
|
|
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
|
|
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/
|
|
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.
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
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.
|
|
Issue introduced in rB87b19b3aba0c and unlikely to occur
but no reason not to have correct code.
|
|
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
|
|
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'.
|
|
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.
|
|
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.
|
|
Duplicate logic for this exists in BLI_str_quoted_substrN,
which doesn't properly support escaping.
|
|
Use '_len' or '_line_number'.
|
|
|
|
Add support for escaping \a, \b & \f for completeness,
currently it's not required.
|
|
Performs the reverse of BLI_str_escape.
This allows logic to be removed from RNA path handling.
|
|
|
|
Prepare for `BLI_str_unescape` which doesn't read well
without the separator.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
No functional changes.
|
|
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
|
|
|
|
This also adds a hash function for `float2`, because `CPPType`
expects that currently.
|