Age | Commit message (Collapse) | Author |
|
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module. Not all warnings are
addressed in this commit.
No functional changes.
|
|
The files are now split up into the following sections:
- `BKE_anim_path.h` and `anim_path.c` for path/curve functions.
- `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for
animation visualization (mostly motion paths).
- `BKE_duplilist.h` for DupliList function declarations. These were
already implemented in `object_dupli.c`, so they were rather out of
place being declared in `BKE_anim.h` in the first place.
No functional changes.
|
|
|
|
A regression since previous fix for proxy. Restore old code for copying
values to an original pose channel.
|
|
Caused by what appears to be a missing flush from evaluated bone back to
original, which then makes it so copy-on-write operation happening after
click (to synchronize selection flags) pushes original bone to its initial
position.
Differential Revision: https://developer.blender.org/D6051
|
|
|
|
This is something which worked in Blender 2.79.
Need to do special trickery to ensure peoxy_from points to a
proper object.
Differential Revision: https://developer.blender.org/D6040
|
|
Editing a lib char should never, ever be done once you have proxies of
it in your project, that will most certainly break a lot of things...
But at leats let's try no to crash here.
|
|
|
|
|
|
Add a new option that makes the Spline IK solver apply volume
preservation on top of the original scaling, considering the
pre-IK scale of the bone as the goal volume to be preserved.
This basically works similar to the Stretch To constraint, and
allows easily rigging a stretchy chain that uniformly follows
its parent's scaling.
Since the Stretch To behavior is more familiar, the new option
is on by default for newly created Spline IK constraints.
|
|
|
|
|
|
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
|
|
Previously Spline IK provided only two choices: either scale the
length of the bone chain to fit the length of the curve, or don't
scale the bone in the Y dimension at all (ignoring effects of
actually fitting to the curve due to curvature and curve object
scale).
This patch adds a new option to use the pre-IK Y scale of the
bones to adjust their length when fitted to the curve, allowing
individual posing control over the length of the segments.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4687
|
|
Mainly, scaling needs to be continuously faded out in these cases.
Plus, in the case of end roll-off, it seems better to integrate into
this general fading system, instead of ad-hoc interpolation of tail.
|
|
|
|
As reported in T63582, it can cause chan_array to be not ready.
To reliably avoid crashing, the only easy way seems to be to
create the index during COW -- maybe @sergey has a better idea.
|
|
The bug is caused by problems in the dependency graph. Unfortunately,
fixing is not just a matter of fixing the graph, because correct
dependencies would cause a cycle here and in other reasonable use
cases. The real fix thus requires refactoring Spline IK to require
curve data only in the actual evaluation phase, and not in POSE_INIT_IK.
In addition, this separates the normal bone evaluation loop from
Spline IK computations for two reasons:
- That still needs to be done even if spline IK can't evaluate
due to missing curve data.
- It should reduce issues with induced shearing, as Spline IK now
controls how parent-child relations are handled in the chain, and
can take care to only carry over rotation and location.
|
|
Both fix missing depsgraph flag, and gracefully give up on missing data.
|
|
Various dependency graph problems can cause obsolete data to reach the
armature modifier, so add checks to reduce the chance of crashing.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Missed when removing contributors.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
The fix in 9fa408f51b missed one place that needed the
check, causing the assert because of incomplete data.
|
|
Basically, armature update is not supposed to be run in edit mode.
This worked in master and new dependency graph because nobody was
tagging armature for an update.
But with all those copy-on-write and other things we can't ensure
tag doesn't happen (and we shouldn't). So now we ensure unwanted
code is not run from the code itself.
P.S. Deeper reason of this goes to the optimization of not updating
pose channels when in edit mode. Since pose doesn't define anything
there we don't want to be bothered with a pose update after every
operation which changes it.
|
|
|
|
|
|
B-Bone shape is a non-trivial computation, so access to
the results would be useful for Python scripts working with
B-Bones, e.g. rig generation.
This exposes both final segment matrices, and the tangent
vectors computed from the custom handle bones.
Since the handle tangents use the axis+roll orientation math
of edit bones, add matrix conversion static methods to Bone.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D3983
|
|
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.
Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D3975
|
|
|
|
Boundbox does not depend on transform and only need geometry
component.
This change solves possible race condition accessing geometry
data and allocating/assigning pointers.
Based on disacussion in IRC with @mano-wii and @brecht.
|
|
Previously each of the objects which has armature modifier will
request deformation matricies from bbones. Thing is, all those
deformations are the same and do not depend on object which is
being modified. What's even worse is that this calculation is
not cheap.
This change makes it so bbones deformation is calculated once
and stored in the armature object. After this armature modifiers
simply use it.
With a rigs we've got here dependency graph evaluation time
goes down from 0.02 sec to 0.012 sec.
Possible further optimization is to make bbone deformation
calculated at the time when bone is calculated. This will avoid
an extra threaded loop over all bones.
|
|
If there are no bones, chan_array may not be allocated.
|
|
|
|
|
|
If there was a dependency cycle involved, it was possible that pchan
array will be freed before all bones are evaluated. Now clear is
done in a dedicated node, which is never a part of dependency cycle.
|
|
|
|
|
|
update + proxy
Make proxy copy result more atomic operation.
|
|
Pose is not brought up to date for until exit of edit mode,
so can not use.
|
|
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
|