blender.git
2 years agoCleanup: typo, and 0 -> false for booleans.
Bastien Montagne [Thu, 7 Jun 2018 16:35:37 +0000 (18:35 +0200)]
Cleanup: typo, and 0 -> false for booleans.

2 years agoWM: add support for drag events
Campbell Barton [Thu, 7 Jun 2018 15:05:49 +0000 (17:05 +0200)]
WM: add support for drag events

This allows for a single key to be mapped to both release and drag,
useful for pie menus to share a key with a different action.

2 years agoFix key repeat events resetting the click timer
Campbell Barton [Thu, 7 Jun 2018 14:51:03 +0000 (16:51 +0200)]
Fix key repeat events resetting the click timer

2 years agoCleanup: trailing space for windowmanager
Campbell Barton [Thu, 7 Jun 2018 14:43:52 +0000 (16:43 +0200)]
Cleanup: trailing space for windowmanager

2 years agoWM: check for release instead of not pressed
Campbell Barton [Thu, 7 Jun 2018 14:19:59 +0000 (16:19 +0200)]
WM: check for release instead of not pressed

Makes reasoning about events more predictable.

2 years agoFix crash due to missing init of new bAnimContext bmain member in transform code.
Bastien Montagne [Thu, 7 Jun 2018 13:38:31 +0000 (15:38 +0200)]
Fix crash due to missing init of new bAnimContext bmain member in transform code.

From own previous G.main-busting commit.

2 years agoFix double free in dyntopo-sculpt mode undo
Campbell Barton [Thu, 7 Jun 2018 12:54:09 +0000 (14:54 +0200)]
Fix double free in dyntopo-sculpt mode undo

2 years agoFix sculpt assert on initialization
Campbell Barton [Thu, 7 Jun 2018 11:38:46 +0000 (13:38 +0200)]
Fix sculpt assert on initialization

2 years agoCleanup: remove moar G.main usages.
Bastien Montagne [Thu, 7 Jun 2018 10:47:00 +0000 (12:47 +0200)]
Cleanup: remove moar G.main usages.

Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)

2 years agoRevert "Cycles: Cleanup: Don't use return on function returning void"
Sergey Sharybin [Thu, 7 Jun 2018 09:57:57 +0000 (11:57 +0200)]
Revert "Cycles: Cleanup: Don't use return on function returning void"

Not sure why exactly it is called a cleanup, the code was much more clear
and robust against possible missing return statements which are MANDATORY.

Missing return statement will:

- Cause two different BVH traversals to be run.

  Not is happening currently, but if more BVH layouts are added, it will
  become a problem.

- It is already causing assert() statements to fail, since functions are
  no longer returning when they are supposed to.

If there is any measurable reason to keep this change, let me know.
Otherwise just stick to reliable/tested/robust code.

This reverts commit ba65f7093b39a8e5f1fb869cbc347fb810a05ab9.

2 years agoCleanup: Nuke moar G.main usages...
Bastien Montagne [Wed, 6 Jun 2018 13:50:24 +0000 (15:50 +0200)]
Cleanup: Nuke moar G.main usages...

2 years agoPython API: Initial 'imbuf' API
Campbell Barton [Thu, 7 Jun 2018 05:41:49 +0000 (07:41 +0200)]
Python API: Initial 'imbuf' API

Support only basic operations new/load/write & resize.

Add now so we can extend as needed & more easily accept patches.

2 years agoFix BLI_ASSERT_UNIT macro w/ non-finite numbers
Campbell Barton [Wed, 6 Jun 2018 17:49:27 +0000 (19:49 +0200)]
Fix BLI_ASSERT_UNIT macro w/ non-finite numbers

2 years agoUI: NLA: Influence should be a factor (RNA)
Aaron Carlisle [Wed, 6 Jun 2018 16:00:04 +0000 (12:00 -0400)]
UI: NLA: Influence should be a factor (RNA)

2 years agoAlembic export: only free duplilists when not NULL
Sybren A. Stüvel [Wed, 6 Jun 2018 13:42:20 +0000 (15:42 +0200)]
Alembic export: only free duplilists when not NULL

2 years agoFix error using freed bmain
Campbell Barton [Wed, 6 Jun 2018 07:36:50 +0000 (09:36 +0200)]
Fix error using freed bmain

Regression in 481cdb08ed6f3

2 years agomake.bat : move all experimental options to their own section in the help.
Ray Molenkamp [Tue, 5 Jun 2018 17:29:03 +0000 (11:29 -0600)]
make.bat : move all experimental options to their own section in the help.

2 years agomake.bat : bring the help up to date with recent additions to the build script.
Ray Molenkamp [Tue, 5 Jun 2018 16:40:14 +0000 (10:40 -0600)]
make.bat : bring the help up to date with recent additions to the build script.

2 years agomake.bat : check for existence of ninja before using it.
Ray Molenkamp [Tue, 5 Jun 2018 16:39:39 +0000 (10:39 -0600)]
make.bat : check for existence of ninja before using it.

2 years agomake.bat: change the way the vs buildtools are detected.
Ray Molenkamp [Tue, 5 Jun 2018 16:38:48 +0000 (10:38 -0600)]
make.bat: change the way the vs buildtools are detected.

The recent change also used the buildtools instead of the regular compiler, you now have to explicitly state what you want to use :

2017 - the standard msvc compiler
2017pre - the msvc compiler from the preview installation
2017b - the msvc compiler from the buildtools installation

2 years agoFix crash in owmn previous commit.
Bastien Montagne [Tue, 5 Jun 2018 15:51:17 +0000 (17:51 +0200)]
Fix crash in owmn previous commit.

2 years agoCleanup: use new accessors to blendfile path (Main.name).
Bastien Montagne [Tue, 5 Jun 2018 13:10:33 +0000 (15:10 +0200)]
Cleanup: use new accessors to blendfile path (Main.name).

2 years agoCleanup: add hleper functions to get filepath from Main.
Bastien Montagne [Tue, 5 Jun 2018 13:08:28 +0000 (15:08 +0200)]
Cleanup: add hleper functions to get filepath from Main.

This helps making things clearer and cleaner. Func returning filepath of
G.main is separate, so that we can easily track its usages, and
hopefully deprecate it at some point. Though that usage of G.main is
likely the less evil one, you nearly always want current blendfile path
in those cases anyway.

2 years agoCleanup: pep8
Campbell Barton [Tue, 5 Jun 2018 14:32:11 +0000 (16:32 +0200)]
Cleanup: pep8

Use 'autopep8 --ignore E721,E722' on our UI code, only minor changes.

2 years agomake.bat: cache the vcredist directory.
Ray Molenkamp [Tue, 5 Jun 2018 13:25:37 +0000 (07:25 -0600)]
make.bat: cache the vcredist directory.

When run from make.bat the environment is setup correctly and the VCToolsRedistDir environment variable exists, on later invocations of cmake this may no longer be the case and a warning was emitted about the missing runtime. we can't rely on InstallRequiredSystemLibraries.cmake here since it uses the compiler version to figure out the correct location and it doesn't know how to deal with clang.

2 years agomake.bat : Fix clang+asan msbuild project generation
Ray Molenkamp [Tue, 5 Jun 2018 04:35:57 +0000 (22:35 -0600)]
make.bat : Fix clang+asan msbuild project generation

2 years agoCleanup: correct menu name
Campbell Barton [Mon, 4 Jun 2018 17:09:52 +0000 (19:09 +0200)]
Cleanup: correct menu name

2 years agoCleanup: strip ghost trailing space
Campbell Barton [Mon, 4 Jun 2018 16:47:57 +0000 (18:47 +0200)]
Cleanup: strip ghost trailing space

2 years agoCleanup: strip tests trailing space
Campbell Barton [Mon, 4 Jun 2018 16:47:31 +0000 (18:47 +0200)]
Cleanup: strip tests trailing space

2 years agoParticle System: move data creation into RNA update
Campbell Barton [Mon, 4 Jun 2018 15:55:19 +0000 (17:55 +0200)]
Particle System: move data creation into RNA update

Relying on evaluation to initialize data causes issues w/ 2.8.

2 years agoFix T55260: load Text File with Python from GUI Button results in 0 User
Bastien Montagne [Mon, 4 Jun 2018 10:46:59 +0000 (12:46 +0200)]
Fix T55260: load Text File with Python from GUI Button results in 0 User

Let's just always ensure user_one when loading text from operator...

2 years agoCleanup: strip trailing space in editors
Campbell Barton [Mon, 4 Jun 2018 07:31:30 +0000 (09:31 +0200)]
Cleanup: strip trailing space in editors

2 years ago Cleanup: strip trailing space in GPU module
Campbell Barton [Mon, 4 Jun 2018 07:09:12 +0000 (09:09 +0200)]
 Cleanup: strip trailing space in GPU module

2 years agoCleanup: newlines at EOF for Python modules
Campbell Barton [Mon, 4 Jun 2018 06:49:13 +0000 (08:49 +0200)]
Cleanup: newlines at EOF for Python modules

2 years agoCleanup: strip trailing space in Python module
Campbell Barton [Mon, 4 Jun 2018 06:54:17 +0000 (08:54 +0200)]
Cleanup: strip trailing space in Python module

2 years agoCleanup: strip trailing space in bmesh module
Campbell Barton [Mon, 4 Jun 2018 06:48:38 +0000 (08:48 +0200)]
Cleanup: strip trailing space in bmesh module

2 years agoCycles: Cleanup: Don't use return on function returning void
Lukas Stockner [Sun, 3 Jun 2018 22:07:17 +0000 (00:07 +0200)]
Cycles: Cleanup: Don't use return on function returning void

2 years agoCleanup: correct variable name, doxy sections
Campbell Barton [Sun, 3 Jun 2018 15:06:13 +0000 (17:06 +0200)]
Cleanup: correct variable name, doxy sections

2 years agoCleanup: add argument names to screen callbacks
Campbell Barton [Sun, 3 Jun 2018 13:11:31 +0000 (15:11 +0200)]
Cleanup: add argument names to screen callbacks

2 years agoCleanup: remove blockscale & handler
Campbell Barton [Sun, 3 Jun 2018 08:59:48 +0000 (10:59 +0200)]
Cleanup: remove blockscale & handler

Replace with link_flag, currently unused,
needed for dynamic space types which is planned.

2 years agobuild_environment: support for msvc2017 and newer cmake.
Ray Molenkamp [Sat, 2 Jun 2018 19:59:56 +0000 (13:59 -0600)]
build_environment: support for msvc2017 and newer cmake.

-expanded build_deps.cmd with 2017 support, it can't locate msvc2017 so needs to be run from developer prompt.
-Newer cmake was unhappy with openal's cmakelists.txt
-collada has warning as error on and errored out on new msvc2017 warnings.

2 years agobuild_environment: fix paths in osl.diff
Ray Molenkamp [Sat, 2 Jun 2018 19:12:42 +0000 (13:12 -0600)]
build_environment: fix paths in osl.diff

2 years ago--debug-gpu-shader: Dump GLSL shaders to disk
Dalai Felinto [Wed, 27 Sep 2017 16:03:00 +0000 (18:03 +0200)]
--debug-gpu-shader: Dump GLSL shaders to disk

This is really convenient for development. Either for profiling the
generated shaders or to check if the generated code is correct.

It writes the shaders to the temporary blender session folder.

(ported over from blender2.8)

2 years agoCleanup: warning
Campbell Barton [Sat, 2 Jun 2018 09:58:01 +0000 (11:58 +0200)]
Cleanup: warning

2 years agoCleanup: trailing whitespace (comment blocks)
Campbell Barton [Fri, 1 Jun 2018 16:19:39 +0000 (18:19 +0200)]
Cleanup: trailing whitespace (comment blocks)

Strip unindented comment blocks - mainly headers to avoid conflicts.

2 years agoCleanup: some more G.main removal from editor code.
Bastien Montagne [Fri, 1 Jun 2018 15:08:38 +0000 (17:08 +0200)]
Cleanup: some more G.main removal from editor code.

2 years agoAdd Asan support for clang on windows.
Ray Molenkamp [Thu, 31 May 2018 17:50:30 +0000 (11:50 -0600)]
Add Asan support for clang on windows.

This will currently only work for the RelWithDebInfo configuration since asan
does not support the debug crt. for source line information in the reports,
you need a copy of llvm-symbolizer in the blender folder or set the
ASAN_SYMBOLIZER_PATH environment variable to point to it. Currently (as of
6.0.0) llvm-symbolizer does not ship with the binary clang/llvm distribution.

Reviewers: campbellbarton

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

2 years agoCleanup: Remove G.main from some editor files.
Bastien Montagne [Thu, 31 May 2018 16:23:20 +0000 (18:23 +0200)]
Cleanup: Remove G.main from some editor files.

2 years agoCleanup: remove G.main from BKE mball code.
Bastien Montagne [Thu, 31 May 2018 14:44:05 +0000 (16:44 +0200)]
Cleanup: remove G.main from BKE mball code.

2 years agoCleanup: get rid of last G.main usages in BKE library code.
Bastien Montagne [Thu, 31 May 2018 14:04:04 +0000 (16:04 +0200)]
Cleanup: get rid of last G.main usages in BKE library code.

2 years agoCleanup: remove G.main from BKE modifier.
Bastien Montagne [Thu, 31 May 2018 13:24:30 +0000 (15:24 +0200)]
Cleanup: remove G.main from BKE modifier.

2 years agoCleanup: remove G.main from BKE object
Bastien Montagne [Thu, 31 May 2018 10:27:47 +0000 (12:27 +0200)]
Cleanup: remove G.main from BKE object

Had to add some G.main to modifiers, but in 2.8 we do not need that
anymore, so it's not that bad! ;)

2 years agoCleanup: nuke G.main out of BKE PackedFile code.
Bastien Montagne [Thu, 31 May 2018 09:07:14 +0000 (11:07 +0200)]
Cleanup: nuke G.main out of BKE PackedFile code.

2 years agoCleanup: use doxy sections for space types
Campbell Barton [Thu, 31 May 2018 07:49:58 +0000 (09:49 +0200)]
Cleanup: use doxy sections for space types

Also use struct names in enum/define comments.

2 years agoCleanup: return types in stubs
Campbell Barton [Thu, 31 May 2018 07:49:44 +0000 (09:49 +0200)]
Cleanup: return types in stubs

2 years agoFix OpenCL compilation error - BPT without SSS.
Hristo Gueorguiev [Wed, 30 May 2018 22:08:56 +0000 (00:08 +0200)]
Fix OpenCL compilation error - BPT without SSS.

2 years agomake.bat: fix support for building with just the build tools installed.
Ray Molenkamp [Wed, 30 May 2018 16:54:06 +0000 (10:54 -0600)]
make.bat: fix support for building with just the build tools installed.

2 years agoFix missing movieclip ID type in allowed ones for Outliner...
Bastien Montagne [Wed, 30 May 2018 14:14:55 +0000 (16:14 +0200)]
Fix missing movieclip ID type in allowed ones for Outliner...

2 years agoEdit Mode: add success return value
Campbell Barton [Wed, 30 May 2018 06:41:06 +0000 (08:41 +0200)]
Edit Mode: add success return value

Also remove fix for T6614, since BKE_object_obdata_is_libdata
no longer checks proxy.

2 years agoDNA: add OB_DATA_SUPPORT_EDITMODE macro
Campbell Barton [Wed, 30 May 2018 05:31:35 +0000 (07:31 +0200)]
DNA: add OB_DATA_SUPPORT_EDITMODE macro

2 years agoCleanup: Get rid of G.main in BKE_material.
Bastien Montagne [Tue, 29 May 2018 13:49:21 +0000 (15:49 +0200)]
Cleanup: Get rid of G.main in BKE_material.

Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...

2 years agomake.bat : fix release build not getting the right settings.
Ray Molenkamp [Tue, 29 May 2018 03:50:59 +0000 (21:50 -0600)]
make.bat : fix release build not getting the right settings.

2 years agomake.bat : improve error message while detecting the msvc runtime when using clang
Ray Molenkamp [Tue, 29 May 2018 02:07:24 +0000 (20:07 -0600)]
make.bat : improve error message while detecting the msvc runtime when using clang

2 years agomake.bat : add support for building with ninja and clang together.
Ray Molenkamp [Tue, 29 May 2018 01:56:17 +0000 (19:56 -0600)]
make.bat : add support for building with ninja and clang together.

2 years agoWindows: Add support for building with clang.
Ray Molenkamp [Mon, 28 May 2018 20:34:47 +0000 (14:34 -0600)]
Windows: Add support for building with clang.

This commit contains the minimum to make clang build/work with blender, asan and ninja build support is forthcoming

Things to note:

1) Builds and runs, and is able to pass all tests (except for the freestyle_stroke_material.blend test which was broken at that time for all platforms by the looks of it)

2) It's slightly faster than msvc when using cycles. (time in seconds, on an i7-3370)

victor_cpu
msvc:3099.51
clang:2796.43

pavillon_barcelona_cpu
msvc:1872.05
clang:1827.72

koro_cpu
msvc:1097.58
clang:1006.51

fishy_cat_cpu
msvc:815.37
clang:722.2

classroom_cpu
msvc:1705.39
clang:1575.43

bmw27_cpu
msvc:552.38
clang:561.53

barbershop_interior_cpu
msvc:2134.93
clang:1922.33

3) clang on windows uses a drop in replacement for the Microsoft cl.exe (takes some of the Microsoft parameters, but not all, and takes some of the clang parameters but not all) and uses ms headers + libraries + linker, so you still need visual studio installed and will use our existing vc14 svn libs.

4) X64 only currently, X86 builds but crashes on startup.

5) Tested with llvm/clang 6.0.0

6) Requires visual studio integration, available at https://github.com/LazyDodo/llvm-vs2017-integration

7) The Microsoft compiler spawns a few copies of cl in parallel to get faster build times, clang doesn't, so the build time is 3-4x slower than with msvc.

8) No openmp support yet. Have not looked at this much, the binary distribution of clang doesn't seem to include it on windows.

9) No ASAN support yet, some of the sanitizers can be made to work, but it was decided to leave support out of this commit.

Reviewers: campbellbarton

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

2 years agoFix Cycles + OSL build error, pass main to node editing functions.
Brecht Van Lommel [Sun, 27 May 2018 21:46:02 +0000 (23:46 +0200)]
Fix Cycles + OSL build error, pass main to node editing functions.

2 years agoUI: center align number buttons w/o text
Campbell Barton [Sun, 27 May 2018 19:06:38 +0000 (21:06 +0200)]
UI: center align number buttons w/o text

This makes supporting split properties and text possible, see T54951

2 years agoCleanup: Nuke most of remaining evil G.main from RNA.
Bastien Montagne [Sun, 27 May 2018 16:46:39 +0000 (18:46 +0200)]
Cleanup: Nuke most of remaining evil G.main from RNA.

The few ones in getters/setters we cannot remove as easily, for now we
can live with those I think...

2 years agoCycles: Fix problems in the IES loader when rendering with no file selected
Lukas Stockner [Sun, 27 May 2018 15:14:01 +0000 (17:14 +0200)]
Cycles: Fix problems in the IES loader when rendering with no file selected

2 years agoUI: replace BLI_strncpy w/ memcpy
Campbell Barton [Sun, 27 May 2018 10:50:03 +0000 (12:50 +0200)]
UI: replace BLI_strncpy w/ memcpy

Size is already checked.

2 years agoRecently added IES conflicts w/ EEVEE
Campbell Barton [Sun, 27 May 2018 09:01:46 +0000 (11:01 +0200)]
Recently added IES conflicts w/ EEVEE

2 years ago3D View: minor change to NDOF view orbit
Campbell Barton [Sun, 27 May 2018 08:34:01 +0000 (10:34 +0200)]
3D View: minor change to NDOF view orbit

This change is needed for 2.8, where the NULL check isn't a reliable way
of testing if dynamic offset is needed.

2 years agoFix restrict error in BLI_str_format_byte_unit
Campbell Barton [Sun, 27 May 2018 08:25:52 +0000 (10:25 +0200)]
Fix restrict error in BLI_str_format_byte_unit

Don't use sprintf to append a string to it's self.

Also correct BLI_str_rstrip_float_zero's return value.

2 years agomake.bat : Fix builtime.txt being written in the wrong folder.
Ray Molenkamp [Sun, 27 May 2018 01:20:07 +0000 (19:20 -0600)]
make.bat : Fix builtime.txt being written in the wrong folder.

2 years agoCycles: Add Support for IES files as textures for light strength
Lukas Stockner [Sat, 26 May 2018 22:46:37 +0000 (00:46 +0200)]
Cycles: Add Support for IES files as textures for light strength

This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.

Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.

The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.

The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.

Reviewers: #cycles, dingto, sergey, brecht

Reviewed By: #cycles, dingto, brecht

Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey

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

2 years agoThreads: add spinlock hit for hyperthreading processors on Windows.
Brecht Van Lommel [Sat, 26 May 2018 20:29:10 +0000 (22:29 +0200)]
Threads: add spinlock hit for hyperthreading processors on Windows.

Suggested by Percy Ross Tiglao.

2 years agomake.bat: Add support for building with ninja.
Ray Molenkamp [Sat, 26 May 2018 03:46:42 +0000 (21:46 -0600)]
make.bat: Add support for building with ninja.

ninja is an alternative to msbuild designed for fast rebuilds. However there is no IDE support, builds only from the command line.

Comparison between msbuild and ninja for a full build, build time in seconds.

Full Clean Build
msbuild     867.5
Ninja       801.2
Difference  -66.3 (-7.6%)

Minor Change
msbuild      43.0
Ninja        14.9
Difference  -28.1 (-64.4%)

No Changes
msbuild      23.0
Ninja         6.1
Difference  -16.9 (-73.5%)

2 years agomake.bat/cleanup: removed stray echo in make.bat
Ray Molenkamp [Fri, 25 May 2018 23:59:07 +0000 (17:59 -0600)]
make.bat/cleanup: removed stray echo in make.bat

2 years agomake.bat: refactor make.bat
Ray Molenkamp [Fri, 25 May 2018 23:57:13 +0000 (17:57 -0600)]
make.bat: refactor make.bat

make.bat was starting to become hard to maintain, this refactors it into separate batch files for each stage of the process.

-Improved detection of msvc2013/2015
-Improved failure handling.
-Added check for working msbuild and C++ compiler
-Added verbose switch to ease trouble shooting.
-Added Check if svn/cmake/git are in the path before using them
-Display the build configuration before asking to download the libraries
-Offer an option to recover an interrupted checkout of the libraries.
-Automatically check out sub-modules in-case they are missing.

2 years agoAdd number and memory size formatting throughout the UI
Diego Gangl [Fri, 25 May 2018 20:17:15 +0000 (22:17 +0200)]
Add number and memory size formatting throughout the UI

This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248

2 years ago[windows/make.bat] use a more reliable way of locating visual studio 2017.
Ray Molenkamp [Fri, 25 May 2018 16:24:01 +0000 (10:24 -0600)]
[windows/make.bat] use a more reliable way of locating visual studio 2017.

The registry hack we were using wasn't very reliable, the recommended way to locating visual studio is using vswhere (15.2 and up), using it also allows to switch between the regular and pre-release versions.

2 years agoWM: check modal handlers for keymap lookups
Campbell Barton [Fri, 25 May 2018 08:51:05 +0000 (10:51 +0200)]
WM: check modal handlers for keymap lookups

Keep in sync with 2.8x

2 years agoUI: fix assert
Campbell Barton [Fri, 25 May 2018 08:45:48 +0000 (10:45 +0200)]
UI: fix assert

Replace hard-coded button size check with UI_UNIT_X.

Caused icon-only buttons to have strings assigned based on UI-scale.

2 years ago3D View: add pixelsize function w/o UI scale
Campbell Barton [Fri, 25 May 2018 08:00:33 +0000 (10:00 +0200)]
3D View: add pixelsize function w/o UI scale

2 years agoCycles: Cleanup: Remove duplicated atan2f definition for OpenCL
Lukas Stockner [Thu, 24 May 2018 17:06:50 +0000 (19:06 +0200)]
Cycles: Cleanup: Remove duplicated atan2f definition for OpenCL

Turns out that atan2f was already defined for OpenCL.

2 years agoCycles Denoising: Don't use atomics in the accumulation kernel on CPUs
Lukas Stockner [Sun, 1 Apr 2018 00:10:27 +0000 (02:10 +0200)]
Cycles Denoising: Don't use atomics in the accumulation kernel on CPUs

The GPU kernel needs to use atomics for accumulation since all offsets are processed in
parallel, but on CPUs that's not the case, so we can disable them there for a considerable speedup.

2 years agoCycles/Compositor: Add arctan2 operation to the Math node
Lukas Stockner [Thu, 24 May 2018 00:51:41 +0000 (02:51 +0200)]
Cycles/Compositor: Add arctan2 operation to the Math node

The Math node currently has the normal atan() function, but for
actual angles this is fairly useless without additional nodes to handle the signs.

Since the node has two inputs anyways, it only makes sense to add an arctan2 option.

Reviewers: sergey, brecht

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

2 years ago3D View: remove poll 3D view for copy/paste
Campbell Barton [Thu, 24 May 2018 14:40:33 +0000 (16:40 +0200)]
3D View: remove poll 3D view for copy/paste

These operators only need selected objects.

2 years agoFix T55034: Setting duplication group for multiple selected items only
Philipp Oeser [Mon, 14 May 2018 10:54:23 +0000 (12:54 +0200)]
Fix T55034: Setting duplication group for multiple selected items only
affects one item

UI editing multiple selected items missed the case of PROP_POINTER
properties

Reviewed By: campbellbarton

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

2 years agoFix Extend property of Lasso select tool in Mask editor not working
Philipp Oeser [Sun, 13 May 2018 08:46:00 +0000 (10:46 +0200)]
Fix Extend property of Lasso select tool in Mask editor not working

Reviewed By: campbellbarton

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

2 years agoFix T54336: Extend property of Lasso select tool in Node editor does not
Philipp Oeser [Sun, 13 May 2018 07:37:53 +0000 (09:37 +0200)]
Fix T54336: Extend property of Lasso select tool in Node editor does not
work

Reviewed By: campbellbarton

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

2 years agoFix T55137: Compilation failing on non-x86-64 architectures
Lukas Stockner [Wed, 23 May 2018 23:41:18 +0000 (01:41 +0200)]
Fix T55137: Compilation failing on non-x86-64 architectures

Some conversion helper functions were (most likely by accident) contained
inside an ifdef for SSE2 support, so on e.g. ARM they would be undefined
and therefore cause compilation to fail.

2 years agoCleanup: strip trailing space from interface files
Campbell Barton [Wed, 23 May 2018 08:47:12 +0000 (10:47 +0200)]
Cleanup: strip trailing space from interface files

2 years agoFix incorrect size in aligned lockfree realloc
Campbell Barton [Wed, 23 May 2018 05:24:57 +0000 (07:24 +0200)]
Fix incorrect size in aligned lockfree realloc

Thanks to @alikendarfen for finding.

2 years agoblenderplayer: add stubs
Campbell Barton [Tue, 22 May 2018 15:56:56 +0000 (17:56 +0200)]
blenderplayer: add stubs

2 years agoFix T55093: Bisect + fill crash
Campbell Barton [Tue, 22 May 2018 15:22:29 +0000 (17:22 +0200)]
Fix T55093: Bisect + fill crash

2 years agoMemory allocator: use lockfree calls internally
Campbell Barton [Tue, 22 May 2018 06:45:47 +0000 (08:45 +0200)]
Memory allocator: use lockfree calls internally

Was already used in some areas.

2 years agoCMake: only include licences for enabled libs
Campbell Barton [Mon, 21 May 2018 16:41:59 +0000 (18:41 +0200)]
CMake: only include licences for enabled libs

2 years agoCleanup: use const for transform internal API
Campbell Barton [Mon, 21 May 2018 15:24:14 +0000 (17:24 +0200)]
Cleanup: use const for transform internal API

2 years agoRNA: support for PARM_OUTPUT & PARM_RNAPTR
Campbell Barton [Mon, 21 May 2018 10:34:11 +0000 (12:34 +0200)]
RNA: support for PARM_OUTPUT & PARM_RNAPTR