Blender Git Loki

Kaikki Blender Git kommitit.

Page: 3018 / 8462

August 23, 2018, 06:13 (GMT)
Cleanup: use static functions
August 23, 2018, 06:13 (GMT)
Tool System: Popup toolbar keymap improvements

- Add support for key_modifiers, so grease pencil gets "D".

- Assign number keys for unmapped items

This means all tools get keyboard access,
use number/numpad to avoid confusion with other keymap items
which directly activate the tool.
August 23, 2018, 05:07 (GMT)
Fix: Silence compiler warnings about size_t's in printf
August 23, 2018, 05:07 (GMT)
Depsgraph: Added note that the filtering function should NOT be called on a filtered graph
August 23, 2018, 05:07 (GMT)
Motion Path Calcs: Use filtered depsgraph by default

Use debug_value = -1 to disable the use of the filtered depsgraph.
It's still useful to have this for benchmarking + until we're
confident the filtering works safely.
August 23, 2018, 05:07 (GMT)
Code Cleanup
August 23, 2018, 05:07 (GMT)
Motion Path Calcs: Minor optimisation tweaks

* 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
August 23, 2018, 05:07 (GMT)
Fix memory leak - the temporary depsgraph instance was not getting freed after use
August 23, 2018, 05:07 (GMT)
Cleanup: Remove the conditional ID node removal stuff, copied from clear_id_nodes()

This was just randomly leaving all the Particle datablocks in the
filtered graph (and causing and extra/excess pass over the ID's
to get run). Unless we actually need those specially kept for
some reason later, it's better to leave those out for now.
August 23, 2018, 05:07 (GMT)
Faster Motion Path calculations using Depsgraph Filtering

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)
August 23, 2018, 05:07 (GMT)
Cleanup: Disable some of the extra debug prints that were slowing things down
August 23, 2018, 05:07 (GMT)
Motion Path Calculations: Don't pass scene into motionpaths_calc_bake_targets()

It's not needed, and actually precludes us from considering parallel
evaluation in future.
August 23, 2018, 05:07 (GMT)
Depsgraph Filtering: Fix ID node filtering problems

* COW data hasn't been expanded yet when we try to filter the graph
(you need to have tagged + evaluated it for this data to exist),
so all the offending nodes would just get left in

* Added more debug prints to verify whether the id_nodes vector is
getting cleared correctly
August 23, 2018, 05:07 (GMT)
Depsgraph Filtering: WIP more debugging prints
August 23, 2018, 05:07 (GMT)
Depsgraph Filtering: Remove opnodes from entry tags too
August 23, 2018, 05:07 (GMT)
Depsgraph: Fix filtering-related crashes

* Simplified operation-relation deletion. Now we collect the relations
to delete into a vector, then iterate through that, thus solving issues
with iterator invalidation (+ aborts arising from that)

* DEG_foreach_ancestor_ID() was assuming that all dependencies were
OperationDepsNodes, when in fact, some could be TimeSource nodes
August 23, 2018, 05:07 (GMT)
Depsgraph: Print simple stats after filtering graph, to quickly verify if anything happened
August 23, 2018, 05:07 (GMT)
Depsgraph: First draft of graph filtering API implementation

When this works correctly, we should be able to feed in an existing
depsgraph instance, and get out a "filtered" copy of it that contains
only the subset of nodes needed to evaluate what we're interested in.

The current implementation only filters on ID blocks/nodes,
and starts by building a full new depsgraph instance first.
I'd originally intended to do it per operation instead, copying
over individual nodes as appropriate to have the smallest and least
memory intensive graph possible. However, I ended up running into
into problems with function binding + COW arguments, hence the
current slow solution.
August 23, 2018, 05:07 (GMT)
Typo fixes
August 23, 2018, 02:56 (GMT)
Tool System: Sculpt border hide/mask tools
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021