Commit Graph

60178 Commits

Author SHA1 Message Date
Campbell Barton
1dbe9c262f View3D: Check all objects w/ view-selected 2018-04-17 08:30:29 +02:00
Clément Foucault
ae0c36f82b Object Mode: Outline: Perf: Only do outlines detection if needed. 2018-04-16 22:55:02 +02:00
Clément Foucault
f92e92b1c0 Object Mode: Outlines: Use textureGather extension if available.
This has very little impact (only had 12.5% perf improvment on Nvidia for this specific pass).
But it's an improvement nontheless!
2018-04-16 22:53:44 +02:00
Campbell Barton
af1c220d89 Fix for building w/o open-subdiv 2018-04-16 20:45:43 +02:00
Brecht Van Lommel
34ab90f546 Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.

This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.

Differential Revision: https://developer.blender.org/D3152
2018-04-16 19:55:33 +02:00
Campbell Barton
0c495005dd Fix multi-object edit crash
Border select assumed all objects had pose bones.
2018-04-16 19:42:24 +02:00
Clément Foucault
45f04ba48a DRW: Fix outdated code. 2018-04-16 19:38:58 +02:00
Clément Foucault
7f5d76b37f Object Mode: Rework outline drawing.
This changes quite a few things.
- Outline is now per object.
- No more outline at object intersection (fix hairs problem).
- Simplify the code quite a bit.

We use a R16UI buffer to save one id per object outline. We convert this id
to color when detecting the outline.

Added textureGatherOffsets to the code but could not test on current hardware
so leaving it commented for now.
2018-04-16 19:38:58 +02:00
Clément Foucault
c2d4ba2ff5 GPU/DRW: Add GPU_R16UI format. 2018-04-16 19:38:58 +02:00
Clément Foucault
dccda1fe43 DRW/GWN: Add callId builtin uniform.
This uniforms can be used to have a unique id for each drawcall of a shgrp.
This only works for standard shgroups and is an exception for the outline
drawing.
2018-04-16 19:38:58 +02:00
Germano
2b0b4133c8 DRW: Culling: Fix algorithm for asymmetric perspective frustum reconstruction. 2018-04-16 14:34:32 -03:00
Campbell Barton
8710943570 Cleanup: indentation 2018-04-16 18:24:38 +02:00
Campbell Barton
49ee1a97d2 Merge branch 'master' into blender2.8 2018-04-16 18:22:43 +02:00
Campbell Barton
eb6fe5fa94 Cleanup: indentation 2018-04-16 18:13:48 +02:00
Campbell Barton
292a2802ad Cleanup: indentation
Indent lines for multi object editing, no functional changes.

Also strip trailing space from indented regions.
2018-04-16 17:58:26 +02:00
Campbell Barton
bfc9d426bb Multi-Object Editing
This adds initial multi-object editing support.

- Selected objects are used when entering edit & pose modes.
- Selection & tools work on all objects however many tools need porting
  See: T54641 for remaining tasks.

Indentation will be done separately.

See patch: D3101
2018-04-16 17:56:50 +02:00
Germano
80bb4254c6 Fix T54491: Do not avoid the creation of inverted frustum.
Blender allows this.
The Cube in the file in the report would always disappear with the non camera view.
The clip_end was too small.
The correction here is only on the assert.
2018-04-16 12:37:14 -03:00
Campbell Barton
3b48a2a72f Cleanup: indentation 2018-04-16 17:26:55 +02:00
Campbell Barton
9a11aeb300 Merge branch 'master' into blender2.8 2018-04-16 17:24:20 +02:00
Campbell Barton
95eb9f22e6 Cleanup: indentation 2018-04-16 17:16:29 +02:00
Campbell Barton
85de548e03 Cleanup: indentation 2018-04-16 17:08:27 +02:00
Germano
3a14a03812 DRW: Culling: Reorganize frustum_boundbox_calc to match comments.
And Cleanup.
2018-04-16 11:48:58 -03:00
Germano
10f7f4ec14 Fix unreported error: Algorithm for extracting the Bounding Sphere from an Orthographic frustum was incorrect.
There was double transformation.
2018-04-16 11:42:20 -03:00
Bastien Montagne
a945bcc028 Fix two more 'infinite recursions' cases in RNA pose. 2018-04-16 16:39:13 +02:00
Campbell Barton
eb3ae79c2d Merge branch 'master' into blender2.8 2018-04-16 16:22:34 +02:00
Campbell Barton
141f0f4c47 BKE_context: macro to access ID's while looping 2018-04-16 16:19:16 +02:00
Sergey Sharybin
cf95267456 Merge branch 'master' into blender2.8 2018-04-16 16:17:03 +02:00
Sergey Sharybin
047950db7c Depsgraph: Pull indirect relations via driver targets 2018-04-16 16:12:15 +02:00
Bastien Montagne
295ced9baa Switch 'make static override' of group to making all objects local overrides.
Note: tried with a complex production file characters, this is currently
totally non-functionnal (crashing even in a infinite recursion loop),
IDProps and override need some love :(
2018-04-16 16:01:17 +02:00
Julian Eisel
969c4315b1 Fix warning: Passed ID pointer where screen pointer was expected 2018-04-16 15:53:34 +02:00
Germano
86abc4da10 Fix rBb31ebd8c5c55: the asymmetric furstrum algorithm was still incorrect.
Although somewhat less micro efficient, I decided to separate the `viewinv` matrix to calculate the world position separately.
This makes it easier to understand the code.
2018-04-16 10:40:46 -03:00
Julian Eisel
57c651d248 Cleanup: move some screen utility functions, from topbar branch. 2018-04-16 15:18:48 +02:00
Julian Eisel
1b6fddb968 Cleanup: split off area reading/writing functions, from topbar branch. 2018-04-16 15:18:48 +02:00
Campbell Barton
a3c80615d5 Fix stubs 2018-04-16 14:57:23 +02:00
Germano
b31ebd8c5c Fix T54609: Erros in precise BBox extraction algorithm 2018-04-16 09:22:42 -03:00
Sergey Sharybin
6a75a1a669 Depsgraph: Tag scene after changing cursor location
While 3d cursor is mainly an UI thing and isn't needed for scene evaluation,
it is stored in scene DNA. This means, operator is inform depsgraph that data
has changed, so all copies of that scene can copy new values.

Fixes lack of visual feedback when changing cursor location in viewport
with copy-on-write enabled.
2018-04-16 12:59:21 +02:00
Brecht Van Lommel
cab5dd5ea0 Fix incorrect scene used for building freestyle stroke depsgraph. 2018-04-16 10:39:13 +02:00
Sergey Sharybin
8ad93dd009 Merge branch 'master' into blender2.8 2018-04-16 10:19:03 +02:00
Sergey Sharybin
6617818c7a Make ID icons safe for deletion from threads
Added a lock-free deferred queue for deletion. Now if ID icon
is requested to be freed from non-main thread, it will be added
to the deferred list. Actual deletion will happen later from main
thread.

Currently actual deletion only happens next time BKE_icon_id_delete()
is called, which might not be enough. But it's easy to enforce
deferred deletion.

Icons for preview images are not covered by deferred deletion yet.

Reviewers: mont29

Differential Revision: https://developer.blender.org/D3146
2018-04-16 10:18:43 +02:00
Sergey Sharybin
5bfe6126f8 Added lock-free single linked list implementation
Only supports lock-free insertion for now, can not delete element
or traverse the list at the same time.
2018-04-16 10:18:43 +02:00
Campbell Barton
bfb633087b Fix object/bone select buffer big-endian sorting 2018-04-16 08:51:41 +02:00
Campbell Barton
9777cd2b1e Cleanup: unused function 2018-04-16 07:40:40 +02:00
Campbell Barton
55939bf219 Merge branch 'master' into blender2.8 2018-04-16 07:27:53 +02:00
Clément Foucault
61a22262d1 Eevee: Cleanup remaining shadow geometry references. 2018-04-15 22:23:51 +02:00
Clément Foucault
d8d1f637b1 Eevee: Shadows: Transition to individual face rendering.
This gets rid of the need of a geom shader and instancing.

Both are pretty slow compared to the new method.
The only moment the old method could be better is when scene is filled
with lots of objects and most of the objects in the shadow map appear
on every layer.

But even then, we could optimize the culling and minimize the overhead.
2018-04-15 22:23:51 +02:00
Clément Foucault
dd6fcd2f21 DRW: Fix culling algorithm for cascade shadow maps.
draw_frustum_boundbox_calc does not work properly it seems in this case.
2018-04-15 22:23:51 +02:00
Clément Foucault
728816dbdc DRW: Override matrices: fix const correctness. 2018-04-15 22:23:51 +02:00
Campbell Barton
80f7249d09 Cleanup: skip redundant edit-bone select lookups 2018-04-15 21:46:25 +02:00
Julian Eisel
4b080ff18f Cleanup: Make access to widget triangle defines explicit
E.g. the vertices created for each of the defines would require a
certain offset. If you don't know what to look for, finding out about
this is pretty difficult. Make them easily searchable instead.
2018-04-15 21:36:21 +02:00
Julian Eisel
7c02008e74 Fix button triangle for "hold action" not working
There is quite some mess going on in that most of the old triangle
drawing code is still there, but does almost nothing effectively.
Instead values are hardcoded in the shader, however it doesn't support
the drawing options the triangle functions expose.
E.g. the 'where' variable to set triangle direction doesn't work.
2018-04-15 21:24:24 +02:00