Commit Graph

436 Commits

Author SHA1 Message Date
Sergey Sharybin
8b1b7e8d10 Depsgraph: Fix/workarounf when tagging light probe for data update 2017-10-02 18:49:49 +05:00
Sergey Sharybin
98ba302f70 Merge branch 'master' into blender2.8 2017-09-25 18:57:43 +05:00
Sergey Sharybin
675cef0a16 Fix T52835: When driven IK influence change, ik animation have 1 frame delay 2017-09-25 18:48:55 +05:00
Dalai Felinto
9ad2c0b615 Depsgraph and collection enable/visibility
Iterate over invisible objects too, so lamps can still lit the scene.
Also, now you can use a collection to set an object to invisible, not
only to visible.

For example:
Scene > Master collection > bedroom > furniture
Scene > View Layer > bedroom    (visible)
                   > furniture  (invisible)

The View Layer has two linked collections, bedroom and furniture.
This setup will make the furniture collection invisible.

Note: Unlike what was suggested on D2849, this does not make collection
visibility influence camera visibility. I will keep this as a separate
patch.

Reviewers: sergey

Subscribers: sergey, brecht, fclem

Differential Revision: https://developer.blender.org/D2849
2017-09-21 14:45:08 +02:00
Sergey Sharybin
77377f0ea8 Depsgraph: Fix bug introduced by wrong merge conflict resolution 2017-09-21 16:09:49 +05:00
Sergey Sharybin
af170839af Merge branch 'master' into blender2.8 2017-09-19 21:08:14 +05:00
Sergey Sharybin
b31faac17e Depsgraph: Fix wrong flag being assigned 2017-09-19 20:55:15 +05:00
Sergey Sharybin
4c1ee47707 Merge branch 'master' into blender2.8 2017-09-18 15:54:56 +05:00
Sergey Sharybin
c622533fa0 Fix T52432: Blender crashes while using Ghost (new depsgraph) 2017-09-18 15:50:27 +05:00
Sergey Sharybin
028c5592cd Merge branch 'master' into blender2.8 2017-09-15 12:35:20 +05:00
Sergey Sharybin
8b3ad25862 Transform: Enable recursion dependency check for new depsgraph 2017-09-15 12:25:57 +05:00
Sergey Sharybin
4bd014e951 Depsgraph: Fix crash in masking, related on T52749 2017-09-14 16:23:16 +05:00
Sergey Sharybin
75f36266df Merge branch 'master' into blender2.8 2017-09-14 16:17:22 +05:00
Sergey Sharybin
09c6c6c486 Fix T52749: New Depsgraph - Render View Mask is not initialized correctly 2017-09-14 16:12:01 +05:00
Sergey Sharybin
f7163a7d0a Fix T52741: Follow track with depth object crashes Blender with new depsgraph 2017-09-14 12:31:54 +05:00
Sergey Sharybin
74eed8e30e Fix T52705: Lamps shadows are not refreshed when tweaking lamps parameters
Lamp and camera datablocks updates should flush some updates to corresponding
objects. Currently it's done as Parameters -> Parameters relations.
2017-09-12 11:58:30 +05:00
Sergey Sharybin
fbcf05f443 Depsgraph: Copy-on-write component does not depend on itself 2017-08-30 11:15:58 +02:00
Sergey Sharybin
d34dac1070 Depsgraph: Fix crash when ungrouping node group
We shouldn't tag both COW and shading parameters ocmponents for update at
the same time.
2017-08-29 17:12:43 +02:00
Sergey Sharybin
9deccce07d Depsgraph: Fix missing material update when driving property in a group 2017-08-29 17:03:07 +02:00
Sergey Sharybin
852d702da0 Fix possibly missing flushes back to copy-on-write operation
Could have happened if multiple tags per object happens.
2017-08-29 16:28:06 +02:00
Sergey Sharybin
f846846941 Depsgraph: Fix missing updates when tweaking node tree parameters
The is following: split copy on write update for node trees, and if we are only
tagging for uniform buffer update we skip whole datablock copy and only invoke
copy default_values form original nodetree to a copied one.

Thing which i'm not sure is: whether we need to use different branches in graph
itself to control such a conditional behavior, or whether we need to store tag
somewhere in the dependency graph. There are obviously cons and pros in both
approaches, and need to think about this. Maybe with more examples it becomes
more obvious which way is better.

This only fixes manual tweaks for now, animation support is coming.
2017-08-29 12:58:55 +02:00
Sergey Sharybin
83ea224a7f Depsgraph: Fix missing updates when changing node tree topology
There were two issues here:

1. material_update did not do anything, because DEG_id_tag_update was storing
   update tags in original IDs, which had nothing evaluated. Even more, material
   update should have been called with evaluated version of material, Solved
   this by copying update tag from original ID to a copied one.

   However, perhaps DEG_id_tag_update should tag both original and copied ID,
   so updates are never gets lots if some depsgraph is not visible.

2. Tagging material for update should ensure it's copied version of node tree is
   up to date, otherwise material will still use old node tree.

This solves missing material updates when changing topology. Tweaking values is
still broken, because of GPUMaterial using pointer to original node's socket
value, which gets broken after copy-on-write of the node tree (pointers of nodes
are changing).
2017-08-29 11:32:25 +02:00
Sergey Sharybin
156c0ab255 Depsgraph: Don't case ID_Type to short 2017-08-28 11:51:53 +02:00
Sergey Sharybin
52dd5c5fcf Merge branch 'master' into blender2.8 2017-08-28 11:44:39 +02:00
Sergey Sharybin
b4b1397ad9 Depsgraph: Don't cast ID_Type to short 2017-08-28 11:43:36 +02:00
Sergey Sharybin
49e7b77b19 Depsgraph: Pass copy-on-write pointer to material update
Unfortunately, there is something else wrong going on here, which makes objects
black after tweaking material settings.
2017-08-28 11:00:42 +02:00
Sergey Sharybin
33f9b6d016 Depsgraph: Fix crash editing mesh in edit mode 2017-08-24 16:01:08 +02:00
Sergey Sharybin
97fadb7b59 Depsgraph: Cleanup typo 2017-08-24 15:52:52 +02:00
Sergey Sharybin
a679457263 Fix T51907: New Depsgraph - Camera constraint is not evaluated properly
This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.
2017-08-24 14:35:48 +02:00
Sergey Sharybin
9cfb72ff81 Merge branch 'master' into blender2.8 2017-08-22 16:31:33 +02:00
Sergey Sharybin
9f40153094 Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent 2017-08-22 16:27:33 +02:00
Sergey Sharybin
f3e02eb32e Depsgraph: Cleanup, make code friendlier to be edited in columns 2017-08-22 16:24:58 +02:00
Sergey Sharybin
c80ab62aee Depsgraph: Remove placeholder for path evaluation
Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.
2017-08-22 16:12:01 +02:00
Sergey Sharybin
1155fc94fd Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Most likely needs in 2.79 final release.
2017-08-22 12:53:34 +02:00
Dalai Felinto
2b95617b15 Update code comments from DAG_id_tag_update to DEG_id_tag_update 2017-08-16 12:00:45 +02:00
Dalai Felinto
18ce2bfac6 Depsgraph/Layers: Keep original visibility when doing full scene copy
Originally we were not respecting the original visibility flags of the
collections. However this is required for Copy-on-write (CoW).

Remember to update the svn lib tests folder. I had to update some of the
json files there.

Also adding a new unittest for this particular issue:
Test render_layer_scene_copy_f
2017-08-16 10:35:26 +02:00
Campbell Barton
ac17f29b2f Cleanup: quiet warnings 2017-08-12 14:07:26 +10:00
Campbell Barton
ccb8e78d6c Cleanup: whitespace 2017-08-12 13:43:40 +10:00
Bastien Montagne
e8b6bcd65c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/editors/object/object_add.c
	source/blender/python/intern/bpy_app_handlers.c
2017-08-08 16:43:25 +02:00
Sergey Sharybin
90b3dba515 Fix T52255: New Depsgraph - Constraint and Drivers not working together when the driver references itself 2017-08-08 15:27:25 +02:00
Sergey Sharybin
126830b56c Depsgraph: Cleanup, make it easier to debug on laptop 2017-08-08 15:27:25 +02:00
Bastien Montagne
e673c9dc93 Merge again... 2017-08-07 20:48:22 +02:00
Sergey Sharybin
c27446b5a0 Depsgraph: Fix wrong data type used for armature tag
Spotted by Ray aka LazyDodo, thanks!
2017-08-03 08:19:13 +02:00
Sergey Sharybin
50cc0aa0d1 Depsgraph: Re-use evaluated mesh across frames and remove time dependency from all CoW components
This commit is a work forward having less updates during playback, which speeds
things up a lot here. The idea is simple: stop update all copy-on-write
datablocks (which implies full re-evaluation actually) on frame change and
re-use existing evaluated meshes as much as possible.

This brings playback speed to 24 fps on the dino test scene here. Performance
drops down a lot when armature is animated tho, but that's because of need of
tangent space calculation which we can't do much about from just a dependency
graph.

Hopefully this doesn't make copy-on-write too unstable, quick tests here are
surviving fine.
2017-07-28 12:27:34 +02:00
Sergey Sharybin
549f43e928 Depsgraph: Attempt to keep evaluated mesh when possible
Currently wouldn't make any difference, but required for upcoming work of
getting rid of time dependency for copy-on-write component.
2017-07-27 15:19:37 +02:00
Sergey Sharybin
6ef34525a1 Depsgraph: Cleanup, variable name 2017-07-27 15:19:37 +02:00
Sergey Sharybin
e90468e5a3 Depsgraph: Cleanup, use some utility functions to shorten construction code
Still some cleanup is possible.
2017-07-27 15:19:36 +02:00
Sergey Sharybin
cf38371155 Depsgraph: Create ID nodes on build-time expansion using node builder
This will allow us to do some builder-specific trickery when ID nodes are
requested to be created from build-time expansion.
2017-07-27 15:19:36 +02:00
Sergey Sharybin
55527d83e2 Depsgraph: Allow stealing copy-on-written pointer
This will become handy when we'll be re-using evaluated meshes for
objects after relations are updated.
2017-07-27 15:19:36 +02:00
Sergey Sharybin
3441af49bd Depsgraph: Fix possibly missing lamp update when lamp data changes 2017-07-27 15:19:36 +02:00