blender.git
22 months agoDepsgraph: Ensure root pchan is always found
Sergey Sharybin [Wed, 4 Apr 2018 09:49:01 +0000 (11:49 +0200)]
Depsgraph: Ensure root pchan is always found

22 months agoDepsgraph: Assert that pchan index is always valid
Sergey Sharybin [Wed, 4 Apr 2018 08:35:32 +0000 (10:35 +0200)]
Depsgraph: Assert that pchan index is always valid

22 months agoDepsgraph: Add missing expansion od custom bone shapes
Sergey Sharybin [Wed, 4 Apr 2018 08:15:45 +0000 (10:15 +0200)]
Depsgraph: Add missing expansion od custom bone shapes

This was fixed in 2.8 branch but not in master.

22 months agoDepsgraph: Only bind ID-data and indices to depsgraph callbacks
Sergey Sharybin [Tue, 3 Apr 2018 15:23:43 +0000 (17:23 +0200)]
Depsgraph: Only bind ID-data and indices to depsgraph callbacks

This is a part of copy-on-write sanitization, to avoid all the checks
which were attempting to keep sub-data pointers intact.

Point is: ID pointers never change for CoW datablocks, but nested
data pointers might change when updating existing copy.

Solution: Only bind ID data pointers and index of sub-data.
This will make CoW datablock 7update function was easier in 2.8.

In master we were only using pose channel pointers in callbacks,
this is exactly what this commit addresses. A linear lookup array
is created on pose evaluation init and is thrown away afterwards.

One thing we might consider doing is to keep indexed array of
poses, similar to chanhash.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Subscribers: dfelinto

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

22 months agoFix T54337: Cycles crash with simple subd object in debug build
Mai Lavelle [Wed, 4 Apr 2018 03:36:35 +0000 (23:36 -0400)]
Fix T54337: Cycles crash with simple subd object in debug build

22 months agoFix T54400: Some GCN 1 cards available to select for use with Cycles
Mai Lavelle [Wed, 4 Apr 2018 03:09:38 +0000 (23:09 -0400)]
Fix T54400: Some GCN 1 cards available to select for use with Cycles

Hainan was missing from the list of GCN 1 cards.

22 months agoBMesh: remove redundant loop in select-next-active
Campbell Barton [Tue, 3 Apr 2018 16:32:55 +0000 (18:32 +0200)]
BMesh: remove redundant loop in select-next-active

Thanks to @nBurn for spotting

22 months agoUndo: make id-map use binary search to keep sorted
Campbell Barton [Tue, 3 Apr 2018 16:07:51 +0000 (18:07 +0200)]
Undo: make id-map use binary search to keep sorted

22 months agoFix own error w/ undo ID lookup
Campbell Barton [Tue, 3 Apr 2018 15:58:37 +0000 (17:58 +0200)]
Fix own error w/ undo ID lookup

Was testing with small number of items, so this went unnoticed.

22 months agoCleanup: rename BMesh count_ex -> count_at_most
Campbell Barton [Tue, 3 Apr 2018 15:06:36 +0000 (17:06 +0200)]
Cleanup: rename BMesh count_ex -> count_at_most

22 months agoCleanup: rename list count_ex -> count_at_most
Campbell Barton [Tue, 3 Apr 2018 15:05:21 +0000 (17:05 +0200)]
Cleanup: rename list count_ex -> count_at_most

22 months agoUndo: use with_prev verisons of id-map lookups
Campbell Barton [Tue, 3 Apr 2018 15:03:13 +0000 (17:03 +0200)]
Undo: use with_prev verisons of id-map lookups

22 months agoUndo: use general id-map for image undo lookups.
Campbell Barton [Tue, 3 Apr 2018 14:47:25 +0000 (16:47 +0200)]
Undo: use general id-map for image undo lookups.

Was doing own name based lookups to keep compatible w/ global undo.

22 months agoUndo System: id-map avoid duplicate add/lookup
Campbell Barton [Tue, 3 Apr 2018 14:46:11 +0000 (16:46 +0200)]
Undo System: id-map avoid duplicate add/lookup

Add versions of add/lookup that check the previous item.

22 months agoFix mistake logging w/ undo
Campbell Barton [Tue, 3 Apr 2018 14:45:05 +0000 (16:45 +0200)]
Fix mistake logging w/ undo

22 months agoFix T54477: Broken utf8 strings in old .blend files
Bastien Montagne [Tue, 3 Apr 2018 13:50:49 +0000 (15:50 +0200)]
Fix T54477: Broken utf8 strings in old .blend files

Back in the days (2.4x and before), it was rather easy to get some
invalid utf-8 strings in Blender. This is totally breaking modern code,
so this commit adds a simple 'check & fix strings' operator, available
from the main File menu.

22 months agoFix (unreported) crash when accessing some bl_rna.properties.
Bastien Montagne [Tue, 3 Apr 2018 12:30:36 +0000 (14:30 +0200)]
Fix (unreported) crash when accessing some bl_rna.properties.

E.g. typing `bpy.data.bl_rna.properties[8].<tab>` in console would hard-crash
trying to dereference NULL pointer. Was a missing check in rna_Property_tags_itemf().

22 months agoUndo: remove particle undo push
Campbell Barton [Tue, 3 Apr 2018 06:57:01 +0000 (08:57 +0200)]
Undo: remove particle undo push

Was only called on copy particle system
which is already doing an undo push.

22 months agoCleanup: editor BKE_main includes
Campbell Barton [Tue, 3 Apr 2018 06:42:12 +0000 (08:42 +0200)]
Cleanup: editor BKE_main includes

22 months agoUndo: replace global access w/ ED_undo_stack_get
Campbell Barton [Tue, 3 Apr 2018 06:35:42 +0000 (08:35 +0200)]
Undo: replace global access w/ ED_undo_stack_get

While I'd like to avoid using this too much since the operator
system should handle.
It's less trouble than accessing it inline each time.

22 months agoPyAPI: Add PyC_Tuple_Pack_F64 utility
Campbell Barton [Mon, 2 Apr 2018 17:48:34 +0000 (19:48 +0200)]
PyAPI: Add PyC_Tuple_Pack_F64 utility

22 months agoBuild: add WITH_OPENVDB_3_ABI_COMPATIBLE option.
Brecht Van Lommel [Mon, 2 Apr 2018 16:55:10 +0000 (18:55 +0200)]
Build: add WITH_OPENVDB_3_ABI_COMPATIBLE option.

Better fix for T54457. It seems Debian compiles OpenVDB without ABI 3
compatibility, while Arch does enable it as is the default in the OpeVDB
CMake build system.

So now there's an option that the distribution can set depending on how
they compile their OpenVDB package.

22 months agoCleanup: remove redundant imbuf return values
Campbell Barton [Mon, 2 Apr 2018 15:30:35 +0000 (17:30 +0200)]
Cleanup: remove redundant imbuf return values

Some functions always returned the input argument
which was never used.

This made code read as if there might be a leak.

Now return a boolean (true the imbuf is modified).

22 months agoBuild: fixes for the Intel compiler versions 2016, 2017, 2018.
Milan Jaros [Mon, 2 Apr 2018 14:11:11 +0000 (16:11 +0200)]
Build: fixes for the Intel compiler versions 2016, 2017, 2018.

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

22 months agoCleanup: newlines left in messages
Campbell Barton [Mon, 2 Apr 2018 13:39:43 +0000 (15:39 +0200)]
Cleanup: newlines left in messages

22 months agoCleanup: move undo into it's own directory
Campbell Barton [Mon, 2 Apr 2018 13:02:08 +0000 (15:02 +0200)]
Cleanup: move undo into it's own directory

Split out undo API from ED_util.h into ED_undo.h

22 months agoCleanup: move BKE_global include under ifdef's
Campbell Barton [Mon, 2 Apr 2018 12:19:44 +0000 (14:19 +0200)]
Cleanup: move BKE_global include under ifdef's

22 months agoUndo: store active curve shape key in edit-mode
Campbell Barton [Mon, 2 Apr 2018 09:35:33 +0000 (11:35 +0200)]
Undo: store active curve shape key in edit-mode

22 months agoLogging: use for Python API
Campbell Barton [Mon, 2 Apr 2018 09:05:15 +0000 (11:05 +0200)]
Logging: use for Python API

Adds categories "bpy.context" & "bpy.rna"

22 months agoimbuf: revert some of the changes of rBb6ba3c682dd6615e760905572a5bcd69bb46371f since...
Ray Molenkamp [Sun, 1 Apr 2018 21:17:17 +0000 (15:17 -0600)]
imbuf: revert some of the changes of rBb6ba3c682dd6615e760905572a5bcd69bb46371f since they broke the build.

22 months agoFix compiling with Alembic
Sergej Reich [Sun, 1 Apr 2018 17:50:19 +0000 (19:50 +0200)]
Fix compiling with Alembic

Still need G.main

22 months agoCorrect accidental changes by C Logging addition
Campbell Barton [Sun, 1 Apr 2018 08:16:28 +0000 (10:16 +0200)]
Correct accidental changes by C Logging addition

Error in 891c1cfc9a3

22 months agoResolve unsigned comparison error w/ MSVC
Campbell Barton [Sun, 1 Apr 2018 05:41:23 +0000 (07:41 +0200)]
Resolve unsigned comparison error w/ MSVC

22 months agoCleanup: remove global header
Campbell Barton [Sun, 1 Apr 2018 05:24:45 +0000 (07:24 +0200)]
Cleanup: remove global header

22 months agoCleanup: warning
Campbell Barton [Sat, 31 Mar 2018 21:51:38 +0000 (23:51 +0200)]
Cleanup: warning

22 months agoRemoved by accident in last commit
Campbell Barton [Sat, 31 Mar 2018 21:47:05 +0000 (23:47 +0200)]
Removed by accident in last commit

22 months agoUndo: unified undo system w/ linear history
Campbell Barton [Mon, 19 Mar 2018 13:17:59 +0000 (14:17 +0100)]
Undo: unified undo system w/ linear history

- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
  should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
  undo data is restored.
- Some undo types accumulate changes (image & text editing)
  others store the state multiple times (with de-duplication).
  This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
  manage restoring correct ID's.
  Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
  Previously this wasn't done, making history fail in some cases.
  This can be optimized to skip some combinations of undo steps.

grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.

See D3113

22 months agoBLI_sort_utils: add pointer sorting callback
Campbell Barton [Sat, 31 Mar 2018 17:25:27 +0000 (19:25 +0200)]
BLI_sort_utils: add pointer sorting callback

Also rename Pointer -> Ptr

22 months agoLogging: fix own error with formatting
Campbell Barton [Sat, 31 Mar 2018 13:43:47 +0000 (15:43 +0200)]
Logging: fix own error with formatting

22 months agoUse int instead of bool
Campbell Barton [Sat, 31 Mar 2018 13:33:15 +0000 (15:33 +0200)]
Use int instead of bool

Causes issues when including in some files.

22 months agoLogging: add argument --log-show-basename
Campbell Barton [Sat, 31 Mar 2018 13:27:06 +0000 (15:27 +0200)]
Logging: add argument --log-show-basename

Optionally strips leading path from filenames when logging.

22 months agoCleanup: --help text output
Campbell Barton [Sat, 31 Mar 2018 12:53:15 +0000 (14:53 +0200)]
Cleanup: --help text output

Some arguments missed their <value>.

22 months agoCleanup: blf internal struct naming
Campbell Barton [Sat, 31 Mar 2018 11:40:23 +0000 (13:40 +0200)]
Cleanup: blf internal struct naming

- use x/y/width/height/max as a suffix.
- replace 'num' prefix /w 'len' suffix.

22 months agoLogging: add ability to exclude categories.
Campbell Barton [Sat, 31 Mar 2018 10:52:47 +0000 (12:52 +0200)]
Logging: add ability to exclude categories.

22 months agoDocs: doxygen docs for clog
Campbell Barton [Sat, 31 Mar 2018 10:26:37 +0000 (12:26 +0200)]
Docs: doxygen docs for clog

22 months agoFix clog: own error allocating from static buffer
Campbell Barton [Sat, 31 Mar 2018 09:25:49 +0000 (11:25 +0200)]
Fix clog: own error allocating from static buffer

22 months agoFix logger build w/ MSVC
Campbell Barton [Sat, 31 Mar 2018 07:18:30 +0000 (09:18 +0200)]
Fix logger build w/ MSVC

22 months agoBuild deps: do sndfile patch also on linux platform
Arto Kitula [Fri, 30 Mar 2018 23:15:13 +0000 (02:15 +0300)]
Build deps: do sndfile patch also on linux platform

22 months agoC Logging: use instead of printf for messages
Campbell Barton [Thu, 29 Mar 2018 18:38:32 +0000 (20:38 +0200)]
C Logging: use instead of printf for messages

- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.

22 months agobuild_deps: Disable building docs for OIIO
Thomas Beck [Fri, 30 Mar 2018 12:58:22 +0000 (14:58 +0200)]
build_deps: Disable building docs for OIIO

Two issues are fixed with this commit:

1) When we build OIIO (on unixoid build environments) and no /src/doc/oiiotool was present we had no build target for it (which led to a build error). As we don't need docs for OIIO, we disable it now.

2) We specified a var that OIIO does not recognize (was removed upstream a long time ago): ILMBASE_VERSION.

22 months agoPyDoc: Merge manual docs for bge.texture
Aaron Carlisle [Thu, 29 Mar 2018 22:02:04 +0000 (18:02 -0400)]
PyDoc: Merge manual docs for bge.texture

https://docs.blender.org/manual/en/dev/game_engine/python_api/videotexture.html

Had a few things that this file did not while this file having things the other did not.
To fix, I merged both documents into the python api.

22 months agoUI: Edit mode move edge data tool into a menu
Aaron Carlisle [Thu, 29 Mar 2018 18:26:49 +0000 (14:26 -0400)]
UI: Edit mode move edge data tool into a menu

UI: Edit mode move edge data tool into a menu

See also:

- D1741
- T46853

Reviewers: Severin, meta-androcto, campbellbarton

Subscribers: mont29, #user_interface

Tags: #user_interface

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

22 months agoPyDocs: Adde link to Wikipedia page for mathutils.Euler class
Aaron Carlisle [Thu, 29 Mar 2018 18:25:13 +0000 (14:25 -0400)]
PyDocs: Adde link to Wikipedia page for mathutils.Euler class

This update adds a link to the Wikipedia article "Euler angles" to the description of the mathutils.Euler class.
I initially was not sure what a "Euler" represented in Blender API, but found the Wikipedia article helpful. I believe others will find the link helpful too if it appears in the class documentation.

This is similar to the Wikipedia links that appear in the mathutils.Matrix class, e.g: https://docs.blender.org/api/blender_python_api_current/mathutils.html?highlight=euler#mathutils.Matrix.adjugate

Author: @justasb

Reviewers: campbellbarton, trumanblending, Blendify

Reviewed By: Blendify

Subscribers: Blendify

Tags: #bf_blender

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

22 months agoDepsgraph: initialize EvaluationContext even if nothing to update
Dalai Felinto [Thu, 29 Mar 2018 12:56:06 +0000 (09:56 -0300)]
Depsgraph: initialize EvaluationContext even if nothing to update

This is required to T54437 (sequencer preview uses last updated scene).
Although the fix itself needs to be in 2.8, for the 2.8 specific
initialization code.

22 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.

22 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.

22 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

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

22 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.

22 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.

22 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

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

22 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

22 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.

22 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.

22 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

22 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

22 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

22 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.

22 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

22 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!

22 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

22 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.

22 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.

22 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

22 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

22 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.

22 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.

22 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

22 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.

22 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

22 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.

22 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

22 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).

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

22 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

22 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.

22 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!

22 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.

22 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 ;)

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

22 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

22 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.

22 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.

22 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

22 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.

22 months agoGlog: Restore haiko OS
Sergey Sharybin [Thu, 22 Mar 2018 15:58:09 +0000 (16:58 +0100)]
Glog: Restore haiko OS

22 months agoFix T54172: Avoid jumping panel length during playback
Aaron Carlisle [Thu, 22 Mar 2018 15:41:14 +0000 (11:41 -0400)]
Fix T54172: Avoid jumping panel length during playback

22 months agoDepsgraph: Report new depsgraph evaluation time
Sergey Sharybin [Thu, 22 Mar 2018 15:40:32 +0000 (16:40 +0100)]
Depsgraph: Report new depsgraph evaluation time

Timing is printed to the console when running with --debug-depsgraph-time.

22 months agoUI: skip confirmation menu on quit prompt to save
Campbell Barton [Thu, 22 Mar 2018 15:23:29 +0000 (16:23 +0100)]
UI: skip confirmation menu on quit prompt to save