Commit Graph

1297 Commits

Author SHA1 Message Date
bf2c5217b3 Fix T61231: File open and undo looses unkeyed changes
Only flush copy-on-write to animation when user makes changes.
2019-02-08 12:17:00 +01:00
0abf754748 Cleanup: sort struct blocks, description 2019-02-08 07:29:21 +11:00
fb15dfbddf Depsgraph: Fix dependency cycle when rigid body is involved
Was introduced by point cache reset on manual edits. Needed to
split evaluation and introduce an explicit init key, which allows
to hook up relations which are "monitoring" manual edits to the
channel.

Noticed while looking into T61190.
2019-02-06 17:08:24 +01:00
48a36ff9e9 Cleanup: manually apply changes missed last commit
Automatic edits failed for indented comment blocks,
removed indentation & adjusted.
2019-02-06 15:52:04 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Dalai Felinto
897e047374 Outliner visibility unification: Implement 3 levels of viewport visibility
Now collection and objects can be either:
* Disabled for all the view layers.
* Hidden for a view layer but not necessarily for all others.
* Visible for a view layer but not necessarily for all others.

Regarding icons: Whatever we decide to use for the "Hidden for all view
layers" needs to be a toggle-like icon. Because when viewing "Scenes"
instead of "View Layer" in the outliner we should be able to edit the
collection "Hidden for all the view layers" as an on/off option.

The operators are accessible via a Visibility context menu or shortcuts:
* Ctrl + Click: Isolate collection (use shift to extend).
* Alt + Click: Disable collection.
* Shift + Click: Hide/Show collection and its children (objects and collections)

Things yet to be tackled:
* Object outliner context menu can also get a Visibility sub-menu.
* Get better icons for viewport enable/disable.

Note:
* When using emulate 3 button mouse alt+click is used for 2d panning.
  In this case users have to use the operator from the menu.

See T57857 for discussion.

Patch: https://developer.blender.org/D4011
Reviewers: brecht and sergey

Thanks to the reviewers and William Reynish and Julien Kasper in
particular for the feedback.
2019-02-05 19:32:58 -02:00
Dalai Felinto
3d984aa150 Per view-layer collection visibility
[re-committing]

We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.

If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.

Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.

Development Note:

Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.

If this proves to be too slow, we can change.
2019-02-05 18:42:02 -02:00
72724211df BKE_library: add 'no preview' flag to LIB_ID_COPY_LOCALIZE.
No local work copy is expected to need preview data, at least it should
not. Part of copy flags cleanup, done in separate commit in case
something goes wrong here...
2019-02-05 10:53:11 +01:00
b26c9dfcb2 Cleanup: initial regrouping of ID create/copy flags.
Those two first sets of flags should represent some common use cases.
The goal here is to reduce verbosity of calls to BKE_id_copy_ex, and
help make it more obvious the 'common behaviours' of ID copying across
codebase.
2019-02-05 09:49:50 +01:00
6a686b0bfb Cleanup: BKE_library: rename id_copy to BKE_id_copy.
Time to follow conventions for that one as well.
2019-02-05 09:49:50 +01:00
7636e9785d Cleanup: BKE_library: remove 'test' param of id_copy.
This was used in *one* place only... much better to have a dedicated
helper for that kind of things. ;)
2019-02-05 09:49:50 +01:00
ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
3b57a0d854 Cleanup: remove original author
Missed when removing contributors.
2019-02-02 02:32:20 +11:00
227ed1aa35 Fix T60451: Soft body cache not being cleared when it should
Manual edits to object or its dependencies should reset the
point cache. Added special relations for this now.
2019-02-01 15:40:19 +01:00
97fa7974da Cleanup: Shuffle arguments in most used order
Quite often we need to create nodes which defines various
evaluation stages.
2019-02-01 15:40:19 +01:00
a1aa908a31 Depsgraph: Remove placeholder operation 2019-02-01 15:40:19 +01:00
039792caf3 Depsgraph: Use scene operation code
Hopefully, this is the last one.
2019-02-01 15:40:19 +01:00
b78f29b049 Depsgraph: Use operation code for file cache update
All done in separate commits, so it's easier to bisect just in case.
2019-02-01 15:40:19 +01:00
0d2dfd2e2d Depsgraph: Use operation code for armature evaluation 2019-02-01 15:40:19 +01:00
4a30674102 Depsgraph: Use operation code for dupli-group 2019-02-01 15:40:19 +01:00
c1cf4c29da Depsgraph: Use operation code for geometry evaluation done 2019-02-01 15:40:19 +01:00
a86001c56a Depsgraph: Use operation code for geometry evaluation
Affects object data datablocks. Similar to previous commit.

Should not have any functional changes, just some sanitization
to make code more clear.
2019-02-01 15:40:19 +01:00
700e3cc2a8 Depsgraph: Use operation code for geometry evaluation init
Makes it more explicit and avoids strings comparisons during build.
2019-02-01 15:40:19 +01:00
6a54f3bb49 Depsgraph: More clear name for geometry evaluation
For ears it was already how we evaluate modifiers. There is no
need to go more granular than is actually needed. And no need
to use some obscure prefix for operation.
2019-02-01 15:40:19 +01:00
654ae4145f Cleanup: Space for foreach macro 2019-02-01 15:40:19 +01:00
be05abc86a Depsgraph: Add some sanity checks to ensure valid relations 2019-02-01 15:40:19 +01:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
8a51af7d1c Cleanup: correct doxy headers 2019-02-01 08:41:35 +11:00
7b08c62841 Fix build errors on Visual Studio after recent changes.
SYNCHRONIZE is a Windows macro.
2019-01-31 19:59:13 +01:00
208a0808b3 Fix T60836: Stretch to flickers when vertex group is used
Missing relation to object transform. Needed to convert vertex
position from local target object space to a local space of the
bone.
2019-01-31 17:57:01 +01:00
d2f3378249 Fix T59339: Particle render without baking issues
The issue was caused by dependency graph resetting particles
when evaluating copy-on-write version of object. Solved by
only doing reset from dependency graph on user edits.

Other issue was caused by modifier itself trying to compare
topology and reset particles when number of vertices or faces
changed. This isn't reliable, since topology might change even
with same number of elements. But also, since copy-on-written
object initially always have those fields zero-ed the reset
was happening on every F12.

The latter issue is solved by moving reset from modifier stack
to places where we exit edit/paint modes which might be changing
topology.

There is still weird issue of particles generated at some
weird location after tapping tab twice, but this is not a new
issue in 2.8 branch and is to be looked separately.
2019-01-31 16:53:19 +01:00
c1da8e3b28 Depsgraph: Comb code to a better state all over
Some summary of changes:

- Don't use DEG prefix for types and enumerator values:
  the code is already inside DEG namespace.

- Put code where it locally belongs to: avoid having one
  single header file with all sort of definitions in it.

- Take advantage of modern C++11 enabled by default.
2019-01-31 14:31:41 +01:00
9a7ea778b3 Fix T61030: Drivers for shape keys not evaluated in correct order
Was happening when value of one shape key was driving property of
another shape key of same datablock.

Solved by making shape key blocks properties more granular.
2019-01-31 13:00:11 +01:00
13de53ecc5 Depsgraph: Specify whether RNA path to be resolved as entry or exit
Makes it more explicit whether RNA property is used as a source
dependency for something else, or whether some other dependency
is being hooked up to evaluate that property.
2019-01-31 13:00:11 +01:00
39de1dc342 Cleanup: Spelling in comment 2019-01-31 13:00:11 +01:00
3ea54688b1 Depsgraph: Use more correct update source for an internal tags
Dependency graph will poke some IDs for recalc after finishing building.
Those shouldn't be considered as a user edit.
2019-01-31 13:00:11 +01:00
83ec5fbf8d Depsgraph: Use more clear name for enumerator
Matches enumerator items and type name.
2019-01-31 13:00:11 +01:00
83f8f44791 Fix T59495, T59992, T59904, T59178, T60598: broken keyframed value editing.
This removes a bunch of animation/driver evaluations and recalc flags that
should be redundant in the new depsgraph, and were incorrectly affecting
the evaluated scene in a permanent way.

Still two cases that could be removed if the depsgraph is improved, in
BKE_object_handle_data_update and BKE_cachefile_update_frame.

For physics subframe interpolation there are also still calls to
BKE_object_where_is_calc that should ideally be removed as well, though
they are not known to cause keyframing bugs.

Differential Revision: https://developer.blender.org/D4274
2019-01-31 12:04:57 +01:00
7400aa7e59 Depsgraph: remove features incompatible with new system.
Some features are incompatible with multithreading and reliable evaluation
of dependencies. We are now removing them as part of a bigger cleanup to
fix bugs in keyframing and invalid animation evaluations.

* Dupliframes have been removed. This was a hack added before there were
  more powerful features like the array modifier.
* Slow parent has been removed, never worked in 2.8. It was always
  unreliable for use in production due to depending on whatever frame was
  previously evaluated, which was not always the previous frame.
* Particle instanced objects used to have their transform evaluated at
  the particle time. Now it always gets the current time transform.
* Boids can no longer do predictive avoidance of force field objects,
  but still for other particles.

Differential Revision: https://developer.blender.org/D4274
2019-01-31 12:03:05 +01:00
ab682b1558 Cleanup: use better names for depsgraph driver relations.
Both the driven properties and driver targets were called targets, now make
a distinction.
2019-01-30 18:36:34 +01:00
8683a4ba40 Fix T59924: Blender 2.8 particle system error
Was missing relation from particle keyed targets to the
particle system, which caused some race conditions.
2019-01-29 10:34:37 +01:00
55e171be33 Fix T60566: Warnings in rigid body and certain conrfiguration
Was visible when constraint object is not directly visible via
view layers, need to indirectly pull it into the graph.
2019-01-28 16:39:55 +01:00
2e3433c1f7 Fix T60127: Particles texture mapping coordinates objects
Part of the issue was a missing relation. Other part wes
aboud object's inverse matrix never being updated.
2019-01-28 12:19:25 +01:00
66e6cd5315 Cleanup: unused struct declarations 2019-01-28 22:06:53 +11:00
c0f88ed8a8 Cleanup: sort forward declarations of enum & struct
Done using:
  source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
bfa8fcc542 Fix T60839: Deleting bevel object for curve will not update
Was missing conversion of ID_RECALC_GEOEMTRY to curve's operation.
2019-01-25 11:22:22 +01:00
820d1b249d Fix freestyle renders not including some types of animation.
Freestyle Python scripts need to get the evaluated view layer and scene,
not the original one.
2019-01-24 16:46:11 +01:00
41a7dd383c Cleanup: style 2019-01-24 09:27:14 +11:00
32c2e941e6 Fix T60417: Hair not instantly updating when editing curve guide
Reviewers: sergey, brecht

Maniphest Tasks: T60417

Differential Revision: https://developer.blender.org/D4193
2019-01-23 20:47:43 +01:00