Age | Commit message (Collapse) | Author |
|
Use the Blender RNG instead of rand() to solve it.
|
|
- Use int instead of uint for safety and less conversions.
- Add free callback
- Add cleared alloc option
|
|
This is really close to BLI_mempool but uses an array to keep track of the
chunks of memory. There is no tagging necessary to clear the whole
structure so reuse is fast.
Naturally supports iteration but does not support freeing.
|
|
|
|
matrix inversion was changed in rB01c75c3765eb from own code to EIGEN
for performance reasons. EIGEN would return a zero matrix on failure
(resulting in the pivot always being at the object origin).
This brings back the "old" matrix inversion code (which has the benifit
of providing a partial solution which makes the local transform center
appear correct)
Reviewers: campbellbarton
Maniphest Tasks: T57767
Differential Revision: https://developer.blender.org/D4804
|
|
Unlike location and rotation, there is a meaningful definition of
overall/average scaling via the total change in the volume. This
adds an option to retrieve that via a single driver variable,
instead of having to use three and an expression.
Using the determinant to compute the volume scaling also allows
detecting flipping due to negative scale - this is impossible
to do via the three variable approach.
The volume_scale functions are added purely for code readability:
'volume scale factor' is easier to understand than determinant.
Differential Revision: https://developer.blender.org/D4803
|
|
Quiet extra-semi-stmt & missing-variable-declarations
|
|
Prepare for enabling ReflowComments.
|
|
|
|
This macro is handy in at least two occasions:
* When you want to check the optimized generated assembly for
some small function that would get inlined otherwise.
* The marked function will be visible in profiling results.
I can't test the implementations for other compilers now,
so I did not include them.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D4754
|
|
When running blender in paths with special characters this caused issues.
|
|
|
|
Add braces for modules already using braces almost everywhere.
|
|
|
|
|
|
|
|
Avoid having same test running at the end of each macro.
|
|
Very bad oversight, using pointer comparison instead of strcmp
for all but the first item.
|
|
Now that B-Bone shape data is kept in bPoseChannel_Runtime, the
armature level cache only holds one quaternion value per bone.
It can also be moved to runtime, and the structure removed.
This has an additional effect that, as far as I can tell, now
the Armature modifier can run as soon as all of the bones it
actually needs are done, thus making T59848 a purely depsgraph
level problem.
|
|
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
Ensure that returned string buffer is always properly initialized with
NULL char...
|
|
|
|
This also fixes alignment issues in many editors.
E.g. the frame numbers were badly aligned to the grid lines
in the timeline.
Checkout the images in D4681 for more examples.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4681
|
|
|
|
Tested to work on Linux and macOS.
This will be enabled once all platforms are verified.
See D4684
|
|
Also, mul_m3_m3m4 was named incorrectly.
|
|
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.
Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.
See T46725.
|
|
Use doxy references to function and enums,
also correct some names which became out of sync.
|
|
Previously B-Bone deformation mapped every vertex to just one
B-Bone segment. This results in abrupt transformation differences
between the sides of each threshold plane, reducing the quality
of B-Bone deformation and making the use of shape keys impractical.
This commit replaces this approach with a linear blend between
the two closest segment transformations, effectively representing
the B-Bone as two weight-blended plain bones for each vertex.
In order to distribute the interpolation more evenly along the
bone, segment matrices for deformation are now computed at points
between the segments and at the ends of the B-Bone. The computation
also uses the true tangents of the Bezier curve for the orientation.
The nodes at the end of the bone require some special handling to
deal with zero-length Bezier handles caused by a zero ease value.
The Copy Transforms constraint now also smoothly interpolates
rotation and scaling along the bone shape when enabled.
The initial version of the patch was submitted by @Sam200.
Differential Revision: https://developer.blender.org/D4635
|
|
A string comparison version of the ELEM macro,
add to avoid verbose & repetitive strcmp/STREQ usage.
|
|
|
|
Ref T63327
|
|
|
|
|
|
The old trick seems to no longer work in newer VS version.
|
|
|
|
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4596
|
|
|
|
|
|
Function to remove exact duplicates from the tree before balancing.
|
|
|
|
Instead of making the entire body of the function conditional, it now
returns early, unindenting the entire function and preventing the reader
from searching for a non-existent `else` clause.
No semantic changes.
|
|
The `BLI_path_frame_strip` function was completely broken, unless the
number of digits in the sequence number was the same as the length of
the extension. In other words, it would work fine for `file.0001.abc` (4
digit `0001` and 4 char `.abc`), but other combinations would truncate
to the shortest (`file.001.abc` would become `file.###.ab` and
`file.00001.a` would become `file.##.a`). The dependency between the
sequence number and the file extension is now removed.
The behaviour has changed a little bit in the case where there are no
numbers in the filename. Previously, `path="filename.abc"` would result
in `path="filename.abc"` and `ext=""`, but now it results in
`path="filename"` and `ext=".abc"`. This way `ext` always contains the
extension, and the behaviour is consistent regardless of whether there
were any numbers found.
Furthermore, I've removed the `bool set_frame_char` parameter, because
it was unclear, probably also buggy, and most importantly, never used.
I've also added a unit test for the `BLI_path_frame_strip` function.
|
|
Most API's already use this convention.
|
|
Some users only use the tree to store a single value.
|