Commit Graph

76794 Commits

Author SHA1 Message Date
Campbell Barton
474971f3d8 Cleanup: unused var 2018-05-27 11:06:11 +02:00
Clément Foucault
198be6f37b Grid: Fix T51813: Opaque grid on OSX. 2018-05-27 10:50:39 +02:00
Clément Foucault
aefc793a81 Workbench: Shadow: Refine camera in shadow test.
Test if all nearplane points are not in front of the shadow BBox.
2018-05-27 00:15:47 +02:00
Clément Foucault
60ddea7758 Workbench: Shadows: Add frustum check and camera occlusion test.
If the object is manifold and the camera is in the shadow side, we can
use the depth fail method to fix the inverted shadow glitch.

Unfortunately this does not really work for non-manifold.

Implementation details:
We try to be as efficient as we can, we precompute camera near plane
projected into 2D shadow space so we can test for intersection with the
shadow boundbox easily.

As the intersection test is done in 2D it's pretty fast.
Unfortunately, this means the shadow bounds are all aligned to the same
space and are not the smallest bound we could extract.
2018-05-26 23:31:17 +02:00
Clément Foucault
975828e23a Armature: Fix warning. 2018-05-26 23:24:11 +02:00
Clément Foucault
8df99a5d8a DRW: Add new DRW_debug API.
This new API aim to provide simple function that can be called by the draw
engines during any phase of the draw pipeline. All calls are saved and
issued after all engines have finished rendering.

This removes the need of setuping special passes and shading groups for some
simple debug drawing.
2018-05-26 23:24:11 +02:00
Clément Foucault
c883f09fa8 Workbench: Codestyle 2018-05-26 23:24:11 +02:00
Clément Foucault
975eac0b07 Workbench: Shadow: Add shader variant for manifold case.
Totally Manifold objects only require a single increment/decrement of the
stencil value. This result in less geometry generated and less overdraw.
2018-05-26 23:21:33 +02:00
Clément Foucault
0c9974c8cd Workbench: Shadow: Use depth fail method for manifold objects.
Since this method have no failure case for manifold objects, use it.
2018-05-26 23:01:30 +02:00
Clément Foucault
44935fdfa3 Armature: Make Custom bone have the same appearance as other bones.
I had to correct some errors in the winding order of the normal bones.
2018-05-26 22:28:52 +02:00
Clément Foucault
2241a61aab Armature: Fix missing bone edges in object mode. 2018-05-26 22:28:52 +02:00
Clément Foucault
6b38fa8cab Armature: Modify Shape outline shader to use Line adjacency instead of tri.
This is much faster and simpler. This is also to make it compatible with
custom bone shape in the future.
2018-05-26 22:28:52 +02:00
Campbell Barton
581b021a1f Cleanup: unused defines 2018-05-26 13:15:55 +02:00
Campbell Barton
c9c95ed25f Cleanup: unused defines 2018-05-26 13:12:00 +02:00
Campbell Barton
75355ef426 RNA: correct naming w/ last cleanup 2018-05-26 13:06:40 +02:00
Campbell Barton
0d559a6730 RNA: follow boolean naming conventions 2018-05-26 11:54:25 +02:00
Campbell Barton
6ebcf98943 Cleanup: whitespace, long lines, duplicate include 2018-05-26 11:05:23 +02:00
Campbell Barton
3e3f6754b4 Cleanup: rename RNA property to match UI 2018-05-26 09:51:21 +02:00
Campbell Barton
33e45658eb COW Fix: Lamp manipulators 2018-05-26 09:45:58 +02:00
Germano
64ee6f4e9f Fix error when snapping with occlusion.
Face normal may be facing the wrong side.
2018-05-25 18:43:38 -03:00
Brecht Van Lommel
c9f7a3b32a Fix T55207, fix T55208: hair not positioned correctly after subsurf.
The problem was that the particle system modifier was reading ob->derivedDeform
during modifier stack evaluation. Due to the mesh -> DM conversion this was no
longer set leading to wrong results.

In fact we don't really need the deformed mesh, just the original mesh topology
for face/poly index remapping. So the solution is to use that instead.
2018-05-25 23:20:20 +02:00
Dalai Felinto
768706c6a5 Fix eevee render settings not working
This was no longer working since 15c2801aac.
2018-05-25 19:51:18 +02:00
Campbell Barton
a3a069f493 Tool System: cursor tool now transforms on drag 2018-05-25 19:43:23 +02:00
Campbell Barton
562cf573d3 Multi-Object-Mode: EditMesh UV snap to cursor
D3422 by @Al
2018-05-25 17:28:37 +02:00
Pablo Vazquez
1bf2a7709f Timeline: Move Keying settings from sidebar to header as popover
Having them on the sidebar means we have to expand the editor every time.
2018-05-25 17:02:56 +02:00
Pablo Vazquez
8a73ea7af2 Use menu back theme colors for popover 2018-05-25 17:02:56 +02:00
Joshua Leung
988a14aa14 COW Fix: Transforming animated objects would jump when starting transforms
Just as with my earlier fix for bones (0492e56fec),
here we're reading evaluated object values into the "i" versions of each transform
property, and using the original/non-evaluated data for the pointers.

XXX:
What's not clear though is what we should be doing with the "BKE_object_where_is_calc()"
calls here. They currently use ob, but that probably shouldn't happen... and ob_eval
should in theory have a more up-to-date version of what it would need to evaluate!
2018-05-25 16:36:04 +02:00
Campbell Barton
51926de7f0 UI: popover now only centers on active button once 2018-05-25 16:31:52 +02:00
Brecht Van Lommel
c0f9f69c7e Fix T55200: dragging object into hidden collection does not hide it. 2018-05-25 16:08:59 +02:00
Campbell Barton
5901c1ca42 UI: fix event handling direction
Correct arrow key direction in popovers,
also de-duplicate menu callback,
2018-05-25 15:47:12 +02:00
Joshua Leung
dd22080b9a Fix: X-Axis Mirror option was missing from the Pose Options popover
Although it's mostly a rigging option, sometimes it's useful to have it when posing.
2018-05-25 15:34:25 +02:00
Bastien Montagne
572a9619b9 Remove DerivedMesh: paint_utils.c; Cow-ify PAINT_OT_sample_color
DM was only using it for color sampling in the 3Dview. Now it's properly
using COW evaluated versions of object and mesh instead.
2018-05-25 15:24:30 +02:00
Brecht Van Lommel
40638e1970 Fix T55062: crash with workspace scene relations.
List of relations was saved with wrong struct type.
2018-05-25 15:06:40 +02:00
Germano
657fedbbee Style: use extra space for aligning parameters in a function. 2018-05-25 10:03:25 -03:00
Joshua Leung
8510472198 Cleanup: Change remaining BKE_scene_frame_get() in constraint.c to use DEG_get_ctime() 2018-05-25 14:49:11 +02:00
Joshua Leung
14b51b3974 Fix T55197: Dopesheet filtering settings were not triggering refresh anymore due to messagebus crap 2018-05-25 14:43:48 +02:00
Julian Eisel
dc26ef081b Fix T55198: Preferences Keybindings Crash
Operator sanitize function would be called for non operator props. Mistake from
88eafe078a5b5111c.
2018-05-25 14:04:48 +02:00
Brecht Van Lommel
45e7d609ce Fix outliner showing objects in collections instances.
It didn't do this before for groups, and while it could be useful this leads
to terrible performance when there are many instances.
2018-05-25 13:48:29 +02:00
Brecht Van Lommel
2cc53227ab Outliner: optimize lookup of unused tree elements. 2018-05-25 13:48:29 +02:00
Campbell Barton
b11a1d5da2 UI: support for a popup panel which stays open 2018-05-25 12:55:22 +02:00
Campbell Barton
e9908134e8 UI: Move UI_paneltype_draw into layout code
No functional changes, needed for persistent popovers.
2018-05-25 12:55:22 +02:00
Dalai Felinto
fbc65c6b28 Fix T55165: Driving camera lens with property behaves unexpectedly
Differential Revision: https://developer.blender.org/D3438
2018-05-25 12:48:33 +02:00
Campbell Barton
8a78a53e3b Keymap: place cursor on press
Needed for tablet users.
2018-05-25 12:46:52 +02:00
Bastien Montagne
d8a6c1d316 Cleanup/simplification for BKE_modifier_get_evaluated_mesh_from_object
* Added BKE_object_get_evaluated_mesh, which can also be used outside of
Modifier context.
* BKE_modifier_get_evaluated_mesh_from_object is now a dummy wrapper
around BKE_object_get_evaluated_mesh, we do not need anything special
anymore for RENDER quality option, since this is supposed to be handled
at depsgraph level... Maybe we can get rid of it at some point, but kind
of like the idea of keeping it for now, sounds more consitent.
2018-05-25 12:27:54 +02:00
Bastien Montagne
ba6abd83b0 Cleanup: do not make functions for the pleasure of having functions... 2018-05-25 11:39:02 +02:00
Bastien Montagne
f243390bd6 Cleanup: minor details in BKE paint code related to palettes.
* Always use BKE_id_new, unless you have a very good reason to use
lower-level code!
* Prefer to pass actual ID user pointer to functions like id_us_plus & co,
rather than 'floating' ID pointer, when possible. It makes it more clear
who is the user we increase count for!
2018-05-25 11:32:47 +02:00
Brecht Van Lommel
03a80facfc Fix T55183, fix T55174: crashes with workspace / view layer relation.
Don't store pointers to ViewLayer in the workspace, only names. Add specific
relation type since the generic mechanism makes the code hard to follow.
Integrate with pointer restore for undo and library remapping code to avoid
data going out of sync.

Also add relation automatically if there doesn't exists one yet in
BKE_workspace_view_layer_get, because in general it's really hard to ensure
it will exist when making arbitrary scene changes.

Differential Revision: https://developer.blender.org/D3432
2018-05-25 11:16:58 +02:00
Campbell Barton
08da2826e0 Merge branch 'master' into blender2.8 2018-05-25 10:52:53 +02:00
Campbell Barton
9812943931 WM: check modal handlers for keymap lookups
Keep in sync with 2.8x
2018-05-25 10:51:05 +02:00
Campbell Barton
e31b8303ed UI: fix assert
Replace hard-coded button size check with UI_UNIT_X.

Caused icon-only buttons to have strings assigned based on UI-scale.
2018-05-25 10:45:48 +02:00