Commit Graph

75472 Commits

Author SHA1 Message Date
Joshua Leung
bd801e7a68 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)
2018-08-23 17:07:38 +12:00
Joshua Leung
0e44cf5d78 Cleanup: Disable some of the extra debug prints that were slowing things down 2018-08-23 17:07:38 +12:00
Joshua Leung
e01a9c5eee 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.
2018-08-23 17:07:38 +12:00
Joshua Leung
2f2ab13b5f 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
2018-08-23 17:07:38 +12:00
Joshua Leung
e5e42b7782 Depsgraph Filtering: WIP more debugging prints 2018-08-23 17:07:38 +12:00
Joshua Leung
6bbf6712bb Depsgraph Filtering: Remove opnodes from entry tags too 2018-08-23 17:07:38 +12:00
Joshua Leung
6ec933886c 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
2018-08-23 17:07:38 +12:00
Joshua Leung
9a0ef0933d Depsgraph: Print simple stats after filtering graph, to quickly verify if anything happened 2018-08-23 17:07:37 +12:00
Joshua Leung
be77eeae46 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.
2018-08-23 17:07:37 +12:00
Joshua Leung
9e47709089 Typo fixes 2018-08-23 17:07:37 +12:00
Campbell Barton
99e6c41373 Tool System: support non paint tools in paint mode
This is needed so non-paint-brush tools can be used in paint modes.
2018-08-23 12:47:32 +10:00
Clément Foucault
890623f886 Object Mode: Add back spot cone display 2018-08-22 19:49:32 +02:00
Clément Foucault
477b4559ec Paint Overlay: Fix blending of the brush overlay 2018-08-22 19:49:32 +02:00
Pablo Vazquez
07d0f2eb01 UI: Minor label tweaks to operators context menu
* Add Shortcut -> Assign Shortcut

* Add to Favorites Menu -> Add to Quick Favorites
To match the menu name and be more general for when the Quick Favorites
are accessible in places other than just menus (like panels).

Add blank icon to Remove Shortcut so it aligns with Change Shortcut
which is usually the item on top of it in the menu.
2018-08-22 18:54:13 +02:00
Sergey Sharybin
e17164aca3 Cleanup, unused variable 2018-08-22 17:45:56 +02:00
Charlie Jolly
686480269b MSVS 2017 Bug - Subdiv Mesh
Apparently, struct initialization can not be empty,

Reviewers: sergey

Reviewed By: sergey

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D3636
2018-08-22 17:02:41 +02:00
Sergey Sharybin
cdaf5a1083 Multires: Bring back operator to reshape from object
Limited to mesh type of source, not sure it ever worked for non-meshes.
While it's possible to support reshape from any object, the actual brain
of operation would need to be recoded to go away from requirement of
vertex indices matching in source and destination.
2018-08-22 16:59:00 +02:00
Sergey Sharybin
564a378bd1 Multires: Remove another unused argument from reshape function 2018-08-22 16:59:00 +02:00
Pablo Vazquez
b28a74746b UI: Show development entries in context menu when Dev. Extras is enabled 2018-08-22 16:29:49 +02:00
Sergey Sharybin
6a681981e4 Multires: Fix reshape when active level is lower than the total one 2018-08-22 16:07:57 +02:00
Sergey Sharybin
9dd279cbdf Multires: Remove unused function argument 2018-08-22 16:07:57 +02:00
Andrew Hale
dade2b7548 Python: Cleanup Noise Module
Implements the changes detailed in T56281

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3590
2018-08-22 15:34:10 +02:00
Clément Foucault
644fe7c90c DRW: Fix wrong framebuffer bound after background pass 2018-08-22 15:23:03 +02:00
Clément Foucault
f4f97d1c7f Overlay: Fix wrong framebuffer bound. 2018-08-22 15:23:03 +02:00
Sergey Sharybin
fae127cd26 Multires: Fix reshape of corner vertices
Was only reshaping corner vertex of a single ptex face.
2018-08-22 15:21:19 +02:00
Dalai Felinto
dc00c330c5 Improvement to MESH_OT_shortest_path_pick behaviour
Select a vertex/edge/face if there was nothing previously selected
(if the click hit something, of course).
2018-08-22 09:59:56 -03:00
Dalai Felinto
c32cc3e43e Multi-Objects: MESH_OT_shortest_path_pick
This fully works as "expected", however it seems strange when
there is no selected vertex in the non-active object.

In 2.7x if you join two monkeys, select a vertex in one of them and
try to use this operator in the other it will select the lonely newly
selected vertex.

If you split both monkeys and do this in 2.8 while multi-editing them
you won't get nothing when trying to ctrl+RMB any vertex in the monkey
object that has nothing selected yet.

I propose to have this addressed in an upcoming patch where we always
select a vertex if no vertex was previously selected.
2018-08-22 09:59:56 -03:00
Clément Foucault
ddc09790d8 DRW: Fix T56418 and T56474 in a more robust way 2018-08-22 13:51:03 +02:00
Clément Foucault
d67c86d42a Revert "Fix T56418: Changing to Solid View crashes Blender"
This reverts commit 1e26345a89.
2018-08-22 13:51:03 +02:00
Clément Foucault
fdce78c936 Armature: Fix outline jitter in orthographic mode 2018-08-22 13:51:03 +02:00
Clément Foucault
9d65be6b42 GPU: Fix issue with multiple Geometry node. 2018-08-22 13:51:02 +02:00
Clément Foucault
4d09129ffb Fix T56470: unfreed shader in edit mode 2018-08-22 13:51:02 +02:00
Clément Foucault
6489243332 DRW: Fix background image display
This make the workbench draw everything in the background routine just like
eevee. This is because the workbench uses floating point buffers too and
rendering background to this buffer makes it incorrect without proper
color management.

This could be improved because in xray the background is not blended but
dithered as it's drawn after the main pass.
2018-08-22 13:51:02 +02:00
Clément Foucault
bb639ccc47 GPUMaterial: Geometry Node: Add support for parametric output
This supports meshes and hairs too. Matches cycles output.

This adds barycentric coords to the GPUBuiltin enum which will also be used
for the wireframe node.
2018-08-22 13:51:02 +02:00
Antonioya
118251a2a8 GP: Add OPTYPE_USE_EVAL_DATA flag in paste to avoid undo crash 2018-08-22 13:44:17 +02:00
Howard Trickey
9f6cde53cf Fix bevel crash T56287, when face strength goes to 1. 2018-08-22 07:08:42 -04:00
Sergey Sharybin
9e11b8e249 Multires: implement reshape operation
The one which is used by applying deformation modifiers on the multires.
2018-08-22 10:21:45 +02:00
Sergey Sharybin
6b6c27694e Subsurf: Implement foreach traversal for subdivsion topology
This makes it more generic process to perform actions which
depend on ptex face + (u, v) and on subdivided vertex index.

Currently it is still just a subdivision calculation process,
but same foreach callbacks can easily be used to propagate
displacement from known vertex locations back to displacement
grids.
2018-08-22 10:21:45 +02:00
Campbell Barton
17eade61ef Tool System: bevel now confirms on release 2018-08-22 17:43:49 +10:00
Campbell Barton
9f72a450a2 Cleanup: free keymap status when not used 2018-08-22 17:09:41 +10:00
Dalai Felinto
f9eb2f29fe Multi-Object-Editing: bisect support 2018-08-22 16:35:00 +10:00
Campbell Barton
583fb8c140 Cleanup: RNA naming 2018-08-22 15:43:28 +10:00
Campbell Barton
cb410429cc Merge branch 'master' into blender2.8 2018-08-22 15:27:03 +10:00
Campbell Barton
53527ac10f Cleanup: use EDBM prefix 2018-08-22 15:23:28 +10:00
Campbell Barton
d9de8c469b BMesh: loop-cut, display deformed coordinates
Previously this used derived mesh, now use evaluated data.
2018-08-22 15:15:21 +10:00
Campbell Barton
cf038bcb15 Tool System: loop cut, confirm on release
When accessed as a tool it felt awkward to click twice to execute.
2018-08-22 14:22:57 +10:00
Campbell Barton
7eaf00bfb0 Cleanup: style 2018-08-22 10:10:12 +10:00
Andrew Hale
e8e89c135f Transform: factor out matrix multiply w/ snapping 2018-08-22 09:45:11 +10:00
Antonioya
95aa672e2f GP: Reduce list of modifiers affected by recalc 2018-08-21 22:05:54 +02:00
Antonioya
7fda7fb750 GP: Force Fill triangulation data recalc
Add a general parameter to force the recalc of the triangulation data because some modifiers could change the geometry and the filling triangles would not be right.

Now, the parameter is visible in UI panel because this option reduces FPS, but maybe in the future we can keep always ON and remove the parameter.
2018-08-21 19:46:29 +02:00