Age | Commit message (Collapse) | Author |
|
|
|
|
|
Prepare for enabling ReflowComments.
|
|
|
|
|
|
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
|
|
Having this in blenkernel caused bad level calls to bf_editors_anim,
causing tests that use 'blenkernel' to require almost all libraries.
(complicating gtest linking & causing large binaries).
|
|
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4560
|
|
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Most of this code is deprecated for many years already and does not
work at all in Blender 2.8.
Reviewers: brecht, aligorith
Differential Revision: https://developer.blender.org/D4271
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
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.
|
|
Part of D4277 by @sobakasu
|
|
|
|
|
|
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
|
|
|
|
|
|
With the new automatic handle algorithm, it is possible to do a lot
of the animation via keyframes without touching the curves. It is
however necessary to change the keyframe interpolation and handle
types in certain cases. Currently the dopesheet/action editor
allows changing the types, but does not show them in any way.
To fix, add a new menu option to display this information. For handle
type, it is represented using the shape of the key icons: diamond for
Free, clipped diamond for Aligned, square for Vector, circle for Auto
Clamp, and cirle with dot for Automatic.
Non-bezier interpolation is a property of intervals between keys,
so it is marked by drawing lines, similar to holds. In this initial
version, only the fact of non-bezier interpolation is displayed,
without distinguishing types. For summaries, the line is drawn at
half alpha if not all curves in the group are non-bezier.
In addition, it is sometimes helpful to know the general direction
of change of the curve, and which keys are extremes. This commit
also adds an option to highlight extremes, based on comparing the
keyed values with adjacent keys. Half-intensity display is used
for overshot bezier extremes, or non-uniform summaries.
Reviewers: brecht, aligorith, billreynish
Differential Revision: https://developer.blender.org/D3788
|
|
Computation of hold blocks was done by storing ranges (with start and
an end, and likely overlapping) in a tree keyed only by the block start.
This cannot work well, and there even were comments that it is not
reliable in complex cases.
A much better way to deal with it is to split all ranges so they don't
overlap. The most thorough way of doing this is to split at all and every
known keyframe, and in this case the data can actually be stored in the
key column data structures, avoiding the need for a second tree.
In practice, splitting requires a pass to copy this data to newly added
keys, and the necessity to loop over all keyframes in the range being
added. Both are linear and don't add excess algorithmic complexity.
The new implementation also calls BLI_dlrbTree_linkedlist_sync for
its own needs, so the users of the *_to_keylist functions don't have
to do it themselves anymore.
Differential Revision: https://developer.blender.org/D3790
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
* Don't print on every frame evaluated. This was only needed
earlier to track the progress (and why things were taking so
long - answer, it was the Scene COW issue). Saves 50-100 ms
* Remove the extra calculation of the scene after evaluating
motion paths. This shouldn't be needed now with COW.
Saves about 20-30 ms
|
|
This commit makes the motion path calculations use the
new Depsgraph Filtering API to obtain a more streamlined
copy of the full scene dependency graph, allowing for
faster calculations (as less data needs to be evaluated
for each frame being baked).
For example, in 01_020_A.anim.blend from the Spring production
files, the time needed to calculate paths on several bones
on Autumn went from 39.84 seconds (!) down to 9.90 seconds!
Currently, this works by just replacing the depsgraph instance
passed to the motion path calculation function. This filtered
instance contains just the ID's needed to evaluate the graph
to evaluate a specified target (i.e. the Object owning the pose).
Notes:
* By default, the filtering is not performed unless debug mode 555
is activated. Having a debug switch here allows comparing
performance and disabling it should thing it start crashing.
* It is necessary to pass in the original Scene instance (not the
COW one owned by the filtered depsgraph), otherwise changing the
current frame had no effect, due to the COW flushing from original
Scene to the new Scene overwriting the CFRA changes we make.
* The code here still needs cleaning up to debugging instrumentation, etc.
and also to optimise further (e.g. caching the filtered depsgraph
for faster updates when animating on existing paths, or fine-tuning
the exact set of nodes needed). I'm just committing this first,
since this was the quickly hacked-together test code I've been using
to check that this is all working.
* Further improvements could also be made to the time needed to
build the full graph instance (about 3.3 sec), by allowing partial
builds (e.g. by making a filtering proxy/wrapper around existing builders)
|
|
It's not needed, and actually precludes us from considering parallel
evaluation in future.
|
|
Also, fix missing cleanup of Object.runtime when copying Object
datablocks!
|
|
This puts the motion path in the same location as the transform gizmo,
which is less confusing especially if you have a custom bone shape where
the tail is not visible.
|
|
|
|
|
|
|
|
Sometimes the evaluated pose channel pointers can change during depsgraph
evaluation, so we can't store them ahead of time. The object pointer
should be ok since evaluated ID memory is reused.
|
|
|
|
This commit actually adds some G.main... but at much, much higher level
than the ones it removes, so should still be better ;)
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
This commit restores support for Motion Path drawing in 2.8 (as it wasn't ported over
to the new draw engines earlier, and the existing space_view3d/drawanimviz.c code was
removed during the Blender Internal removal).
Notes:
* Motion Paths are now implemented as an overlay (enabled by default).
Therefore, you can turn all of them on/off from the "Overlays" popover
* By and large, we have kept the same draw style as was used in 2.7
Further changes can happen later following further design work.
* One change from 2.7 is that thicker lines are used by default (2px vs 1px)
Todo's:
* There are some bad-level calls introduced here (i.e. the actgroup_to_keylist() stuff).
These were introduced to optimise drawing performance (by avoiding full keyframes -> keylist
conversion step on each drawcall). Instead, this has been moved to the calculation step
(in blenkernel). Soon, there will be some cleanups/improvements with those functions,
so until then, we'll keep the bad level calls.
Credits:
* Clément Foucault (fclem) - Draw Engine magic + Shader Conversion/Optimisation
* Joshua Leung (Aligorith) - COW fixes, UI integration, etc.
Revision History:
See "tmp-b28-motionpath_drawing" branch (rBa12ab5b2ef49ccacae091ccb54d72de0d63f990d)
|
|
|
|
This commit brings back motion path calculations working on same level
as 2.7x. Caveats:
* You cannot actually see anything, as all the drawing code for motion
paths was removed and not reimplmented in 2.8 draw engines yet
* This doesn't actually use a separate depsgraph instance for fast
background calculations yet. That's a separate topic, and will require
further investigation (probably after code quest, according to original
planning).
* The work here *does* however pave the path forwards towards fully separate
COW evaluation though. We only need to stub in a different depsgraph instance
here to get things working.
|
|
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
|
|
The depsgraph now contains all the state needed to evaluate it.
Differential Revision: https://developer.blender.org/D3147
|
|
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.
* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started
Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.
Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D2927
|
|
|
|
This is a final step of having proper ownership. Now selecting different
layers in the "top bar" will actually do what this is expected to do.
Surely, there are still things to be done under the hood, that will happen
in a less intrusive way.
|
|
This is a lots of changes, but they are boiling down to a simple API
changes where we are no longer relying on implicit usage of scene's
depsgraph and pass depsgraph explicitly.
There should be no user measurable difference, render_layer* tests
are also passing.
|
|
This needs to be re-implemented in a new fashion, without touching global list
of bases and become compatible with the new dependency graph.
The idea to go here would be to create new dependency graph for motion path
evaluation, bring a single object in there (which will pull all dependencies
at a construction) and use that.
Needs working copy-on-write first tho.
|
|
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
|
|
|
|
sorted
New dpesgtraph does not ensure bases are sorted by the evaluation order
any more, so motion paths update might go horrribly wrong.
|