blender.git
20 months agoMerge commit 'origin/master^' into blender2.8
Dalai Felinto [Thu, 29 Mar 2018 13:36:01 +0000 (10:36 -0300)]
Merge commit 'origin/master^' into blender2.8

20 months agoUI: Perf: widgetbase: Replace imm usage by a batch cache.
Clément Foucault [Thu, 29 Mar 2018 01:21:03 +0000 (03:21 +0200)]
UI: Perf: widgetbase: Replace imm usage by a batch cache.

Introduce a UI batch cache. For the moment it's only used by widgetbase so
leaving it interface_widgets.c. If it grows, it can have its own file.

Like all preset batches (batches used by UI context), vaos must be refreshed
each time a new window context is binded.

This still does 3 GWN_batch_draw in the worst cases but at least it does
not use the IMM api.

I will continue and batch the 3 calls together since we are really CPU
bound, so shader complexity does not really matters.

I cannot spot any difference on all the widgets I could test. I did not use
any unit tests so I cannot tell if there is really any defects.

This is not a complete rewrite but it adresses the top bottleneck found
after a profilling session.

20 months agoGPUShader: Add specialized widget base shader.
Clément Foucault [Thu, 29 Mar 2018 01:06:33 +0000 (03:06 +0200)]
GPUShader: Add specialized widget base shader.

This vertex shader let us draw widgets with batches instead of imm calls.

20 months agoGWN: Batch: Add GWN_batch_uniform_4fv_array
Clément Foucault [Thu, 29 Mar 2018 01:00:29 +0000 (03:00 +0200)]
GWN: Batch: Add GWN_batch_uniform_4fv_array

20 months agoEEVEE: Fix bad framebuffer configuration
Clément Foucault [Thu, 29 Mar 2018 11:43:23 +0000 (13:43 +0200)]
EEVEE: Fix bad framebuffer configuration

Was causing black / corrupted scene because of broken downsample

Add a debug check to not run into this problem again.

20 months agoParticles: Fix missing hair dynamics
Sergey Sharybin [Thu, 29 Mar 2018 10:43:00 +0000 (12:43 +0200)]
Particles: Fix missing hair dynamics

Only if all the nasty looking bugs had such a simple solution...

20 months agoParticles: Remove dedicated recalc field from ParticleSettings
Sergey Sharybin [Wed, 28 Mar 2018 15:32:51 +0000 (17:32 +0200)]
Particles: Remove dedicated recalc field from ParticleSettings

Use more generic id->recalc flag.

Also sanitize flag flush from settings to particle system.
Need to do such flush before triggering point cache reset, since
point cache reset will do some logic based on what flags are set.

This will solve crash caused by threaded update which will set
some bitflags while point cache reset is in progress.

20 months agoCleanup, silence compiler warning in release build
Sergey Sharybin [Thu, 29 Mar 2018 10:40:23 +0000 (12:40 +0200)]
Cleanup, silence compiler warning in release build

20 months agoDraw manager: Make particle code drawing closer to old viewport
Sergey Sharybin [Thu, 29 Mar 2018 10:30:20 +0000 (12:30 +0200)]
Draw manager: Make particle code drawing closer to old viewport

The way how particle state is to be accessed or used did not change
in Blender 2.8, so the drawing code should follow old design.

This code is somewhat duplicated from drawobject.c, but old draw
code is on the way to be removed anyway.

This fixes issue with disappearing particles when tweaking number
of particles.

20 months agoDraw manager: Make evaluation context a part of context state
Sergey Sharybin [Thu, 29 Mar 2018 10:18:07 +0000 (12:18 +0200)]
Draw manager: Make evaluation context a part of context state

This way we don't have to re-initialize the full evaluation
context in every area we need it.

20 months agoDraw manager: Use C99 struct initialization
Sergey Sharybin [Thu, 29 Mar 2018 10:05:07 +0000 (12:05 +0200)]
Draw manager: Use C99 struct initialization

Allows us to easily add fields which we never want to
be initialized, but still keep sane order of fields in
the structure itself.

20 months agoDraw manager: Use utility functions for dealing with state memset
Sergey Sharybin [Thu, 29 Mar 2018 09:43:42 +0000 (11:43 +0200)]
Draw manager: Use utility functions for dealing with state memset

20 months agoDraw manager: Cleanup, early output
Sergey Sharybin [Thu, 29 Mar 2018 08:33:02 +0000 (10:33 +0200)]
Draw manager: Cleanup, early output

Do early output and reduce level of indentation.

20 months agoDepsgraph: Tag datablock with original update flag
Sergey Sharybin [Thu, 29 Mar 2018 08:08:56 +0000 (10:08 +0200)]
Depsgraph: Tag datablock with original update flag

Tagging based on components might not be granular enough.

For example, for particles we would want to know what part
of particles was changed exactly. For the flushing we wouldn't
worry too much, because we will want less granular updates
there anyway.

20 months agoFix T54457: build error with OpenVDB versions newer than 3.
Brecht Van Lommel [Thu, 29 Mar 2018 05:20:16 +0000 (07:20 +0200)]
Fix T54457: build error with OpenVDB versions newer than 3.

Solution provided by Sven-Hendrik Haase.

20 months agoFix T54455: OpenCL build error after recent changes.
Brecht Van Lommel [Thu, 29 Mar 2018 05:11:22 +0000 (07:11 +0200)]
Fix T54455: OpenCL build error after recent changes.

20 months agoCycles: take into account diffuse roughness for roughness baking.
Matt Heimlich [Wed, 28 Mar 2018 21:18:46 +0000 (23:18 +0200)]
Cycles: take into account diffuse roughness for roughness baking.

Roughness baking previously defaulted to 1.0 for all diffuse materials,
now we also bake roughness values of Oren-Nayer and Principled Diffuse.

Differential Revision: https://developer.blender.org/D3115

20 months agoMove to Collection - Add new collection
Dalai Felinto [Wed, 28 Mar 2018 20:14:40 +0000 (17:14 -0300)]
Move to Collection - Add new collection

Include option to create new collection and move objects to this
collection.

Based on suggestion by Pablo Vazquez (venomgfx) and my own feedback.

20 months agoMove to Collection - Skip Master Collection nested level
Dalai Felinto [Wed, 28 Mar 2018 18:25:35 +0000 (15:25 -0300)]
Move to Collection - Skip Master Collection nested level

Have the Master Collection always opened. This removes one level of nesting.
As suggested by Pablo Vazquez (venomgfx).

20 months agoMove to Collection - initial operator
Dalai Felinto [Wed, 28 Mar 2018 17:54:17 +0000 (14:54 -0300)]
Move to Collection - initial operator

How to use: Select a few objects, and press "M" in the viewport.

If you hold ctrl the objects will be added to the selected collection.
Otherwise they are removed from all their original collections and moved
to the selected one instead.

Development Notes
=================
The ideal solution would be to implement an elegant generic multi-level
menu system similar to toolbox_generic() in 2.49.

Instead I used `uiItemMenuF` to acchieve the required nesting of the menus.

The downside is that `uiItemMenuF` requires the data its callback uses to be
always valid until the menu is discarded. But since there is no callback we
can call when the menu is discarded for operators that exited with
`OPERATOR_INTERFACE`.

That means we are using static allocated data, that is only freed next time
the operator is called. Which also means there will always be some
memory leakage.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3117

20 months agoCleanup: Tooltip spelling
Aaron Carlisle [Wed, 28 Mar 2018 17:09:00 +0000 (13:09 -0400)]
Cleanup: Tooltip spelling

20 months agobuild_deps: disable hdf5 lib support
Ray Molenkamp [Wed, 28 Mar 2018 16:48:52 +0000 (10:48 -0600)]
build_deps: disable hdf5 lib support

we do not ship with hdf5 support for alembic on any of the platforms.

20 months agoFix Collada: broken tangents with Camera Animation import for xfov
Gaia Clary [Wed, 28 Mar 2018 15:56:09 +0000 (17:56 +0200)]
Fix Collada: broken tangents with Camera Animation import for xfov

When importing an xfov curve, we must transformed the data to
Lens opening angles in degrees. While the curve value itself is
correctly transformed, the transformation of the tangents has been
forgotten. this is fixed now.

20 months agoCycles: don't require pthreads as dependency on Windows.
Jeff Witthuhn [Wed, 28 Mar 2018 09:31:51 +0000 (11:31 +0200)]
Cycles: don't require pthreads as dependency on Windows.

Use C++11 threads when available, and native critical section on Windows.
Later on we can remove pthread code when C+11 becomes required.

Differential Revision: https://developer.blender.org/D3116

20 months agoClay: Remove warning.
Clément Foucault [Wed, 28 Mar 2018 09:33:23 +0000 (11:33 +0200)]
Clay: Remove warning.

20 months agoCleanup: typo in function name
Campbell Barton [Wed, 28 Mar 2018 09:23:38 +0000 (11:23 +0200)]
Cleanup: typo in function name

20 months agoBLI_array: utility to check memory is zerod
Campbell Barton [Wed, 28 Mar 2018 06:59:26 +0000 (08:59 +0200)]
BLI_array: utility to check memory is zerod

20 months agoFix missing confirm quit dialog on macOS, after recent changes.
Brecht Van Lommel [Wed, 28 Mar 2018 08:50:06 +0000 (10:50 +0200)]
Fix missing confirm quit dialog on macOS, after recent changes.

20 months agoCycles: Fix bad register cast in sseb
Sergey Sharybin [Wed, 28 Mar 2018 08:34:31 +0000 (10:34 +0200)]
Cycles: Fix bad register cast in sseb

This is currently unused code, but causes gcc-8 to fail.

20 months agoUI: Perf: Don't use implicit Attrib.
Clément Foucault [Tue, 27 Mar 2018 22:05:14 +0000 (00:05 +0200)]
UI: Perf: Don't use implicit Attrib.

Implicit attrib is doing memcpy which seems to be slower compared to
individual immAttrib*.

Only fixed the ones who appeared in my profilling logs.

20 months agoUI: Perf: Group drawcalls inside ui_draw_panel_dragwidget
Clément Foucault [Tue, 27 Mar 2018 22:00:00 +0000 (00:00 +0200)]
UI: Perf: Group drawcalls inside ui_draw_panel_dragwidget

16 Drawcalls > 1 Drawcall

Do I need to say more?

20 months agoUI: Perf: Make icon_draw_texture use GWN_draw_primitive.
Clément Foucault [Tue, 27 Mar 2018 21:57:29 +0000 (23:57 +0200)]
UI: Perf: Make icon_draw_texture use GWN_draw_primitive.

This bypass the use of immediate mode for theses drawcalls. Placement and
and icon select (via uvs) is done inside the vertex shader.

20 months agoGPUShader: Cleanup: Remove unused uniform_interface.
Clément Foucault [Tue, 27 Mar 2018 21:51:23 +0000 (23:51 +0200)]
GPUShader: Cleanup: Remove unused uniform_interface.

20 months agoDRW: Opti: Make cursor use batch instead of immediate API.
Clément Foucault [Tue, 27 Mar 2018 21:50:26 +0000 (23:50 +0200)]
DRW: Opti: Make cursor use batch instead of immediate API.

This is also much cleaner and taking 1 drawcall instead of 2.

20 months agoUI: Fix assert cause by vertex count being too small.
Clément Foucault [Tue, 27 Mar 2018 15:58:05 +0000 (17:58 +0200)]
UI: Fix assert cause by vertex count being too small.

20 months agoUI: Perf: Optimize widgetbase_draw.
Clément Foucault [Tue, 27 Mar 2018 14:58:11 +0000 (16:58 +0200)]
UI: Perf: Optimize widgetbase_draw.

Drawcall per window redraw on default layout:
- 4100+ without patch
- 1270 with patch

Theses drawcalls meant a lot of driver overhead since they each correspond
to one glMapBuffer which is slow.

20 months agoFix T54435: Quit prompt fails w/ fractional scale
Campbell Barton [Tue, 27 Mar 2018 14:46:10 +0000 (16:46 +0200)]
Fix T54435: Quit prompt fails w/ fractional scale

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 27 Mar 2018 13:09:00 +0000 (15:09 +0200)]
Merge branch 'master' into blender2.8

20 months agoCleanup: global undo (minor changes to internals)
Campbell Barton [Tue, 27 Mar 2018 12:44:17 +0000 (14:44 +0200)]
Cleanup: global undo (minor changes to internals)

- Get memory usage from MemFile instead of MEM API
  avoids possible invalid when threads alloc memory.
- Use size_t instead of uint and uintptr_t to store size.
- Rename UndoElem.str -> filename
- Rename MemFileChunk.ident -> is_identical

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 27 Mar 2018 05:08:58 +0000 (07:08 +0200)]
Merge branch 'master' into blender2.8

20 months agoCleanup: move paint curve undo into own file
Campbell Barton [Tue, 27 Mar 2018 05:05:07 +0000 (07:05 +0200)]
Cleanup: move paint curve undo into own file

20 months agoFix T54420: too much volume render noise with multiple volume objects.
Brecht Van Lommel [Mon, 26 Mar 2018 10:13:36 +0000 (12:13 +0200)]
Fix T54420: too much volume render noise with multiple volume objects.

Random numbers for step offset were correlated, now use stratified samples
which reduces noise as well for some types of volumes, mainly procedural
ones where the step size is bigger than the volume features.

20 months agoEevee Shaders: Fix "No matching overloaded function"
Germano [Mon, 26 Mar 2018 22:11:02 +0000 (19:11 -0300)]
Eevee Shaders: Fix "No matching overloaded function"

invert -> inverse

20 months agoGPUFramebuffer: Fix compiler warning about return value.
Clément Foucault [Mon, 26 Mar 2018 15:54:35 +0000 (17:54 +0200)]
GPUFramebuffer: Fix compiler warning about return value.

20 months agoFix bad merge resolution from previous commit
Sergey Sharybin [Mon, 26 Mar 2018 12:59:55 +0000 (14:59 +0200)]
Fix bad merge resolution from previous commit

20 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Mon, 26 Mar 2018 12:56:00 +0000 (14:56 +0200)]
Merge branch 'master' into blender2.8

20 months agoGHOST: Solve compilation error of test programs
Sergey Sharybin [Mon, 26 Mar 2018 12:51:56 +0000 (14:51 +0200)]
GHOST: Solve compilation error of test programs

20 months agoBLF: Don't use user preferences
Sergey Sharybin [Mon, 26 Mar 2018 12:38:47 +0000 (14:38 +0200)]
BLF: Don't use user preferences

BLF is a low level module, which might (and is) used without Blender.

Thanks Campbell for review!

20 months agoBLF: Cleanup, indentation inside of preprocessor
Sergey Sharybin [Mon, 26 Mar 2018 12:07:19 +0000 (14:07 +0200)]
BLF: Cleanup, indentation inside of preprocessor

20 months agoFix T53800: Bad data editing during DEG evaluation?
Bastien Montagne [Mon, 26 Mar 2018 08:41:31 +0000 (10:41 +0200)]
Fix T53800: Bad data editing during DEG evaluation?

Remain convinced that it should not be possible for undo code to run in
parallel with DEG eval... But for now, this whould prevent static
override code to dive into this collection.

20 months agoEevee: Use named EEVEE_EffectsFlag for effects flag.
Clément Foucault [Mon, 26 Mar 2018 08:02:53 +0000 (10:02 +0200)]
Eevee: Use named EEVEE_EffectsFlag for effects flag.

20 months agoEevee: Fix feedback loop warning.
Clément Foucault [Mon, 26 Mar 2018 08:01:46 +0000 (10:01 +0200)]
Eevee: Fix feedback loop warning.

20 months agoGPUTexture: Fix compilation issue.
Clément Foucault [Mon, 26 Mar 2018 07:59:12 +0000 (09:59 +0200)]
GPUTexture: Fix compilation issue.

20 months agoDRW: Fix crash/broken Metaballs display.
Clément Foucault [Sun, 25 Mar 2018 17:35:02 +0000 (19:35 +0200)]
DRW: Fix crash/broken Metaballs display.

20 months agoDRW: Rename DRW_shgroup_uniform_buffer into DRW_shgroup_uniform_texture_ref
Clément Foucault [Sun, 25 Mar 2018 17:24:19 +0000 (19:24 +0200)]
DRW: Rename DRW_shgroup_uniform_buffer into DRW_shgroup_uniform_texture_ref

This is in order to not mix it with the incomming buffer textures.

20 months agoDRW: Remove mentions of DRWInterface.
Clément Foucault [Sun, 25 Mar 2018 16:27:32 +0000 (18:27 +0200)]
DRW: Remove mentions of DRWInterface.

Theses are no longer relevant. Better talk about shgroup directly.

20 months agoGPUFramebuffer: Refactor (Part 2)
Clément Foucault [Sun, 25 Mar 2018 15:46:48 +0000 (17:46 +0200)]
GPUFramebuffer: Refactor (Part 2)

This refactor modernise the use of framebuffers.
It also touches a lot of files so breaking down changes we have:
 - GPUTexture: Allow textures to be attached to more than one GPUFrameBuffer.
   This allows to create and configure more FBO without the need to attach
   and detach texture at drawing time.
 - GPUFrameBuffer: The wrapper starts to mimic opengl a bit closer. This
   allows to configure the framebuffer inside a context other than the one
   that will be rendering the framebuffer. We do the actual configuration
   when binding the FBO. We also Keep track of config validity and save
   drawbuffers state in the FBO. We remove the different bind/unbind
   functions. These make little sense now that we have separate contexts.
 - DRWFrameBuffer: We replace DRW_framebuffer functions by GPU_framebuffer
   ones to avoid another layer of abstraction. We move the DRW convenience
   functions to GPUFramebuffer instead and even add new ones. The MACRO
   GPU_framebuffer_ensure_config is pretty much all you need to create and
   config a GPUFramebuffer.
 - DRWTexture: Due to the removal of DRWFrameBuffer, we needed to create
   functions to create textures for thoses framebuffers. Pool textures are
   now using default texture parameters for the texture type asked.
 - DRWManager: Make sure no framebuffer object is bound when doing cache
   filling.
 - GPUViewport: Add new color_only_fb and depth_only_fb along with FB API
   usage update. This let draw engines render to color/depth only target
   and without the need to attach/detach textures.
 - WM_window: Assert when a framebuffer is bound when changing context.
   This balance the fact we are not track ogl context inside GPUFramebuffer.
 - Eevee, Clay, Mode engines: Update to new API. This comes with a lot of
   code simplification.

This also come with some cleanups in some engine codes.

20 months agoGPUFramebuffer: Refactor (part 1)
Clément Foucault [Sun, 25 Mar 2018 12:18:39 +0000 (14:18 +0200)]
GPUFramebuffer: Refactor (part 1)

Move some DRWFramebuffer functions to GPUFramebuffer.

20 months agoBasic Engine: Remove unneeded use of Framebuffers.
Clément Foucault [Sun, 25 Mar 2018 15:13:11 +0000 (17:13 +0200)]
Basic Engine: Remove unneeded use of Framebuffers.

20 months agoGPUOffscreen: Remove unused offscreen blit.
Clément Foucault [Sun, 25 Mar 2018 13:53:17 +0000 (15:53 +0200)]
GPUOffscreen: Remove unused offscreen blit.

20 months agoGPULamp: Move GPU_frambuffer_blur to GPU_lamp.c
Clément Foucault [Sun, 25 Mar 2018 02:34:36 +0000 (04:34 +0200)]
GPULamp: Move GPU_frambuffer_blur to GPU_lamp.c

This is a bit useless because gpu lamps are only used by the game engine
and it is planned to be "remove" in some way.

Doing this to clean gpu_framebuffer.c.

20 months agoGPUFramebuffer: Make current framebuffer thread local.
Clément Foucault [Sun, 25 Mar 2018 01:52:57 +0000 (03:52 +0200)]
GPUFramebuffer: Make current framebuffer thread local.

This make sense since we are using multiple olg contexts and two contexts
can be active at the same time with different framebuffers.

20 months agoGPUTexture: Style: Respect 120 char per line limit.
Clément Foucault [Sun, 25 Mar 2018 01:35:25 +0000 (03:35 +0200)]
GPUTexture: Style: Respect 120 char per line limit.

20 months agoGPUViewport: Small simplifications + fixes.
Clément Foucault [Sun, 25 Mar 2018 01:34:06 +0000 (03:34 +0200)]
GPUViewport: Small simplifications + fixes.

 - Use GPU_SHADER_2D_IMAGE_ALPHA.
 - Add alpha uniform.
 - bypass reseting the scissors and depth test because we used
   another context for drawing.

20 months agoClay: Fix alpha problem cause by FXAA pass.
Clément Foucault [Sun, 25 Mar 2018 01:17:05 +0000 (03:17 +0200)]
Clay: Fix alpha problem cause by FXAA pass.

20 months agoGPUViewport: Remove depth debug.
Clément Foucault [Sun, 25 Mar 2018 01:05:50 +0000 (03:05 +0200)]
GPUViewport: Remove depth debug.

This is not used anymore.
Debug visualisations should be moved to the draw manager.

20 months agoGPUTexture: Small refactor.
Clément Foucault [Sat, 24 Mar 2018 19:27:39 +0000 (20:27 +0100)]
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.

20 months agoDRWTexture: Remove DRW_texture_update
Clément Foucault [Sun, 25 Mar 2018 15:12:36 +0000 (17:12 +0200)]
DRWTexture: Remove DRW_texture_update

20 months agoDRW: Remove unecessary push/pull attrib.
Clément Foucault [Fri, 23 Mar 2018 23:15:17 +0000 (00:15 +0100)]
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.

20 months agoGPU: gpu_draw.c: Fix wrong renaming.
Clément Foucault [Fri, 23 Mar 2018 22:51:24 +0000 (23:51 +0100)]
GPU: gpu_draw.c: Fix wrong renaming.

Renaming happened in b4d053efc754 and seems to have been a bit too
agressive.

20 months agoText: line break always returned cancelled
Campbell Barton [Sun, 25 Mar 2018 15:50:40 +0000 (17:50 +0200)]
Text: line break always returned cancelled

Harmless but incorrect.

20 months agoText: re-allocate exact lengths for undo
Campbell Barton [Sat, 24 Mar 2018 13:18:58 +0000 (14:18 +0100)]
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.

20 months agoFix text editor undo w/ 4+ byte utf8 characters
Campbell Barton [Sat, 24 Mar 2018 13:14:19 +0000 (14:14 +0100)]
Fix text editor undo w/ 4+ byte utf8 characters

20 months agoCleanup: move undo opcodes out of public header
Campbell Barton [Sat, 24 Mar 2018 11:46:25 +0000 (12:46 +0100)]
Cleanup: move undo opcodes out of public header

20 months agoPyDoc: Add docutils ref for "registration"
Aaron Carlisle [Sat, 24 Mar 2018 00:23:47 +0000 (20:23 -0400)]
PyDoc: Add docutils ref for "registration"

This will be used to link to from the manual.

20 months agoTheming: Use list-item colors for all un-embossed buttons in list-items
Julian Eisel [Fri, 23 Mar 2018 19:32:58 +0000 (20:32 +0100)]
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.

20 months agoUI: restore quit confirmation when dialog disabled
Campbell Barton [Fri, 23 Mar 2018 16:31:33 +0000 (17:31 +0100)]
UI: restore quit confirmation when dialog disabled

20 months agoRNA comparison/override: better control over property processing.
Bastien Montagne [Fri, 23 Mar 2018 15:30:57 +0000 (16:30 +0100)]
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.

20 months agomsvc: Fix msvc2013 new despgraph related build errors.
Ray Molenkamp [Fri, 23 Mar 2018 15:23:08 +0000 (09:23 -0600)]
msvc: Fix msvc2013 new despgraph related build errors.

msvc's function.hpp does not like NULL for function pointers. disabled support for this platform.

20 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Fri, 23 Mar 2018 14:25:27 +0000 (15:25 +0100)]
Merge branch 'master' into blender2.8

20 months agoLibmv: Fix compilation error on Windows
Sergey Sharybin [Fri, 23 Mar 2018 14:05:08 +0000 (15:05 +0100)]
Libmv: Fix compilation error on Windows

20 months agoGlog/gflags: Reduce amount of local modifications
Sergey Sharybin [Fri, 23 Mar 2018 13:32:18 +0000 (14:32 +0100)]
Glog/gflags: Reduce amount of local modifications

With better directory layout and more proper include
statements we can avoid several local modifications,
such as changing config.h for Windows Glog and the
ones related on pass-through statements in logging
headers in Glog.

This commit also makes unused functions not-a-warning
for external code.

20 months agoUI: 4-column layout for the editor-type selector menu
Julian Eisel [Fri, 23 Mar 2018 13:13:13 +0000 (14:13 +0100)]
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

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 23 Mar 2018 11:05:55 +0000 (12:05 +0100)]
Merge branch 'master' into blender2.8

20 months agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 23 Mar 2018 10:56:14 +0000 (11:56 +0100)]
Merge branch 'master' into blender2.8

20 months agoCleanup: stray tabs
Campbell Barton [Fri, 23 Mar 2018 10:51:19 +0000 (11:51 +0100)]
Cleanup: stray tabs

Tabs in middle of code (mostly for no reason / by accident).

20 months agoCleanup: doxy header, line length
Campbell Barton [Fri, 23 Mar 2018 10:28:25 +0000 (11:28 +0100)]
Cleanup: doxy header, line length

20 months agoCleanup: move image undo into own file
Campbell Barton [Fri, 23 Mar 2018 06:51:56 +0000 (07:51 +0100)]
Cleanup: move image undo into own file

20 months agoFix issues with confirmation prompt on Windows
Julian Eisel [Fri, 23 Mar 2018 01:00:14 +0000 (02:00 +0100)]
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.

20 months agoFix own mistake from 4cb4556fa5ba78ff
Julian Eisel [Thu, 22 Mar 2018 22:52:38 +0000 (23:52 +0100)]
Fix own mistake from 4cb4556fa5ba78ff

Trying to close Blender from a second window wouldn't work, the first window
would have to be hovered first. Ouch!

20 months agoFix memory leaks when doing "Save & Quit"
Julian Eisel [Thu, 22 Mar 2018 22:29:48 +0000 (23:29 +0100)]
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.

20 months agoFix T48027: Memory leaks when exiting Blender from menu
Julian Eisel [Thu, 22 Mar 2018 22:09:19 +0000 (23:09 +0100)]
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 ;)

20 months agoGPUCompositing: Remove last reference to gpu_shader_fullscreen_vert.glsl
Clément Foucault [Thu, 22 Mar 2018 21:39:07 +0000 (22:39 +0100)]
GPUCompositing: Remove last reference to gpu_shader_fullscreen_vert.glsl

It was breaking compilation with MSVC apparently.

20 months agoPyDocs: Fix link syntax
Aaron Carlisle [Thu, 22 Mar 2018 20:28:28 +0000 (16:28 -0400)]
PyDocs: Fix link syntax

20 months agoMerge branch 'master' into blender2.8
Antonio Vazquez [Thu, 22 Mar 2018 18:21:36 +0000 (19:21 +0100)]
Merge branch 'master' into blender2.8

20 months agoGlog: Restore some custom config for MSVC2015
Sergey Sharybin [Thu, 22 Mar 2018 16:48:36 +0000 (17:48 +0100)]
Glog: Restore some custom config for MSVC2015

20 months agoGLog: Tweak settings according to our config
Sergey Sharybin [Thu, 22 Mar 2018 16:32:51 +0000 (17:32 +0100)]
GLog: Tweak settings according to our config

We do have gflags.

20 months agoGlog: Workaround mess around windows and non-windows headers
Sergey Sharybin [Thu, 22 Mar 2018 16:26:02 +0000 (17:26 +0100)]
Glog: Workaround mess around windows and non-windows headers

Seems we can not use include directories order trick, since
files are included form inside ".." string, which forces current
directory to be checked first.

20 months agoGFlags: Fix usage of unused attribute
Sergey Sharybin [Thu, 22 Mar 2018 16:19:56 +0000 (17:19 +0100)]
GFlags: Fix usage of unused attribute

20 months agoGlog: Attempt to fix compilation error on Windows
Sergey Sharybin [Thu, 22 Mar 2018 16:01:42 +0000 (17:01 +0100)]
Glog: Attempt to fix compilation error on Windows

Ideally it should be possible without hacking into sources files
of Glog itself.