Commit Graph

57674 Commits

Author SHA1 Message Date
Campbell Barton
cd3c31b2c0 Tool System: experimental low-poly construction
Tool for creating polygons, exact usage may change based on feedback.

LMB to add faces at boundaries (tris from edges, quads from verts).
- Ctrl splits edges
- Alt to dissolve edges/verts.

Works well with vertex snap & auto-merge.

This uses selection hover but isn't intended to introduce more widely
pre-selection highlighting, at least it will be restricted to this tool.
2017-10-26 18:40:27 +11:00
Campbell Barton
4063c7062a Merge branch 'master' into blender2.8 2017-10-26 16:20:34 +11:00
Campbell Barton
3d904d7650 Manipulator: Use object bound-box for scale cage
Without this, scaling single objects wasn't working usefully.
2017-10-26 16:15:54 +11:00
Campbell Barton
81f2e68e20 Event System: check_click was left set
Caused by own change 137586a13c
2017-10-26 16:08:45 +11:00
Sergey Sharybin
b90e2607a0 Depsgraph: Remove workaround for infinite recursion in scene update
Was needed for legacy lamp/material drivers.
2017-10-25 15:49:59 +02:00
Sergey Sharybin
54ebbe1534 Depsgraph: Cleanup, remove legacy material/lamp driver update functions 2017-10-25 15:49:59 +02:00
Sergey Sharybin
025f4a046f Depsgraph: Remove driver evaluation from object update
With new dependency graph this direct call to driver/animation update should
not be needed,
2017-10-25 15:49:59 +02:00
Sergey Sharybin
fb896182b1 Depsgraph; Introduce new scene update routines which gets an explicit graph
They are still modifying global state, such as ID recalc tags stored in bmain,
need some solution for this.
2017-10-25 15:49:59 +02:00
Dalai Felinto
6b739bc2dc Fix T53156: VSE not working since Workspace > engine change
This would break if using preview in VSE. We now use the scene engine
not the workspace engine.

That said we could have the preview engine defined as part of the sequence strip
as we had for draw modes in the past. But this is a separated topic for a
separated patch.

This issue in particular was introduced in e4f2b2be26.

Note: VSE preview is still broken in two cases:
* If you have Eevee as the engine in the Scene of the Scene strip.
* If you use Clay, save the file, and re-open.
2017-10-25 11:16:08 -02:00
Sergey Sharybin
4353307607 Depsgraph: Make validation to take explicit graph to be checked 2017-10-25 14:51:02 +02:00
Sergey Sharybin
db83f41baf Merge branch 'master' into blender2.8 2017-10-25 14:42:49 +02:00
Sergey Sharybin
8988f383c1 Depsgraph: Cleanup, remove redundant calls to add_component 2017-10-25 14:40:38 +02:00
Sergey Sharybin
40b3d951bc Depsgraph: Don't touch set scenes when evaluating scene
Objects from set scene gets flattened out to the active scene depsgraph, so it
is a big question why do we need to build dependency graph for set scenes.
2017-10-25 14:37:03 +02:00
Sergey Sharybin
a08f633aeb Depsgraph: Remove direct call to VSE animation update
This is supposed to be handled by dependency graph now.
2017-10-25 14:30:56 +02:00
Sergey Sharybin
8e4b3e916e Merge branch 'master' into blender2.8 2017-10-25 14:22:24 +02:00
Sergey Sharybin
50d30cc5fd Depsgraph: Need to tag relations for update after new clip was added 2017-10-25 14:20:20 +02:00
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