Commit Graph

57658 Commits

Author SHA1 Message Date
Sergey Sharybin
e2e5c9a1ee Depsgraph: Mark TODO as solved
New dependency graph takes care of all datablocks already.
2017-10-25 14:02:51 +02:00
Sergey Sharybin
c4991c0971 Depsgraph: Remove bmain from graph
It really should not care about bmain.
2017-10-25 13:28:40 +02:00
Sergey Sharybin
4deddfca89 Depsgraph: Pass explicit bmain to graph build finalization 2017-10-25 13:28:40 +02:00
Sergey Sharybin
86761a2cd7 Depsgraph: Cleanup, remove unused function 2017-10-25 13:28:40 +02:00
Sergey Sharybin
db04cc0f00 Depsgraph: Remove direct relations rebuild from set_background
We wouldn't really know which context we want there.
2017-10-25 13:28:40 +02:00
Sergey Sharybin
da78338da0 Depsgraph: Add function to update relations within a given graph 2017-10-25 13:28:39 +02:00
Dalai Felinto
005cb90113 Fix T52392: Node materials (Materials and World) not updated in viewport
Depsgraph was not updated after you used "Use Nodes" to create the nodetree.
2017-10-25 09:24:28 -02:00
Sergey Sharybin
220fbddc8b Merge branch 'master' into blender2.8 2017-10-25 12:21:08 +02:00
Sergey Sharybin
ea5cf3ff7a Depsgraph: Rework debug relations update function
Make it a tag for relations update function instead, since we will not be able
to easily rebuild relations, and we wouldn't be able to iterate all scenes.

This is a part of mowing depsgraph to be per-workspace/layer in 2.8 branch.
2017-10-25 12:11:49 +02:00
Sergey Sharybin
0bbf2f9554 Depsgraph: Add missing forward struct declarations 2017-10-25 12:11:12 +02:00
Sergey Sharybin
b4ba1068c1 Depsgraph: Cleanup, trailing whitespace and braces 2017-10-25 12:07:51 +02:00
Sergey Sharybin
3fe534eebb Depsgraph: Make depsgraph.debug_stats to return a string
This way we can see result in the python console.
2017-10-25 12:06:56 +02:00
Sergey Sharybin
d8da33d21c Merge branch 'master' into blender2.8 2017-10-25 11:48:20 +02:00
Sergey Sharybin
6ec8344243 Depsgraph: Add missing movie clip dopesheet invalidation 2017-10-25 11:45:31 +02:00
Sergey Sharybin
eb090d0609 Depsgraph: Use explicit opcode for shape key 2017-10-25 11:37:24 +02:00
Sergey Sharybin
a2e22c79cb Depsgraph: Cleanup, use explicit cloth modifier opcode
Avoids use of placeholder operation which also was involving some string
comparisons.
2017-10-25 11:34:41 +02:00
Sergey Sharybin
3997a157e9 Depsgraph: Cleanup, don't call explicit add_id()
This is redundant, adding components will check for ID to exist.
2017-10-25 11:31:22 +02:00
Sergey Sharybin
1bdc687e7a Depsgraph: Use explicit parameters eval operation code
This replaces usage of generic PLACEHOLDEWR with string lookup with more
explicit opcode. This should make it faster to build dependency graph by
avoiding string comparisons when it's not needed.

There should be no user measurable different.
2017-10-25 11:25:10 +02:00
Sergey Sharybin
11d7445905 Depsgraph: Cleanup, use proper style for macro loop 2017-10-25 11:25:10 +02:00
Sergey Sharybin
45329ce319 Depsgraph: Remove unsued node flag 2017-10-25 11:25:10 +02:00
Sergey Sharybin
ea29e4c997 Depsgraph: Make operation codes more obvious
This synchronizes al lrelated changes from blender2.8 branch.
2017-10-25 11:25:10 +02:00
Sergey Sharybin
f29ff14d6e Depsgraph: Remove bunch of debug code
Was never actually used and implementation seems to be slow: we shouldn't be
doing per-node evaluation hash lookups, adds too much overhead. We can instead
store statistics in the node itself, and maybe even group them somehow.

Ideally such a statistics should be user-friendly so riggers and animators
can see exactly what's happening.
2017-10-25 11:25:10 +02:00
Clément Foucault
8dab90915f Eevee: Fix T53095: Black cube on start and no material updates
This was caused by a not bound unused texture. Removing the texture usage fixes the problem.
2017-10-25 10:31:58 +02:00
Dalai Felinto
0e7113df21 Silence warning in outliner_id_remap_exec 2017-10-24 16:00:26 -02:00
Julian Eisel
03f1b94e02 Fix crash changing settings of operator executed in different scene
Steps to reproduce were:
* Open Blender, create a new scene
* Go back to initial scene, transform object
* Switch back to newly created scene, change operator settings there
* Should cause a crash (at least with asan)

Should behave like 2.7 now, that is, switch scene back to where
operator was executed.
2017-10-24 18:22:42 +02:00
Sergey Sharybin
3936ba9725 Depsgraph: Avoid explicit relations rebuild calls
We wouldn't know which dependency graphs needs/safe for reconstruction,
so rather use API which tells that relations are out of date. This way
graph evaluation will take care of the rest.

Committing to 2.8 only since it's where we can't reliably know the graph
and is probably not that safe to apply this in master.
2017-10-24 16:47:34 +02:00
Sergey Sharybin
d012c9d0f4 Depsgraph: Remove residue of motion path optimization
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.
2017-10-24 16:39:26 +02:00
Sergey Sharybin
b6560d9fc1 Depsgraph: Remove bunch of debug code
Was never actually used and implementation seems to be slow: we shouldn't be
doing per-node evaluation hash lookups, adds too much overhead. We can instead
store statistics in the node itself, and maybe even group them somehow.

Ideally such a statistics should be user-friendly so riggers and animators
can see exactly what's happening.
2017-10-24 16:04:11 +02:00
Sergey Sharybin
86faf8ac84 Depsgraph: Remove shortcut of freeing scene's depsgraph
It will not be possible to do that after depsgraph becomes more context
oriented. Which means, all code will need to explicitly tell which graph
to free,
2017-10-24 16:04:11 +02:00
Sergey Sharybin
97b2483a7a Depsgraph: Remove scene from refresh API
Scene is already stored in the graph.
2017-10-24 16:04:11 +02:00
Sergey Sharybin
11d8c939cd Depsgraph: Cleanup, remove unused function declaration 2017-10-24 16:04:11 +02:00
Sergey Sharybin
1829084da1 Depsgraph: Switch to explicit graph specification for tag flush 2017-10-24 16:04:11 +02:00
Sergey Sharybin
72b61763da Depsgraph: Begin bringing API to pass explicit graph
This is a first step towards an updated API where we pass explicit graph rather
than a scene. This is because we can no longer deduct which graph to use since
it will depend on a context.

Will happen in several steps, so bisecting will not be such a pain.
2017-10-24 16:04:11 +02:00
Sergey Sharybin
4dbfb130db Depsgraph: Cleanup, remove unused function
It's unlikely we will ever want to flush tags on all possible scenes or
dependency graphs. It wouldn't be thread safe at a best.
2017-10-24 16:04:11 +02:00
Sergey Sharybin
56006d9808 Depsgraph: Cleanup, unused function declaration 2017-10-24 16:04:11 +02:00
Dalai Felinto
7484c6c5ee Fix non-instanced groups in no-collection file creating collections
This is a corner-case, but one that is too easy to reproduce:

* Unlink all the collections of active view layer.
* Link a group without "Instancing" it.
2017-10-24 10:28:01 -02:00
Dalai Felinto
bac740085c rna_layer.c cleanup: remove uneeded includes
I have cleaned up the ones before "#ifdef RNA_RUNTIME", and forgot about the ones after.
2017-10-24 10:23:29 -02:00
Sergey Sharybin
d92bca186f Depsgraph: Initialize depsgraph as need for update
This way we can delay graph allocation and relations update.
2017-10-24 13:54:12 +02:00
Sergey Sharybin
7ea7fd45d0 Merge branch 'master' into blender2.8 2017-10-24 12:19:48 +02:00
Campbell Barton
136f33b09f Fix T53143: Knife Crash after Grid Fill
BM_ELEM_INTERNAL_TAG flag wasn't ensured to be cleared.
2017-10-24 17:21:25 +11:00
Campbell Barton
8661ab12a6 Fix BMesh PyAPI internal flag clearing logic
Would leave the flag set on raising an exception.
2017-10-24 16:52:54 +11:00
Campbell Barton
c93cfcbb61 Fix edge-split bmesh operator giving empty result 2017-10-24 16:31:35 +11:00
Joshua Leung
c71f2f1404 Fix T53130: NLA Tweak (moved) Tracks + Alt+RMB Select does not work in Graph Editor 2017-10-24 16:27:56 +13:00
Brecht Van Lommel
f5456df095 Merge branch 'master' into blender2.8 2017-10-24 02:05:41 +02:00
Julian Eisel
254daf8f8c Fix T53141: Assert when using transformation in new 3D View editor
Was actually possible to invoke this assert failure in two ways:
* Transforming in newly created 3D View (like described in the report).
* Transforming in newly appended workspace from default workspaces.blend. Issue was that default workspaces.blend was saved in 2.8.1, but in a branch state that didn't include the transform-orientation changes. So versioning code wouldn't run when needed.

Note that files saved with this bug will still cause the assert to
fail. Can be ignored then.

This is not related to manipulators (as suggested in the report).
2017-10-24 00:38:20 +02:00
Dalai Felinto
23a5726ec2 Refactor: Move rna_scene.c layer/collection to rna_layer.c
rna_scene.c was getting way too big with data that was related to
DNA_layer_types.h.

I tried doing it earlier, but failed. But now with the new changes I think it's
better to do this sooner than later.
2017-10-23 18:18:05 -02:00
Antony Riakiotakis
4db67aab06 Fix OpenGL extension report in system info operator. 2017-10-23 22:22:22 +03:00
Campbell Barton
cc96cdd9d4 VSE: draw grid lines at every second
Was hard-coded to 25 frames.

D2893 by @jooert
2017-10-23 22:29:49 +11:00
Campbell Barton
1aa5b63661 Docs: improve bmesh exception message
Suggested in T53131
2017-10-23 21:57:32 +11:00
Julian Eisel
7dcf8bebe6 Cleanup: Remove unused function declaration 2017-10-23 02:11:45 +02:00