Age | Commit message (Collapse) | Author |
|
|
|
|
|
No functional changes.
This function replaces some of the logic in
`DRW_select_buffer_find_nearest_to_point` that traverses a buffer in a
spiral way to search for a closer pixel (not the closest).
Differential Revision: https://developer.blender.org/D10548
|
|
This commit refactors the point distribute node to skip realizing
the instances created by the point instance node or the collection
and object info nodes. Realizing instances is not necessary here
because it copies all the mesh data and and interpolates all
attributes from the instances when this operation does not
need to modify the input geometry at all.
In the tree leaves test file this patch improves the performance of
the node by about 14%. That's not very much, the gain is likely larger
for more complicated input instances with more attributes (especially
attributes on different domains, where interpolation would be necessary
to join all of the instances). Another possible performance improvement
would be to parallelize the code in this node where possible.
The point distribution code unfortunately gets quite a bit more
complicated because it has to handle the complexity of having many
inputs instead of just one.
Note that this commit changes the randomness of the distribution
in some cases, as if the seed input had changed.
Differential Revision: https://developer.blender.org/D10596
|
|
|
|
The commit rB6f63417b500d that made exact boolean work on meshes
with holes (like Suzanne) unfortunately dramatically slowed things
down on other non-manifold meshes that don't have holes and didn't
need the per-triangle insideness test.
This adds a hole_tolerant parameter, false by default, that the user
can enable to get good results on non-manifold meshes with holes.
Using false for this parameter speeds up the time from 90 seconds
to 10 seconds on an example with 1.2M triangles.
|
|
The Exact boolean used in the cell fracture addon incorrectly
kept some outside faces: due to some raycasts going into open
eye socket then out of the head, leading to one ray direction
(out of 8) saying the face was inside the head. The current
code allowed 1 of 8 rays only as "inside" to accommodate the
case of a plane used in boolean to bisect. But this cell fracture
case needs more confidence of being inside. So changed the
test for intersection to require at least 3 of 8 rays to be inside.
Maybe the number of rays to indicate insideness should be exposed
as an option, to allow user tuning according to the degree of
"non-volumeness" of the arguments, but will try at least for now
to magically guess the right value of the rays-inside threshold.
Note: all of this only for the case where the arguments are not
all PWN (approx: manifold). The all-PWN case doesn't use raycast.
|
|
|
|
This is a simple heuristic that seems to improve the search results in many cases.
Differential Revision: https://developer.blender.org/D10618
|
|
|
|
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.
|
|
|
|
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).
|
|
|
|
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.
|
|
|
|
|
|
In preparation of adding Neon support.
Ref D8237, T78710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 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.
|
|
|
|
The `get_shortest_word_index_that_startswith` function was not doing
what it was supposed to do. This resulted in wrong matches.
|
|
Committing this to the release branch, to avoid merge conflicts with an
upcoming fix.
|
|
|
|
|
|
|
|
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.
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
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
|
|
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
|
|
Resolves modernize-use-transparent-functors Clang-Tidy warning.
Differential Revision: https://developer.blender.org/D10323
|
|
Using assignment syntax as we don't use `{}` initialization yet.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9501
|
|
|
|
|
|
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
|
|
|
|
Only print "Other Options" when the heading has content to show.
|
|
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
|
|
|
|
|
|
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
|
|
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.
|
|
Match git style email addresses, ignored by the spell checker.
|
|
|