Commit Graph

75472 Commits

Author SHA1 Message Date
Clément Foucault
f63bb98223 GPUViewport: Remove depth debug.
This is not used anymore.
Debug visualisations should be moved to the draw manager.
2018-03-25 20:06:12 +02:00
Clément Foucault
b1c025d1e8 GPUTexture: Small refactor.
This includes a few modification:
 - The biggest one is call glActiveTexture before doing any call to
   glBindTexture for rendering purpose (uniform value depends on it).
   This is also better to know what's going on when rendering UI. So if
   there is missing UI elements because of this commit look for this first.
   This allows us to have "less calls" to glActiveTexture (I did not
   measure the final count) and less checks inside GPU_texture.

 - Remove use of GL_TEXTURE0 as a uniform value in a few places.

 - Be more strict and use BLI_assert for bad usage of GPU_texture functions.

 - Disable filtering for integer and stencil textures (not supported by
   OGL specs).

 - Replace bools inside GPUTexture by a bitflag supporting more options to
   identify texture types.
2018-03-25 20:06:11 +02:00
Clément Foucault
879eabedda DRWTexture: Remove DRW_texture_update 2018-03-25 20:06:11 +02:00
Clément Foucault
b9962d0070 DRW: Remove unecessary push/pull attrib.
Since we are rendering draw manager's command in a separate context, we
don't need to save/restore the UI opengl state attributes/config.
2018-03-25 20:06:11 +02:00
Clément Foucault
e02480fd16 GPU: gpu_draw.c: Fix wrong renaming.
Renaming happened in b4d053efc7 and seems to have been a bit too
agressive.
2018-03-25 20:06:11 +02:00
Campbell Barton
31bf6edf79 Text: line break always returned cancelled
Harmless but incorrect.
2018-03-25 17:51:49 +02:00
Campbell Barton
977a4e7f5d Text: re-allocate exact lengths for undo
Undo sometimes reserved too much space in the buffer,
now assert when this happens and allocate the exact size needed.

Note prepares for moving text editor undo out of the text block (D3113)
which will split the undo buffer into a list of undo steps.
2018-03-24 14:27:31 +01:00
Campbell Barton
3f9d5ea0ec Fix text editor undo w/ 4+ byte utf8 characters 2018-03-24 14:14:19 +01:00
Campbell Barton
9d1de621e2 Cleanup: move undo opcodes out of public header 2018-03-24 12:46:25 +01:00
Julian Eisel
357b72e0a7 Theming: Use list-item colors for all un-embossed buttons in list-items
E.g. number buttons in the shape key list would use theme colors of text
widgets.

Addresses T50862.
2018-03-23 20:46:51 +01:00
Campbell Barton
a7e4268bee UI: restore quit confirmation when dialog disabled 2018-03-23 17:32:13 +01:00
Bastien Montagne
0c753c1dc4 RNA comparison/override: better control over property processing.
This commit essentially introduces a new RNA property flag, which when
set prevents affected property from being processed at all in comparison
code (also used to automatically generate static override rules).

The idea is to use it on very low-level data in RNA, like e.g. mesh's
geometry or psys' particles collections.

For now only applied to psys' particle collections, on the main mesh of
Agent327 pigeon, it goes from 100ms to 0.5ms on a full
auto-override-generating comparison...

Also added some new RNA property helper funcs to check on comparable and
overridable status.
2018-03-23 16:35:53 +01:00
Ray Molenkamp
15af75d79e msvc: Fix msvc2013 new despgraph related build errors.
msvc's function.hpp does not like NULL for function pointers. disabled support for this platform.
2018-03-23 09:23:08 -06:00
Sergey Sharybin
21f16bb93e Merge branch 'master' into blender2.8 2018-03-23 15:25:27 +01:00
Julian Eisel
60712d12eb UI: 4-column layout for the editor-type selector menu
The list of editor-types is rather long by now, so better to arrange them into
sections.

Original patch by @jeske with updates by @Blendify and myself.
Design Task: T36028
Patch: D3112
2018-03-23 14:28:46 +01:00
Campbell Barton
8eb8aa4939 Merge branch 'master' into blender2.8 2018-03-23 12:05:55 +01:00
Campbell Barton
da00a50f7f Merge branch 'master' into blender2.8 2018-03-23 11:56:14 +01:00
Campbell Barton
7cc2b27099 Cleanup: stray tabs
Tabs in middle of code (mostly for no reason / by accident).
2018-03-23 11:51:19 +01:00
Campbell Barton
f2f32c81d4 Cleanup: doxy header, line length 2018-03-23 11:28:25 +01:00
Campbell Barton
72c43e0285 Cleanup: move image undo into own file 2018-03-23 09:15:23 +01:00
Julian Eisel
529c21acc2 Fix issues with confirmation prompt on Windows
* Pressing "OK" wouldn't close Blender anymore
* Using File -> Quit would use popup version, not OS native window

Cleaned up code a bit to avoid duplicated logic.
2018-03-23 02:00:14 +01:00
Julian Eisel
aeec19d2e7 Fix own mistake from 4cb4556fa5
Trying to close Blender from a second window wouldn't work, the first window
would have to be hovered first. Ouch!
2018-03-22 23:52:38 +01:00
Julian Eisel
a4ea46ffc5 Fix memory leaks when doing "Save & Quit"
Steps to reproduce were:
* Open Blender (no need for factory settings, "Promt Quit" needs to be enabled)
* Edit the file (e.g. translate some object)
* Quit Blender but don't skip quit promt
* Press "Save & Quit"
* Save the file

Not sure if Windows supports the "Save & Quit" behavior, so this may not have
applied to Windows.
2018-03-22 23:29:48 +01:00
Julian Eisel
4cb4556fa5 Fix T48027: Memory leaks when exiting Blender from menu
You only had to close Blender through File -> Quit.

Leaks happened because WM_exit() was called from within operator, UI wasn't able
to free some of it's heap data then. This data was the handler added in
uiTemplateRunningJobs() and the IDProperty group added in uiItemFullO_ptr_ex().
There was obviously a general design issue which only became visible in this
specific case.

We now delay the WM_exit call by wrapping it into a handler that gets registered
as usual. I didn't see a better way to do this, all tricks done in
ui_apply_but_funcs_after() to prevent leaks didn't work here. In fact they may
be redundant now, but am not brave enough to try ;)
2018-03-22 23:25:28 +01:00
Clément Foucault
2ee4e9761f GPUCompositing: Remove last reference to gpu_shader_fullscreen_vert.glsl
It was breaking compilation with MSVC apparently.
2018-03-22 22:39:24 +01:00
Sergey Sharybin
18e2a5df1a Merge branch 'master' into blender2.8 2018-03-22 16:41:37 +01:00
Sergey Sharybin
69b327d8dc Depsgraph: Report new depsgraph evaluation time
Timing is printed to the console when running with --debug-depsgraph-time.
2018-03-22 16:40:32 +01:00
Campbell Barton
d554b8a748 UI: skip confirmation menu on quit prompt to save 2018-03-22 16:24:14 +01:00
Clément Foucault
47acd706fd GPUCompositing: Remove entire module.
This module has no use now with the new DrawManager and DrawEngines and it
is using deprecated paths.

Moving gpu_shader_fullscreen_vert.glsl
to draw/modes/shaders/common_fullscreen_vert.glsl
2018-03-22 16:11:49 +01:00
Campbell Barton
865fbe343a Fix T54348: Bone dissolve gives invalid hierarchy
Disconnected bones weren't handled correctly.
2018-03-22 07:50:58 +01:00
Campbell Barton
ce51066e47 Fix bone dissolve using wrong envelope radius
Also correctly copy bone tip selection when dissolving.
2018-03-22 07:50:03 +01:00
Campbell Barton
6939523a15 Fix T54203: crash changing engine w/ project-paint 2018-03-21 16:51:56 +01:00
Sergey Sharybin
a6914d8f33 Eevee: Fix missing camera animation with CoW 2018-03-21 16:39:00 +01:00
Sergey Sharybin
5c08d17423 Draw manager: Fix missing active camera triangle with CoW 2018-03-21 16:31:10 +01:00
Campbell Barton
69eb452622 Merge branch 'master' into blender2.8 2018-03-21 16:27:48 +01:00
Sergey Sharybin
3ea8710b9d Depsgraph: Remove redundant operation nodes
Rather a mistake since previous merge.
2018-03-21 16:12:36 +01:00
Campbell Barton
5ba5254ec1 UI: Optional prompt to quit for non win32 systems
D566 by @januz

Use Blender native dialog when OS dialog's aren't supported.
2018-03-21 16:04:01 +01:00
Sergey Sharybin
cac2415d82 Merge branch 'master' into blender2.8 2018-03-21 12:47:13 +01:00
Sergey Sharybin
1e43665a39 Fix T54378: Drivers fail with property from empty
Empties were missing Parameters component.
2018-03-21 12:17:51 +01:00
Campbell Barton
f3efa2526d Fix T54366: Custom manipulator acts on linked data 2018-03-21 07:26:58 +01:00
Julian Eisel
7701f9e35c Fix crash when changing workspaces
Steps to reproduce were:
* Append a workspace (via '+' icon) - make sure its from the default workspaces.blend
* Activate it
* Should crash

Was accessing data from view-layer which wasn't updated yet (and thus could be
NULL). Crash occured after rB8153f89518b4a.

@campbellbarton, you may want to check if all object-mode stuff still works as
expected, not sure what's the state of it.
2018-03-20 23:31:44 +01:00
Dalai Felinto
89aa4b1604 Link and expand overrides for collections
This code was neglected. Yet it is needed for when we support datablock
overrides so that the ID pointers are properly linked and expanded.
2018-03-20 14:48:54 -03:00
Bastien Montagne
504319239a Cleanup: remove useless static override reference pointer from ID struct. 2018-03-20 18:12:45 +01:00
Bastien Montagne
410410f57b Add basic read-only RNA access to static override data.
Will make investigating issues much, much easier!
2018-03-20 18:12:45 +01:00
Bastien Montagne
8a94a82934 Fix broken tatic verride detection in RNA collections.
We have to check all items of a collection when we want to create
overrides as needed...
2018-03-20 18:12:45 +01:00
Sergey Sharybin
e0388bc61a Merge branch 'master' into blender2.8 2018-03-20 16:55:16 +01:00
Sergey Sharybin
69e35429bf Remove debug only code from previous commit 2018-03-20 16:54:50 +01:00
Sergey Sharybin
a5bb918392 Memory allocator: Clarify consistency check function
Also make it to return truth when everything is good and
false otherwise.
2018-03-20 16:51:33 +01:00
Sergey Sharybin
ebbb55dd80 Depsgraph: Fix memory leak when datablock is not reused
It is possible that datablock will not be re-used for the new
dependency graph building. Freeing function was freeing all
the nested pointers of databnlock, but not datablock memory
itself.
2018-03-20 16:07:27 +01:00
Sergey Sharybin
c188ab7b67 Depsgraph: Prevent non-expandable datablocks from being freed
This avoids original image datablock destruction when using
copy on write.
2018-03-20 16:07:27 +01:00