Commit Graph

82442 Commits

Author SHA1 Message Date
Sergey Sharybin
773110f848 Depsgraph: Save memory by ignoring invisible objects
This finished old standing TODO which was attempting to
ignore objects of all invisible collections.

The difference here is that we remove invisible bases from
view layers. This guarantees that the evaluated state is
consistent and does not reference original objects.
2018-11-15 11:43:12 +01:00
Sergey Sharybin
156fe74f91 Depsgraph: Fix/workaround crash after recent point cache changes
For some reason relations can not always be found. This is to be
investigated, but doesn't hurt to be safe here. Also allows to
unlock production.
2018-11-15 11:43:12 +01:00
Sergey Sharybin
4a3a4eef14 Depsgraph: Use more human readable relation keys identifier 2018-11-15 11:43:12 +01:00
Campbell Barton
48c137ad5d UI: remove node tree panels
This duplicates items in the add menu and uses a lot of vertical space.

This should be used for tools or disabled.
2018-11-15 19:36:32 +11:00
Campbell Barton
b8d21f9b9b Cleanup: typo, whitespace 2018-11-15 18:50:18 +11:00
Campbell Barton
5ec1d709e7 WM: use Python bytecode cache to run presets
Key-maps can be very large, avoid parsing on every startup.
2018-11-15 18:46:00 +11:00
Campbell Barton
49cd13768f UI: 'Add Object' rename dimensions
D3943 by @Zachman w/ edits
2018-11-15 17:44:50 +11:00
Campbell Barton
7c03365861 WM: use spacebar press event (not double click)
Functionality) is nicer but this uses a hack to make it work,
keep the code under a variable in case we want to remove.
2018-11-15 17:12:33 +11:00
Campbell Barton
02a21420e8 Fix gizmos in the node editor 2018-11-15 15:43:50 +11:00
Campbell Barton
8c7727946c Gizmo: tweak navigation drawing for axis views
Axis aligned views now show both small/large handles,
this makes it possible to well if the view is in front or behind.
2018-11-15 14:11:08 +11:00
Campbell Barton
b3d84853ac Keymap: remove keymap export that wrote API calls
Use new keymap format which defines data to be loaded.
2018-11-15 13:51:55 +11:00
Campbell Barton
8734a09379 Tool System: use preset keymap loading logic
The data structures for tool keymaps and presets were different,
use the same structure and expose function publicly.
2018-11-15 13:38:27 +11:00
Campbell Barton
349d85eb9e Missed when moving tool keymaps 2018-11-15 13:34:47 +11:00
Campbell Barton
02d77e5bf5 Keymap: use parameters for tool keymap 2018-11-15 12:54:44 +11:00
Campbell Barton
27eba3867a Keymap: move tool system keymaps into the default keymap
Note that tools can still define their keymaps,
since it's useful for add-ons.
2018-11-15 12:45:45 +11:00
Campbell Barton
c94f806dc7 WM: remove warning when toolbar not found
Not useful for general usage, so removing.
2018-11-15 09:51:37 +11:00
Campbell Barton
3ecc79fa1a Gizmo: use color fading to show depth for navigate
Previously the positive axis was always brighter,
now use bright colors which face towards the view.
2018-11-15 09:44:03 +11:00
Campbell Barton
28e7c94de2 Gizmo: minor fix for navigation axis color
When view aligned, the near axis was hidden,
making it seem as if the opposite axis was at the front.
2018-11-15 08:17:16 +11:00
Campbell Barton
d04947b422 Gizmo: skip text drawing w/ select for navigate
Also use struct for storing extra args.
2018-11-15 07:59:03 +11:00
Jacques Lucke
78207eac9b Py API Docs: New custom shader example 2018-11-14 18:41:33 +01:00
6f08124fbd Fix assert in bevel modifier with certain geometry.
This happened in in the barbershop_interior.blend benchmark file, seems
duplicate hash entries are ok for this algorithm.
2018-11-14 18:21:28 +01:00
Bastien Montagne
a4fccde67a Fix some templates for 2.8. 2018-11-14 18:21:06 +01:00
Bastien Montagne
844c7440fc Fix (unreported) bpy.ops.wm.read_factory_settings(use_empty=True) crash.
`BKE_blendfile_read_make_empty()` was not preserving workspaces...
2018-11-14 18:21:06 +01:00
Alexander Gavrilov
e20557046b Depsgraph: suppress logs from add_relation on invalid driver variables.
Rig generators (e.g. rigify) use dummy drivers to attach extra
ID references to rigs for Append/Link. These references use
Single Property variables with empty path, which is intentionally
invalid and shouldn't produce low-level error logs from depsgraph.

The removed code would always print an error because RNAPathKey
requires a valid path to produce a non-NULL reference.
2018-11-14 20:18:48 +03:00
Alexander Gavrilov
10bab568d3 Fix assertion failure evaluating depsgraph on an empty armature.
If there are no bones, chan_array may not be allocated.
2018-11-14 19:15:41 +03:00
Bastien Montagne
b44e6f2b3d Fix T57760: Depsgraph 'object_instances' showing incorrect list of objects.
It appears that Python gets next item before using current one, which
would break our Depsgraph instance iterator (since only current item is
valid there, we use the same memory at each iteration).

Working around that with an ugly ping-pong game between two sets of
iterator data, so that previous one (C RNA-iterator-wise) remains valid
memory for Python to access to.
2018-11-14 17:07:02 +01:00
Bastien Montagne
d2dd278c5e Fix typo in comment. 2018-11-14 17:07:02 +01:00
Bastien Montagne
b785586232 Fix T57558: Outliner displaying same object twice in some cases.
Logical flaw in `BKE_scene_objects_iterator_begin()` code (two errors
actually, wrong handling of first object of Master collection, and
missing call to `object_base_unique()` to 'register' that first object
and avoid getting it returned a second time).

Simply fixed by always calling `BKE_scene_objects_iterator_next()`
after minimal proper init, that one knows how to do the things. ;)
2018-11-14 17:07:02 +01:00
Jacques Lucke
46ac317a29 Py API Docs: documentation for gpu_extras.presets 2018-11-14 16:43:48 +01:00
Sergey Sharybin
eefae747da Depsgraph: Remove meaningless evaluation mode
With the current implementation it only confuses logic around
checks like vewport/render subdivision levels.

If this mode is really needed for any decision making, implement
this properly.
2018-11-14 14:08:39 +01:00
Sergey Sharybin
d3c08b1aa6 Depsgraph: Fix missing point cache reset when physics changes
Among all the lines moved around, the general idea is quite simple.
Actually, there are two ideas implemented there.

First one, is when object itself is tagged for update, we tag its
point cache component for evaluation, which makes it so point cache
is properly reset. We do it implicitly because otherwise we'll need
to go everywhere and add explicit tag in almost all the properties.

Second thing is, we link all collider and force fields to a point
cache component using special type of link. This type of link only
allows flush if change is caused by a user update. This way reset
does not happen when change is caused due to animation, but will
properly happen when user causes indirect change to the objects
which are part of physics simulation.
2018-11-14 14:08:39 +01:00
Sergey Sharybin
1d8db50538 Depsgraph: Remove unused operation code 2018-11-14 14:08:39 +01:00
Sergey Sharybin
39cd872acb Add function to query whether object has any point cache 2018-11-14 14:08:39 +01:00
Sergey Sharybin
ec2fea733b Make object point cache iteration more generic
Currently should be no functional changes, but this will
simplify implementing some incoming logic.
2018-11-14 14:08:39 +01:00
Sergey Sharybin
fdd1fea851 Depsgraph: Cleanup, code style
Should be no functional changes.
2018-11-14 14:08:39 +01:00
Campbell Barton
1386a4a0f2 Gizmo: get background color based on view option 2018-11-15 00:05:54 +11:00
Campbell Barton
69a04c6140 Cleanup: correct flag comparisons
Also use smaller types for shading data.
2018-11-14 23:31:06 +11:00
Jacques Lucke
69a9bcc206 minor cleanup 2018-11-14 13:06:11 +01:00
Jacques Lucke
61ecd3d24e minor cleanup 2018-11-14 13:06:10 +01:00
Philipp Oeser
4722003ca5 Fix icon in Clip Editor header (Graph view type with enabled Filters)
fix provided by sebastian_k over IRC, thx!
2018-11-14 12:39:59 +01:00
Philipp Oeser
57573e0da9 Fix copy tracking settings operators
use keyword arguments
2018-11-14 12:39:59 +01:00
Jacques Lucke
8778656692 minor api docs fix 2018-11-14 12:33:10 +01:00
Jacques Lucke
92166ecd91 Py API: Remove GPUShader.transform_feedback_enable/disable
It couldn't really be used in the current implementation, so it is better to remove it instead of confusing everyone.
2018-11-14 12:27:09 +01:00
Alexander Gavrilov
5c27c76ed3 Depsgraph: fix relations for drivers on bone weight in Armature constraint. 2018-11-14 14:01:40 +03:00
Clément Foucault
43ee433dce UI: Comment out "Clip border" operator
Also Remove it from the UI as it has not been ported to 2.8 and it is a
delicate thing to do.
2018-11-14 11:50:37 +01:00
Clément Foucault
c3d03b4434 Lamps: Remove HEMI light type
This type is not supported by either Eevee or Cycles. If other types of
lamps are needed by external engines, we should support adding custom types.
2018-11-14 11:50:37 +01:00
Campbell Barton
0b0b3d7f7e Keymap: assigning keys for tools now checks mode
Adding shortcuts to tools was always adding to the top-level window map.
2018-11-14 20:26:00 +11:00
Campbell Barton
f91b797b2b Tool System: remove duplicate gpencil draw UI
Tool properties showed options twice.
2018-11-14 19:19:04 +11:00
Campbell Barton
477407bd3b Gizmo: draw navigation negative axes over positive
Using low alpha meant it wasn't possible to see which was in-front.
2018-11-14 18:00:20 +11:00
Campbell Barton
cf6a101d23 Correct assert generating tool tip/keymap 2018-11-14 17:40:12 +11:00