Commit Graph

72769 Commits

Author SHA1 Message Date
Campbell Barton
1b2f8b2754 Merge branch 'master' into blender2.8 2017-12-04 16:51:07 +11:00
Campbell Barton
5c27523808 Cleanup: wrap long function args in seqeffects 2017-12-04 16:49:30 +11:00
Campbell Barton
d47d263b4b Cleanup: style 2017-12-04 16:37:31 +11:00
Campbell Barton
705d214349 Fix crash w/ template search & invalid property 2017-12-04 16:19:01 +11:00
Bastien Montagne
09cade6ca4 Fix MSVC compilation, there is no 'Designated initializers' in C++!
Looks like gcc is at the very least missing a warning here!
2017-12-02 18:25:09 +01:00
Campbell Barton
e1eb1fbfca BLI_ghash: Description of GHash, GSet
Also some re-indenting.
2017-12-03 03:35:45 +11:00
Campbell Barton
9f12eb087f Cleanup: minor change to API use 2017-12-02 22:42:14 +11:00
Campbell Barton
c2d795ebf8 Cleanup: indentation 2017-12-02 22:35:09 +11:00
d64d8b5be5 Fix Cycles standalone crash when saving output, after recent refactoring. 2017-12-02 05:45:09 +01:00
Germano
0c37824bfa Draw Maganer: Cleanup: Remove unnecessary lines of code in draw_cache_impl_metaball.c 2017-12-01 18:25:46 -02:00
Dalai Felinto
aa0c9867b2 unittests: Update (fix) unittests after workspace API change
Tests were broken since e8c15e0ed15f8369d.

We now get view_layer from window, not workspace, since the same workspace can
have a different view_layer depending on the window scene.
2017-12-01 16:08:52 -02:00
Dalai Felinto
e9cf3fae8e Fixup for workspace view_layer fix
We do not assume subversion bump until we actually change the subversion.

For example, a branch may have bumped its subversion to 3, yet still require
the new doversion code introduced on 108c4bd5026.
2017-12-01 15:28:29 -02:00
Julian Eisel
108c4bd502 Fix crash reading 2.8 files with workspace.view_layer set
Stupid error from e8c15e0ed15f8369d.

Also removed WorkSpace.view_layer usage and marked as deprecated.
2017-12-01 18:14:24 +01:00
Sergey Sharybin
d10578df46 Depsgraph: Call editors update after everything was flushed
This way we can inform editors about all edits at once. Currently this is not
used, but in the next commits we will inform editors about what exactly has
changed.
2017-12-01 17:59:47 +01:00
Bastien Montagne
bbb86a85fc Cleanup: Proper silencing of unused vars( for now). 2017-12-01 17:58:15 +01:00
Bastien Montagne
3d50722cf5 Fix warnings in release builds. 2017-12-01 17:42:13 +01:00
Bastien Montagne
a5454e8711 Cleanup: forgot to rename RNA prop flag to override_static... 2017-12-01 17:42:13 +01:00
Sergey Sharybin
6365ddcab5 Depsgraph: Separate loop for ID node flags clear
This ends up in less number of memory writes, which should have positive effect
on performance.
2017-12-01 17:32:00 +01:00
Dalai Felinto
59e8b72881 Fix update of non-scene owned layer collections
We are using NC_SCENE | ND_LAYER_CONTENT for the shader, however this does not work for groups
unless we manually handle the notifiers.

Otherwise the group id is passed, and the listener never gets the notification since a scene id
is expected, or no id at all.
2017-12-01 14:15:54 -02:00
Dalai Felinto
f91e057786 Groups and collection: editing group collections
Allow users to edit either the object group active collection or view layer one

We can't support users selecting the group collections from the outliner group
because that would be imply having an active group for the scene or workspace.

But the way it is now allows to see and edit the collection values after the
group is instanced.
2017-12-01 14:15:54 -02:00
Dalai Felinto
aeaf87bbeb Groups and collection: create group from collection
You could still create groups as before, with Ctl + G. This will create a group
with a single visible collection.

However you can also create a group from an existing collection. Just go to
the menu you get in the outliner when clicking in a collection and pick
"Create Group".

Remember to instance the group afterwards, or link it into a new scene or file.

The group and the collection are not kept in sync afterwards. You need to manually
edit the group for further changes.
2017-12-01 14:15:54 -02:00
Dalai Felinto
be9e469ead Groups and collection: initial integration
Since we are ditching layers from Blender (2.8) we need a replacement to
control groups visibility. This commit introduces collections as the building
blocks for groups, allowing users to control visibility as well as overrides
for groups.

Features
========

* Groups now have collections
    This way you can change the visibility of a collection inside a group, and add
    overrides which are part of the group and are prioritized over other overrides.

* Outliner
    Groups can inspect their collections, change visibility, and add/remove members.

    To change an override of a group collection, you need to select an instance of
    the group, and then you can choose "group" in the collection properties editor
    to edit this group active collection instead of the view layer one.

* Dupli groups overrides
    We can now have multiple instances of the same group with an original "override"
    and different overrides depending on the collection the instanced object is part
    of.

Technical
=========

* Layers
    We use the same api for groups and scene as much as possible.

Reviewers: sergey (depsgraph), mont29 (read/write and user count)
Differential Revision: https://developer.blender.org/D2892
2017-12-01 14:15:54 -02:00
Julian Eisel
e8c15e0ed1 Workspaces: Store an active view-layer per scene
Instead of storing a single active view-layer in the workspace, one is
stored for each scene the workspace showed before.
With this, some things become possible:
* Multiple windows in the same workspace but showing different scenes.
* Toggling back and forth scene keeps same active view-layer for each scene.
* Activating workspace which didn't show current scene before, the current view-layer is kept.

A necessary evil for this is that accessing view-layer and object mode
from .py can't be done via workspace directly anymore. It has to be done
through the window, so RNA can use the correct scene.
So instead of `workspace.view_layer`, it's `window.view_layer` now (same
with mode) even though it's still workspace data.

Fixes T53432.
2017-12-01 16:15:30 +01:00
Sergey Sharybin
983b1a3478 Depsgraph: Cleanup, simplify evaluation flush function
Also avoid once queue push for cases when current operation has multiple
outgoing relations.
2017-12-01 16:05:17 +01:00
Dalai Felinto
a9101b332e Silence warning from object_relations.c 2017-12-01 12:39:55 -02:00
Sergey Sharybin
92ff0d562c Depsgraph: Remove legacy recalc flag from DNA 2017-12-01 12:26:32 +01:00
Sergey Sharybin
3b706723ac Depsgraph: Remove clear of legacy unused flag 2017-12-01 12:18:19 +01:00
Sergey Sharybin
a96e97a83f Depsgraph: Move away from setting old deprecated object recalc flags
Those shouldn't be used anywhere for real now.
2017-12-01 12:17:23 +01:00
Sergey Sharybin
9bbffd4e02 Depsgraph: Don't use legacy flags in versioning code
Wondering whether files from 2.37 are still working fine.
Don't have that version of Blender running here, so can't test :(
2017-12-01 12:16:29 +01:00
Sergey Sharybin
b2952023b6 Depsgraph: Use per-ID flags to see whether update is needed
This is actually functions which needs bigger reconsideration, but for now let's
try to keep them working as much as possible.
2017-12-01 12:11:38 +01:00
Sergey Sharybin
146f2e1d02 Depsgraph: Use new per-ID tags to see whether object in a group needs an update
This wouldn't be less precise than object level flag in theory, and we need to
move away from such a duplicating flags.
2017-12-01 12:09:26 +01:00
Sergey Sharybin
ecbdc3f1d4 Transform: Avoid attempt to bypass dependency graph update
It's not possible to bypass new depsgraph, but also flush to other CoW copies
might be needed here.
2017-12-01 12:07:41 +01:00
Sergey Sharybin
2ae709d282 Transform: Use new DEG query API to see what's being affected by a changing object
This avoids us from directly calling object update, and doing other type of
update flushing.

Prepares us to get rid of Object->recalc flags.
2017-12-01 11:40:50 +01:00
Sergey Sharybin
0591fb17e9 Depsgraph: Add query API to traverse all dependent IDs of the given ID 2017-12-01 11:40:50 +01:00
Sergey Sharybin
7270e8cc8f Depsgraph: Move iterator to own implementation file 2017-12-01 11:40:50 +01:00
Sergey Sharybin
59d3a17e3a Depsgraph: Cleanup, use enum value rather than a define 2017-12-01 11:40:50 +01:00
Sergey Sharybin
27a1bd445b Depsgraph: Cleanup, naming
It makes more sense to stick to DEG_iterator_object order in name, since we can
have functions to iterate over different entities and we want all of them to
have common prefix.
2017-12-01 11:40:50 +01:00
Germano
2838a7646b _gawain python module: Add methods "program_use_begin" and "program_use_end"
Required to updade uniforms
2017-12-01 04:25:47 -02:00
Germano
605ce90c54 RNA: Fix unreported: Some callbacks called when updating properties were incorrect 2017-11-30 16:53:15 -02:00
Bastien Montagne
1d33843ea6 Removing OMP: legacy ccgsubsurf.
Performances gain is rather low this time, about 5% on average (in whole
affected functions).
2017-11-30 19:48:23 +01:00
Dalai Felinto
58c743f7cc Depsgraph: Add assert to make sure the view layer is part of the scene
Which is not in some cases since workspace is still partly implemented.
2017-11-30 13:44:34 -02:00
Sergey Sharybin
f3de312b83 Transform: Fix recent merge conflict resolution fiasco
Why is it called legacy when this is a legit flags which are still to be checked
at a runtime???
2017-11-30 16:36:24 +01:00
Sergey Sharybin
a989913dd4 Merge branch 'master' into blender2.8 2017-11-30 15:11:06 +01:00
Sergey Sharybin
c241d79dc8 Transform: Use single flag with more meaningful name to prevent snapping to a dependent object
The idea of this flag was to prevent snapping onto an object which depends on
currently modifying ones. Using single flag makes more sense here, and also
makes it possible to replace some ob->recalc based magic with depsgraph query
to set those flags.
2017-11-30 15:03:48 +01:00
Sergey Sharybin
47a4a7c8b7 Transform: Remove some legacy code about snapping in particle edit mode
It looks stupid to first force some flag being set and then have workaround
to ignore that flag in snapping code. Let's just not set the flag in the first
place.

The only useful situation where such snapping was usable is to move roots of
disconnected hair, which still works just fine. However, there might be some
other hidden corner case where this workaround was needed.
2017-11-30 14:52:34 +01:00
Dalai Felinto
79bbbf7e20 Fix memory leak when single_obdata_users() fails to copy datablock 2017-11-30 11:08:48 -02:00
Dalai Felinto
ba17d53e59 Fix lightprobe single user not working 2017-11-30 11:08:48 -02:00
Sergey Sharybin
edef559808 Depsgraph: Fix crash on playback of animated objects when CoW is enabled
We should keep base_flags after CoW object datablock was updated. Not entirely
happy with current solution, but it fixes crash and allows us to run tests
again.

More proper solution would be to make CoW operation a per-component thingie,
which will only update corresponding parts.
2017-11-30 13:42:56 +01:00
Dalai Felinto
33d2535189 Layer: Copy layer collection properties when doing a full copy of scene 2017-11-30 10:08:26 -02:00
Sergey Sharybin
69a7ece389 Depsgraph: Fix wrong remapping of compositor node tree when CoW is enabled 2017-11-30 12:36:37 +01:00