blender.git
14 months agoGHOST: Fix memory leak in X11 DPI query
Sergey Sharybin [Tue, 10 Jul 2018 08:59:06 +0000 (10:59 +0200)]
GHOST: Fix memory leak in X11 DPI query

The X resource database is to be explicitly destroyed. This fixes 46 bytes
leak per every window DPI query (which happens a lot on window move/resize
and even on areas resize).

Unfortunately, this does not fully fix the leak since the known leak:

  https://bugs.freedesktop.org/show_bug.cgi?id=94604

14 months agoKeymap: minor changes for keymap display
Campbell Barton [Tue, 10 Jul 2018 05:41:49 +0000 (07:41 +0200)]
Keymap: minor changes for keymap display

14 months agoFix transform plane constraint orientation cycle
Campbell Barton [Tue, 10 Jul 2018 04:51:25 +0000 (06:51 +0200)]
Fix transform plane constraint orientation cycle

Regression since 2.79b release

14 months agoCleanup: use const transform args
Campbell Barton [Mon, 9 Jul 2018 15:57:05 +0000 (17:57 +0200)]
Cleanup: use const transform args

14 months agoCleanup: remove 'Orientation' from keymap item name
Campbell Barton [Mon, 9 Jul 2018 05:39:26 +0000 (07:39 +0200)]
Cleanup: remove 'Orientation' from keymap item name

It's constraint not an orientation,
in transform context it can be inferred.

14 months agoKeymap: remove some hard coded transform events
Campbell Barton [Mon, 9 Jul 2018 05:29:12 +0000 (07:29 +0200)]
Keymap: remove some hard coded transform events

Also re-order for display purposes

14 months agoCleanup: right shift
Campbell Barton [Mon, 9 Jul 2018 04:38:07 +0000 (06:38 +0200)]
Cleanup: right shift

14 months agoFix scale in Apply Pose As Rest Pose for bendy bones.
Alexander Gavrilov [Sat, 7 Jul 2018 11:41:29 +0000 (14:41 +0300)]
Fix scale in Apply Pose As Rest Pose for bendy bones.

Scale is multiplicative, and adding it up causes the bone to bloat.

14 months agoCleanup: isinstance can take multiple types
Campbell Barton [Sat, 7 Jul 2018 09:27:48 +0000 (11:27 +0200)]
Cleanup: isinstance can take multiple types

14 months agoCleanup: pep8
Campbell Barton [Sat, 7 Jul 2018 06:48:35 +0000 (08:48 +0200)]
Cleanup: pep8

14 months agoCleanup: redundant poll checks
Campbell Barton [Sat, 7 Jul 2018 06:36:17 +0000 (08:36 +0200)]
Cleanup: redundant poll checks

14 months agoPyDrivers: update bytecode check for Python3.6
Campbell Barton [Fri, 6 Jul 2018 17:31:00 +0000 (19:31 +0200)]
PyDrivers: update bytecode check for Python3.6

14 months agoAnimation player: Ensure new frames are displayed while dragging mouse
Sergey Sharybin [Fri, 6 Jul 2018 15:14:16 +0000 (17:14 +0200)]
Animation player: Ensure new frames are displayed while dragging mouse

Thanks Campbell for review!

14 months agoCleanup: use outliner_flag_* name prefix
Campbell Barton [Fri, 6 Jul 2018 12:40:13 +0000 (14:40 +0200)]
Cleanup: use outliner_flag_* name prefix

14 months agofix c++ comment style in 3cc2a9b934d0
Philipp Oeser [Fri, 6 Jul 2018 10:58:07 +0000 (12:58 +0200)]
fix c++ comment style in 3cc2a9b934d0

14 months agoOcean Modifier: removed unused refresh flags
Sybren A. Stüvel [Fri, 6 Jul 2018 10:42:58 +0000 (12:42 +0200)]
Ocean Modifier: removed unused refresh flags

The flags were set and cleared correctly, but nothing was actually reading
them.

14 months agoOcean Modifier: removed the MOD_OCEAN_REFRESH_ADD flag
Sybren A. Stüvel [Fri, 6 Jul 2018 10:40:09 +0000 (12:40 +0200)]
Ocean Modifier: removed the MOD_OCEAN_REFRESH_ADD flag

The flag was only used in readfile.c, and resulted in a delayed call to
BKE_ocean_add(); this call is now immediately made instead as it's not
very expensive.

14 months agoFix T55581: kill running (render) jobs when deleting a scene
Philipp Oeser [Fri, 22 Jun 2018 11:44:12 +0000 (13:44 +0200)]
Fix T55581: kill running (render) jobs when deleting a scene

also fixed passing WM_JOB_TYPE_ANY to WM_jobs_kill_type()

Reviewed By: brecht

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

14 months agoCycles: Enabled half precision textures for OpenCL devices that support the cl_khr_fp...
Stefan Werner [Fri, 6 Jul 2018 09:42:34 +0000 (11:42 +0200)]
Cycles: Enabled half precision textures for OpenCL devices that support the cl_khr_fp16 extension.

14 months agoCycles: Fixed OpenCL kernel build, it threw a compiler error.
Stefan Werner [Fri, 6 Jul 2018 08:21:02 +0000 (10:21 +0200)]
Cycles: Fixed OpenCL kernel build, it threw a compiler error.

14 months agoCleanup: strip trailing space for cycles
Campbell Barton [Fri, 6 Jul 2018 08:17:58 +0000 (10:17 +0200)]
Cleanup: strip trailing space for cycles

14 months agoEmpty Object: Center images by default
Campbell Barton [Fri, 6 Jul 2018 08:05:14 +0000 (10:05 +0200)]
Empty Object: Center images by default

14 months agoBKE_addons: utility to remove by name
Campbell Barton [Fri, 6 Jul 2018 05:55:29 +0000 (07:55 +0200)]
BKE_addons: utility to remove by name

14 months agoCleanup: flag checks
Campbell Barton [Thu, 5 Jul 2018 20:49:42 +0000 (22:49 +0200)]
Cleanup: flag checks

14 months agoRNA: correct callback type
Campbell Barton [Thu, 5 Jul 2018 20:25:34 +0000 (22:25 +0200)]
RNA: correct callback type

Missed when changing callbacks from int to bool type.

14 months agoCycles: Adding native support for UINT16 textures.
Stefan Werner [Thu, 5 Jul 2018 10:37:52 +0000 (12:37 +0200)]
Cycles: Adding native support for UINT16 textures.

Textures in 16 bit integer format are sometimes used for displacement, bump and normal maps and can be exported by tools like Substance Painter. Without this patch, Cycles would promote those textures to single precision floating point, causing them to take up twice as much memory as needed.

Reviewers: #cycles, brecht, sergey

Reviewed By: #cycles, brecht, sergey

Subscribers: sergey, dingto, #cycles

Tags: #cycles

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

14 months agoCleanup: pep8
Campbell Barton [Thu, 5 Jul 2018 05:53:21 +0000 (07:53 +0200)]
Cleanup: pep8

14 months agoCycles Denoising: Pass tile buffers to every OpenCL kernel to conform to standard...
Lukas Stockner [Wed, 4 Jul 2018 12:02:38 +0000 (14:02 +0200)]
Cycles Denoising: Pass tile buffers to every OpenCL kernel to conform to standard and get rid of set_tile_info

14 months agoCycles Denoising: Correctly handle target buffer in tile unmapping and move device...
Lukas Stockner [Wed, 4 Jul 2018 11:19:12 +0000 (13:19 +0200)]
Cycles Denoising: Correctly handle target buffer in tile unmapping and move device swap logic to the device_memory

14 months agoCycles Denoising: Cleanup: Rename tiles to tile_info
Lukas Stockner [Wed, 4 Jul 2018 12:26:42 +0000 (14:26 +0200)]
Cycles Denoising: Cleanup: Rename tiles to tile_info

14 months agoCycles Denoising: Refactor denoiser tile handling
Lukas Stockner [Wed, 4 Jul 2018 12:26:15 +0000 (14:26 +0200)]
Cycles Denoising: Refactor denoiser tile handling

This deduplicates the calls for tile (un)mapping and allows to have a target buffer that is different from the source buffer (needed for baking and animation denoising).

14 months agoCycles Denoising: Split main function into logical steps
Lukas Stockner [Wed, 4 Jul 2018 12:22:38 +0000 (14:22 +0200)]
Cycles Denoising: Split main function into logical steps

14 months agoCleanup: pep8
Campbell Barton [Tue, 3 Jul 2018 20:35:37 +0000 (22:35 +0200)]
Cleanup: pep8

14 months agoPython: Print file:line when editing UI source
Campbell Barton [Tue, 3 Jul 2018 05:22:26 +0000 (07:22 +0200)]
Python: Print file:line when editing UI source

14 months agoCleanup: pep8
Campbell Barton [Tue, 3 Jul 2018 04:47:49 +0000 (06:47 +0200)]
Cleanup: pep8

14 months agoCleanup: pep8
Campbell Barton [Tue, 3 Jul 2018 04:27:53 +0000 (06:27 +0200)]
Cleanup: pep8

14 months agoCleanup: right shift
Campbell Barton [Mon, 2 Jul 2018 16:45:26 +0000 (18:45 +0200)]
Cleanup: right shift

14 months agoPainting: fix uninitialized variable use
Campbell Barton [Mon, 2 Jul 2018 16:16:37 +0000 (18:16 +0200)]
Painting: fix uninitialized variable use

14 months agoCycles: Fix missing curve hair when building with GCC-8 in release mode
Sergey Sharybin [Mon, 2 Jul 2018 13:11:48 +0000 (15:11 +0200)]
Cycles: Fix missing curve hair when building with GCC-8 in release mode

Reshuffle cast intrinsics to make XOR to operate on __m128i rather
than on __m128.

Hopefully this does not affect performance.

14 months agoScreen: support splitting from floating menu
Campbell Barton [Mon, 2 Jul 2018 10:24:21 +0000 (12:24 +0200)]
Screen: support splitting from floating menu

14 months agoCleanup: use bool for poll functions
Campbell Barton [Mon, 2 Jul 2018 09:47:00 +0000 (11:47 +0200)]
Cleanup: use bool for poll functions

14 months agoCorrect f-string in own recent changes
Campbell Barton [Mon, 2 Jul 2018 07:18:38 +0000 (09:18 +0200)]
Correct f-string in own recent changes

14 months agoCleanup: right shift in interface code
Campbell Barton [Sun, 1 Jul 2018 17:57:31 +0000 (19:57 +0200)]
Cleanup: right shift in interface code

14 months agoFix T55687: compile error when not using c++11.
Brecht Van Lommel [Sun, 1 Jul 2018 14:48:19 +0000 (16:48 +0200)]
Fix T55687: compile error when not using c++11.

14 months agoFix T55626, fix T55106: Cycles motion blur + persistent images bug.
Brecht Van Lommel [Sun, 1 Jul 2018 14:31:46 +0000 (16:31 +0200)]
Fix T55626, fix T55106: Cycles motion blur + persistent images bug.

14 months agoRNA: use bool for boolean RNA types
Campbell Barton [Sun, 1 Jul 2018 13:47:09 +0000 (15:47 +0200)]
RNA: use bool for boolean RNA types

We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.

14 months agoCleanup: reduce variable scope
Campbell Barton [Sun, 1 Jul 2018 08:32:47 +0000 (10:32 +0200)]
Cleanup: reduce variable scope

14 months agoCleanup: avoid calloc when immediately overwritten
Campbell Barton [Sun, 1 Jul 2018 08:26:37 +0000 (10:26 +0200)]
Cleanup: avoid calloc when immediately overwritten

14 months agoCleanup: use f-string
Campbell Barton [Sat, 30 Jun 2018 20:02:41 +0000 (22:02 +0200)]
Cleanup: use f-string

14 months agoCleanup: split out context member query
Campbell Barton [Sat, 30 Jun 2018 16:05:01 +0000 (18:05 +0200)]
Cleanup: split out context member query

14 months agoCleanup: remove unused context arg to menu
Campbell Barton [Sat, 30 Jun 2018 10:31:53 +0000 (12:31 +0200)]
Cleanup: remove unused context arg to menu

14 months agoUI: Add 'interface_query.c'
Campbell Barton [Sat, 30 Jun 2018 08:36:40 +0000 (10:36 +0200)]
UI: Add 'interface_query.c'

Interface files are increasingly mixing up too much functionality,
add a file only to handle queries.

More functions can be moved/added here.

14 months agoCleanup: rename bmesh_queries -> bmesh_query
Campbell Barton [Sat, 30 Jun 2018 08:29:40 +0000 (10:29 +0200)]
Cleanup: rename bmesh_queries -> bmesh_query

Other files with the same purpose already used 'query'.

14 months agoCleanup: use f-string
Campbell Barton [Sat, 30 Jun 2018 07:23:07 +0000 (09:23 +0200)]
Cleanup: use f-string

14 months agoFix T54524: keyframe and driver colors not showing in shape key list.
Brecht Van Lommel [Fri, 29 Jun 2018 19:13:35 +0000 (21:13 +0200)]
Fix T54524: keyframe and driver colors not showing in shape key list.

This reverts commit 357b72e0a7d4a270bf1273102595446ccca16259 which caused
the issue, we need a better fix for that cosmetic issue from T50862. For
now displaying keyframes and drivers is the more important one.

14 months agoCycles: change AO node default to 16 samples and only local off.
Brecht Van Lommel [Fri, 29 Jun 2018 13:02:09 +0000 (15:02 +0200)]
Cycles: change AO node default to 16 samples and only local off.

14 months agoCleanup: trailing newlines
Campbell Barton [Fri, 29 Jun 2018 07:23:51 +0000 (09:23 +0200)]
Cleanup: trailing newlines

14 months agoCleanup: trailing newlines
Campbell Barton [Fri, 29 Jun 2018 06:02:49 +0000 (08:02 +0200)]
Cleanup: trailing newlines

14 months agoWM: Remove Screen Cast
Campbell Barton [Thu, 28 Jun 2018 21:39:20 +0000 (23:39 +0200)]
WM: Remove Screen Cast

This feature is better handled by specialized tools.

14 months agoAlembic: speed up export of packed UV islands.
Cédric Paille [Thu, 28 Jun 2018 12:55:16 +0000 (14:55 +0200)]
Alembic: speed up export of packed UV islands.

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

14 months agoFix T55662: Crash on text autocomplete
Campbell Barton [Thu, 28 Jun 2018 09:09:09 +0000 (11:09 +0200)]
Fix T55662: Crash on text autocomplete

Regression from undo system upgrade.

14 months agoCMake: enable WITH_ASSERT_ABORT by default
Campbell Barton [Thu, 28 Jun 2018 08:48:06 +0000 (10:48 +0200)]
CMake: enable WITH_ASSERT_ABORT by default

Assert from BLI_assert by default in debug builds
(instead of just printing a warning).

Some developers ignored this, causing errors for others.
Better debug builds cause hard error so code isn't ignored.

Disabling is still useful when bisecting or testing outdated code.

14 months agoUI: use two dot ellipses
Campbell Barton [Thu, 28 Jun 2018 08:45:39 +0000 (10:45 +0200)]
UI: use two dot ellipses

Use less space for sign used when we don't have enough.

14 months agoCleanup: use f-strings
Campbell Barton [Thu, 28 Jun 2018 06:30:54 +0000 (08:30 +0200)]
Cleanup: use f-strings

14 months agoFix Cycles tests build on macOS.
Brecht Van Lommel [Sat, 23 Jun 2018 21:30:38 +0000 (23:30 +0200)]
Fix Cycles tests build on macOS.

14 months agoCleanup: style
Campbell Barton [Wed, 27 Jun 2018 20:32:52 +0000 (22:32 +0200)]
Cleanup: style

14 months agoCleanup: pep8 function indentation
Campbell Barton [Tue, 26 Jun 2018 17:41:37 +0000 (19:41 +0200)]
Cleanup: pep8 function indentation

14 months agoUI: Add/Update bad tooltips
Aaron Carlisle [Tue, 26 Jun 2018 16:29:11 +0000 (12:29 -0400)]
UI: Add/Update bad tooltips

Part of T51061

14 months agoFix bug in DNA_struct_elem_find when checking the first field
Sybren A. Stüvel [Tue, 26 Jun 2018 15:35:04 +0000 (17:35 +0200)]
Fix bug in DNA_struct_elem_find when checking the first field

find_elem(olddata=NULL) doesn't work reliably for existence checks; it will
return NULL both when the field is found at offset 0 and when it is not
found at all.

14 months agoRevert "Turned off clang warnings in third party includes."
Stefan Werner [Tue, 26 Jun 2018 08:26:56 +0000 (10:26 +0200)]
Revert "Turned off clang warnings in third party includes."

This reverts commit d53093953f8f3b58600cb19020ecbe0b5f254b52.

14 months agoPyAPI: add ImBuf.copy
Campbell Barton [Tue, 26 Jun 2018 07:30:18 +0000 (09:30 +0200)]
PyAPI: add ImBuf.copy

DD348 by @kilon w/ edits.

14 months agoPyAPI: move deep-copy args check to py_capi_utils
Campbell Barton [Tue, 26 Jun 2018 07:26:52 +0000 (09:26 +0200)]
PyAPI: move deep-copy args check to py_capi_utils

14 months agoCycles: Fix wrong row count for World MIS CDF calculation
Lukas Stockner [Tue, 26 Jun 2018 03:34:30 +0000 (05:34 +0200)]
Cycles: Fix wrong row count for World MIS CDF calculation

14 months agoTurned off clang warnings in third party includes.
Stefan Werner [Mon, 25 Jun 2018 21:02:01 +0000 (23:02 +0200)]
Turned off clang warnings in third party includes.

The latest clang compiler (at least the one in Xcode 9.4.1) warns about the register keyword and macro expansions using defined().
Since these warnings come from third party code, we can't address them directly in Blender. Silencing them via #pramgas will
at least keep the warnings during a build down to the ones that are relevant to Blender code.

14 months agoCleanup: Nuke most of G.main from GPU code.
Bastien Montagne [Mon, 25 Jun 2018 10:32:48 +0000 (12:32 +0200)]
Cleanup: Nuke most of G.main from GPU code.

14 months agoCleanup: Few more validation of G_MAIN usages...
Bastien Montagne [Mon, 25 Jun 2018 10:02:20 +0000 (12:02 +0200)]
Cleanup: Few more validation of G_MAIN usages...

14 months agoAdd back header needed win32
Campbell Barton [Mon, 25 Jun 2018 07:46:03 +0000 (09:46 +0200)]
Add back header needed win32

14 months agoCMake: correct remove_strict_cxx_flags_file
Campbell Barton [Mon, 25 Jun 2018 05:30:00 +0000 (07:30 +0200)]
CMake: correct remove_strict_cxx_flags_file

Was still using C-flags.

15 months agoCycles: change AO node color default to 1.0.
Brecht Van Lommel [Sun, 24 Jun 2018 10:24:30 +0000 (12:24 +0200)]
Cycles: change AO node color default to 1.0.

15 months agoCleanup: move UI context menus into own file
Campbell Barton [Sun, 24 Jun 2018 08:01:13 +0000 (10:01 +0200)]
Cleanup: move UI context menus into own file

15 months agoUI: alternate fix for empty context menu
Campbell Barton [Sat, 23 Jun 2018 08:31:10 +0000 (10:31 +0200)]
UI: alternate fix for empty context menu

block and layout could be NULL and checking this everywhere
wasn't practical.

Instead of lazy initializing, add UI_popup_menu_end_or_cancel
which cancels empty popup menus.

15 months agoCMake: Make language explicit for per-file strict flags removal
Sergey Sharybin [Fri, 22 Jun 2018 12:40:00 +0000 (14:40 +0200)]
CMake: Make language explicit for per-file strict flags removal

15 months agoCMake: Cleanup, add_cc_flag -> add_c_flag
Sergey Sharybin [Fri, 22 Jun 2018 12:29:13 +0000 (14:29 +0200)]
CMake: Cleanup, add_cc_flag -> add_c_flag

15 months agoCMake: Cleanup, rename CC_REMOVE_STRICT_FLAGS to C_REMOVE_STRICT_FLAGS
Sergey Sharybin [Fri, 22 Jun 2018 12:17:55 +0000 (14:17 +0200)]
CMake: Cleanup, rename CC_REMOVE_STRICT_FLAGS to C_REMOVE_STRICT_FLAGS

15 months agoCMake: Tweaks to removal of strict flags
Sergey Sharybin [Fri, 22 Jun 2018 12:07:55 +0000 (14:07 +0200)]
CMake: Tweaks to removal of strict flags

Silences the following strict flags from external libraries:

- -Wclass-memaccess
- -Wswitch
- -Wtype-limits
- -Wint-in-bool-context

Needed to tweak macro a bit, since the old logic was wrong:
we can not use CXX flags for C compiler, need way more strict
separation between what goes where.

15 months agoCleanup: rename 3D cursor calculation vars
Campbell Barton [Fri, 22 Jun 2018 10:55:15 +0000 (12:55 +0200)]
Cleanup: rename 3D cursor calculation vars

15 months agoCleanup: remove last G.main from RNA.
Bastien Montagne [Fri, 22 Jun 2018 10:35:41 +0000 (12:35 +0200)]
Cleanup: remove last G.main from RNA.

Again, we cannot actually get rid of G_MAIN global access here, so in
most case just 'marked' them as valid, and added assert checks to ensure
we do only work with IDs in G_MAIN in those cases.

15 months agoTweak new BKE_id_is_in_global_main to accept NULL pointer (and consider them as valid).
Bastien Montagne [Fri, 22 Jun 2018 10:26:45 +0000 (12:26 +0200)]
Tweak new BKE_id_is_in_global_main to accept NULL pointer (and consider them as valid).

15 months agoCleanup: get rid of last G.main's in bpy area.
Bastien Montagne [Fri, 22 Jun 2018 09:37:47 +0000 (11:37 +0200)]
Cleanup: get rid of last G.main's in bpy area.

Essentially 'validating' them as G_MAIN, and adding some asserts in
dubious places, that handled IDs are actually in G_MAIN.

15 months agoBKE_library: Add func to check an ID is actually in G_MAIN database.
Bastien Montagne [Fri, 22 Jun 2018 09:37:08 +0000 (11:37 +0200)]
BKE_library: Add func to check an ID is actually in G_MAIN database.

15 months agoEdit Mode: Bevel Op: Offset Soft Max to 100
Aaron Carlisle [Thu, 21 Jun 2018 17:46:11 +0000 (13:46 -0400)]
Edit Mode: Bevel Op: Offset Soft Max to 100

This is consistent with the modifier

15 months agoFix T55568: second click event ignored
Campbell Barton [Thu, 21 Jun 2018 17:26:21 +0000 (19:26 +0200)]
Fix T55568: second click event ignored

15 months agoRevert "Fix T55568: second click event ignored"
Campbell Barton [Thu, 21 Jun 2018 17:24:50 +0000 (19:24 +0200)]
Revert "Fix T55568: second click event ignored"

This reverts commit 52aa963f0ef1b6f4abba6653e9a441dee234127a.

Fixed for keyboards, broke mouse buttons.

15 months agoUI: don't show empty button context menu
Campbell Barton [Thu, 21 Jun 2018 14:33:27 +0000 (16:33 +0200)]
UI: don't show empty button context menu

15 months agoFix Cycles incorrect versioning for automatic sample world resolution.
Brecht Van Lommel [Thu, 21 Jun 2018 13:25:29 +0000 (15:25 +0200)]
Fix Cycles incorrect versioning for automatic sample world resolution.

15 months agoUI: preference for developer extras
Campbell Barton [Thu, 21 Jun 2018 12:54:21 +0000 (14:54 +0200)]
UI: preference for developer extras

Currently only used for "Edit Source" feature.

15 months agoFix T55568: second click event ignored
Campbell Barton [Thu, 21 Jun 2018 08:58:03 +0000 (10:58 +0200)]
Fix T55568: second click event ignored

Double-click handling caused the second click to be ignored
for keymaps that only handle click.

15 months agoFix Cycles CUDA render errors with CUDA 9.2.
Brecht Van Lommel [Thu, 21 Jun 2018 09:29:09 +0000 (11:29 +0200)]
Fix Cycles CUDA render errors with CUDA 9.2.

Work around what might be a compiler bug.

15 months agoFix T55564: Cycles OpenCL build error on some scenes.
Brecht Van Lommel [Thu, 21 Jun 2018 09:18:51 +0000 (11:18 +0200)]
Fix T55564: Cycles OpenCL build error on some scenes.

15 months agoFix T55491: Double click fail in menu popups
Campbell Barton [Thu, 21 Jun 2018 07:50:24 +0000 (09:50 +0200)]
Fix T55491: Double click fail in menu popups