blender-staging.git
22 months agoWM: window draw callbacks and split preview snap
mano-wii [Fri, 19 Jan 2018 06:14:27 +0000 (17:14 +1100)]
WM: window draw callbacks and split preview snap

This moves window overlay from hard coded flags into drawing callbacks.

It also supports snapping (holding Ctrl).

22 months agoCleanup: typos
Campbell Barton [Fri, 19 Jan 2018 04:34:54 +0000 (15:34 +1100)]
Cleanup: typos

22 months agoFix T53833: Particle Info node and Displacement Crash
Mai Lavelle [Fri, 19 Jan 2018 03:40:48 +0000 (22:40 -0500)]
Fix T53833: Particle Info node and Displacement Crash

The displacement shared was running before particle data was copied to the
device causing bad memory access when the particle info node was used. Fix
is simply to move particle update before mesh update so the data is
available to displacement shaders.

(Altho this fixes the crash the particle info node is still mostly useless
with displacement for now...)

22 months agoFix T53823: Particle weight brush crash
Campbell Barton [Fri, 19 Jan 2018 01:25:09 +0000 (12:25 +1100)]
Fix T53823: Particle weight brush crash

Entering particle edit mode w/ the weight brush enabled crashed
on non-hair particle systems.

22 months agoFix T53832: Particle weight paint crash
Campbell Barton [Fri, 19 Jan 2018 01:07:14 +0000 (12:07 +1100)]
Fix T53832: Particle weight paint crash

Drawing hair weights read before the hair array start.
This code could be improved since it currently copy-pastes,
from do_particle_interpolation, but this would need larger changes.

For now just correct existing logic.

22 months agoFix memory leak in recent curve refactor
Campbell Barton [Thu, 18 Jan 2018 09:54:49 +0000 (20:54 +1100)]
Fix memory leak in recent curve refactor

5b25605761fb7

22 months agoImproved docstring of mathutils.Matrix.lerp()
Sybren A. Stüvel [Thu, 18 Jan 2018 08:58:14 +0000 (09:58 +0100)]
Improved docstring of mathutils.Matrix.lerp()

22 months agoImprove docstring for mathutils.Matrix.decompose()
Sybren A. Stüvel [Thu, 18 Jan 2018 08:37:54 +0000 (09:37 +0100)]
Improve docstring for mathutils.Matrix.decompose()

22 months agoFix T53808: VSE doesn't show scene strip markers
Campbell Barton [Thu, 18 Jan 2018 03:49:09 +0000 (14:49 +1100)]
Fix T53808: VSE doesn't show scene strip markers

22 months agoFix weight particle brush versioning
Campbell Barton [Thu, 18 Jan 2018 03:02:26 +0000 (14:02 +1100)]
Fix weight particle brush versioning

22 months agoCleanup: label scene flags more clearly
Campbell Barton [Thu, 18 Jan 2018 02:50:52 +0000 (13:50 +1100)]
Cleanup: label scene flags more clearly

Also correct typo in enum name

22 months agoFix T53811: "bmesh.ops.split" crash
Campbell Barton [Thu, 18 Jan 2018 01:36:25 +0000 (12:36 +1100)]
Fix T53811: "bmesh.ops.split" crash

22 months agoWM: improved area resize snapping
mano-wii [Thu, 18 Jan 2018 00:22:58 +0000 (11:22 +1100)]
WM: improved area resize snapping

Instead of 10px steps, snap to mid-point & adjacent edges.

Not yet implemented for split preview.

22 months agoFix buffer overflow vulnerability in curve, font, particles code.
Brecht Van Lommel [Mon, 15 Jan 2018 05:57:26 +0000 (06:57 +0100)]
Fix buffer overflow vulnerability in curve, font, particles code.

Solves these security issues from T52924:
CVE-2017-12102
CVE-2017-12103
CVE-2017-12104

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

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

22 months agoFix buffer overflow vulnerabilities in mesh code.
Brecht Van Lommel [Sun, 14 Jan 2018 21:14:20 +0000 (22:14 +0100)]
Fix buffer overflow vulnerabilities in mesh code.

Solves these security issues from T52924:
CVE-2017-12081
CVE-2017-12082
CVE-2017-12086
CVE-2017-12099
CVE-2017-12100
CVE-2017-12101
CVE-2017-12105

While the specific overflow issue may be fixed, loading the repro .blend
files may still crash because they are incomplete and corrupt. The way
they crash may be impossible to exploit, but this is difficult to prove.

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

22 months agoFix Linux/GCC compiler warning in recent fixes.
Brecht Van Lommel [Wed, 17 Jan 2018 20:11:59 +0000 (21:11 +0100)]
Fix Linux/GCC compiler warning in recent fixes.

22 months agoLoop Cut: Allow mouse placement w/ numeric input
Campbell Barton [Wed, 17 Jan 2018 23:52:51 +0000 (10:52 +1100)]
Loop Cut: Allow mouse placement w/ numeric input

D2973 by @cyaoeu

22 months agoFix buffer overflow vulernability in thumbnail file reading.
Brecht Van Lommel [Sun, 14 Jan 2018 22:26:31 +0000 (23:26 +0100)]
Fix buffer overflow vulernability in thumbnail file reading.

Fixes CVE-2017-2908 from T52924.

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

22 months agoFix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.
Brecht Van Lommel [Sun, 14 Jan 2018 13:19:57 +0000 (14:19 +0100)]
Fix buffer overflows in TIFF, PNG, IRIS, DPX, HDR and AVI loading.

Solves these security issues from T52924:
CVE-2017-2899
CVE-2017-2900
CVE-2017-2901
CVE-2017-2902
CVE-2017-2903
CVE-2017-2904
CVE-2017-2905
CVE-2017-2906
CVE-2017-2907
CVE-2017-2918

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

22 months agoMemory: add MEM_malloc_arrayN() function to protect against overflow.
Brecht Van Lommel [Sun, 14 Jan 2018 20:53:32 +0000 (21:53 +0100)]
Memory: add MEM_malloc_arrayN() function to protect against overflow.

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

22 months agoDepsgraph: Fix for fake dependency cycle being created for shape key drivers
Sergey Sharybin [Wed, 17 Jan 2018 17:00:54 +0000 (18:00 +0100)]
Depsgraph: Fix for fake dependency cycle being created for shape key drivers

One thing i'm not fully happy with is all this is_same_* functions. Need to
get rid of this by probably adding explicit entry/init/whatever nodes and
maybe making node criteria aware of whether key will be used as "from" or
as "to" node.

22 months agoDelete Invalid Drivers: more lenient poll function
Sybren A. Stüvel [Wed, 17 Jan 2018 16:14:31 +0000 (17:14 +0100)]
Delete Invalid Drivers: more lenient poll function

This function is faster and also allows for deletion of invalid drivers in
nested data blocks (for example in shape keys). Thanks @sergey!

22 months agoexternal_libs: Add openjpeg to the mavc lib folders for cycles standalone.
Ray Molenkamp [Wed, 17 Jan 2018 14:45:05 +0000 (07:45 -0700)]
external_libs: Add openjpeg to the mavc lib folders for cycles standalone.

22 months agoSimplified GRAPH_OT_driver_delete_invalid after feedback @aligorith
Sybren A. Stüvel [Wed, 17 Jan 2018 11:38:14 +0000 (12:38 +0100)]
Simplified GRAPH_OT_driver_delete_invalid after feedback @aligorith

By adding the ANIMFILTER_NODUPLIS flag to the filter it'll only be
processing each F-Curve once, which means we can remove while iterating.

This also solves a potential issue when a datablock has a driver and is
shared among multiple objects.

22 months agoAdded "Delete Invalid Drivers" operator
Sybren A. Stüvel [Wed, 17 Jan 2018 11:12:37 +0000 (12:12 +0100)]
Added "Delete Invalid Drivers" operator

This operator is available in the graph editor in the Drivers mode, and
allows quick cleanup of drivers marked as 'invalid'.

22 months agoCorrect simple deform versioning from D2989
Campbell Barton [Wed, 17 Jan 2018 08:17:49 +0000 (19:17 +1100)]
Correct simple deform versioning from D2989

22 months agoFix T53810: Crash removing a scene used in render
Campbell Barton [Tue, 16 Jan 2018 23:00:14 +0000 (10:00 +1100)]
Fix T53810: Crash removing a scene used in render

Header drawing accesses the scene too.

22 months agoCleanup: Avoid ifdefs in multiple places
Sergey Sharybin [Tue, 16 Jan 2018 16:14:57 +0000 (17:14 +0100)]
Cleanup: Avoid ifdefs in multiple places

Define a helper macro. Makes code read easier.

22 months agoCleanup: Naming of depsgraph
Sergey Sharybin [Tue, 16 Jan 2018 15:38:39 +0000 (16:38 +0100)]
Cleanup: Naming of depsgraph

22 months agoAlembic: don't explicitly pass NULL
Sybren A. Stüvel [Tue, 16 Jan 2018 15:28:10 +0000 (16:28 +0100)]
Alembic: don't explicitly pass NULL

22 months agoT53711: Alembic don´t import vertex colors correctly
Sybren A. Stüvel [Tue, 16 Jan 2018 14:05:31 +0000 (15:05 +0100)]
T53711: Alembic don´t import vertex colors correctly

An index stored in Alembic wasn't used. Often this index is a no-op
(i.e. index[n] = n), in which case the result was fine. However, when it
isn't, it caused issues.

22 months agoSculpting: Fix uninitialized color being left for smooth meshes with hidden mask
Sergey Sharybin [Tue, 16 Jan 2018 13:46:48 +0000 (14:46 +0100)]
Sculpting: Fix uninitialized color being left for smooth meshes with hidden mask

22 months agoSculpting: Fix for "Hide Mask" does not work with multires
Sergey Sharybin [Tue, 16 Jan 2018 13:31:52 +0000 (14:31 +0100)]
Sculpting: Fix for "Hide Mask" does not work with multires

22 months agoFix missing node tree updates when unconnected node affects output via driver
Sergey Sharybin [Tue, 16 Jan 2018 11:06:22 +0000 (12:06 +0100)]
Fix missing node tree updates when unconnected node affects output via driver

Fixes T53794: Can't control color ramp node color values with drivers

22 months agoDepsgraph: Fix fake cyclic dependencies for node tree drivers
Sergey Sharybin [Tue, 16 Jan 2018 10:53:34 +0000 (11:53 +0100)]
Depsgraph: Fix fake cyclic dependencies for node tree drivers

There was a fake cyclic dependency happening when node of node tree is driving
another node of the same tree.

This is related to T53794, but more fixes is needed here.

22 months agoDepsgraph: Better relations name
Sergey Sharybin [Tue, 16 Jan 2018 10:43:05 +0000 (11:43 +0100)]
Depsgraph: Better relations name

22 months agoDepsgraph: Check for ID match when checking if operations corresponds to the same...
Sergey Sharybin [Tue, 16 Jan 2018 10:41:50 +0000 (11:41 +0100)]
Depsgraph: Check for ID match when checking if operations corresponds to the same bone

22 months agoDepsgraph: Cleanup, indentation
Sergey Sharybin [Tue, 16 Jan 2018 10:40:02 +0000 (11:40 +0100)]
Depsgraph: Cleanup, indentation

22 months agoDepsgraph: Cleanup, brace placement\
Sergey Sharybin [Tue, 16 Jan 2018 10:38:44 +0000 (11:38 +0100)]
Depsgraph: Cleanup, brace placement\

22 months agoreadfile: ensure blend header follows the spec
Campbell Barton [Tue, 16 Jan 2018 09:00:13 +0000 (20:00 +1100)]
readfile: ensure blend header follows the spec

22 months agoCleanup: indentation
Campbell Barton [Tue, 16 Jan 2018 00:40:43 +0000 (11:40 +1100)]
Cleanup: indentation

22 months agoUI: support canceling color ramp drag
Campbell Barton [Tue, 16 Jan 2018 00:14:54 +0000 (11:14 +1100)]
UI: support canceling color ramp drag

D2997 by @oktomus

22 months agoAllow for multi-gigapixel renders
Karl Semich [Mon, 15 Jan 2018 11:53:17 +0000 (12:53 +0100)]
Allow for multi-gigapixel renders

This patch fixes a 32-bit overflow that occurs on 64-bit systems due to a numeric literal being treated as 32-bit.

This patch allows for the generation of images that occupy more than 4GB of RAM, which previously caused a crash.

Reviewers: sergey

Reviewed By: sergey

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

22 months agoCycles: CLeanup, remove unused function argument
Sergey Sharybin [Mon, 15 Jan 2018 10:45:16 +0000 (11:45 +0100)]
Cycles: CLeanup, remove unused function argument

22 months agoSculpting: Sdd an option to hide mask in viewport
Sergey Sharybin [Mon, 15 Jan 2018 10:38:56 +0000 (11:38 +0100)]
Sculpting: Sdd an option to hide mask in viewport

Brushes themselves are still affected by the mask, but the viewport is not
showing the mask. This way it's easier to see details while sculpting.

Studio request by Julien Kaspar

22 months agoGPU buffers: Use bitflag to whether we want to show diffuse color
Sergey Sharybin [Fri, 12 Jan 2018 16:35:26 +0000 (17:35 +0100)]
GPU buffers: Use bitflag to whether we want to show diffuse color

Those fine-tuning bits will be extended soon, so makes sense to start using
some more verbose flag names when calling functions.

22 months agoRNA: Add RNA_property_string_set_bytes
Campbell Barton [Mon, 15 Jan 2018 04:49:16 +0000 (15:49 +1100)]
RNA: Add RNA_property_string_set_bytes

This is needed to set values that contain zero bytes
(where the length isn't fixed).

22 months agoCleanup: BLI_ghash
Campbell Barton [Sun, 14 Jan 2018 06:15:02 +0000 (17:15 +1100)]
Cleanup: BLI_ghash

Improve hashsizes comment too.

22 months agoFix T53772: Presets don't support colons
Campbell Barton [Sun, 14 Jan 2018 03:31:39 +0000 (14:31 +1100)]
Fix T53772: Presets don't support colons

22 months agoFix T53771: missing view pixels when rendering multiview + FSAA.
Brecht Van Lommel [Fri, 12 Jan 2018 22:47:24 +0000 (23:47 +0100)]
Fix T53771: missing view pixels when rendering multiview + FSAA.

This never worked, it's not due to recent refactoring.

22 months agoCycles: adaptive subdivision support for panoramic cameras.
Mai Lavelle [Fri, 12 Jan 2018 01:14:27 +0000 (02:14 +0100)]
Cycles: adaptive subdivision support for panoramic cameras.

Adds the code to get screen size of a point in world space, which is
used for subdividing geometry to the correct level. The approximate
method of treating the point as if it were directly in front of the
camera is used, as panoramic projections can become very distorted
near the edges of an image. This should be fine for most uses.

There is also no support yet for offscreen dicing scale, though
panorama cameras are often used for rendering 360° renders anyway.

Fixes T49254.

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

22 months agoCode refactor: adjust camera update for easier code sharing with kernel.
Brecht Van Lommel [Fri, 12 Jan 2018 19:22:55 +0000 (20:22 +0100)]
Code refactor: adjust camera update for easier code sharing with kernel.

22 months agoCode cleanup: remove test code to disable motion blur, no longer useful.
Brecht Van Lommel [Fri, 12 Jan 2018 18:56:52 +0000 (19:56 +0100)]
Code cleanup: remove test code to disable motion blur, no longer useful.

22 months agoFix bmesh.utils.face_join arg parsing
Campbell Barton [Fri, 12 Jan 2018 03:51:15 +0000 (14:51 +1100)]
Fix bmesh.utils.face_join arg parsing

22 months agoUser Prefs: app-template option to hide the cursor
Campbell Barton [Fri, 12 Jan 2018 01:41:03 +0000 (12:41 +1100)]
User Prefs: app-template option to hide the cursor

22 months agoUser Prefs: add new flag for app-template options
Campbell Barton [Fri, 12 Jan 2018 01:30:58 +0000 (12:30 +1100)]
User Prefs: add new flag for app-template options

For experimental options, outside the scope of typical preferences.

While templates are developed we might want to make changes
to behavior which aren't fully compatible with typical work-flows.

Instead of mixing these options in with current preferences
expose separately (we could even force disable them when templates
aren't int use)

22 months agoCycles: option to make background visible through glass transparent.
Lukas Stockner [Thu, 11 Jan 2018 19:03:31 +0000 (20:03 +0100)]
Cycles: option to make background visible through glass transparent.

This can be enabled in the Film panel, with an option to control the
transmisison roughness below which glass becomes transparent.

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

22 months agoCycles: add offscreen dicing scale and dicing camera.
Mai Lavelle [Thu, 11 Jan 2018 23:50:34 +0000 (00:50 +0100)]
Cycles: add offscreen dicing scale and dicing camera.

The offscreen dicing scale helps to significantly reduce memory usage,
by reducing the dicing rate for objects the further they are outside of
the camera view.

The dicing camera can be specified now, to keep the geometry fixed and
avoid crawling artifacts in animation. It is also useful for debugging,
to see the tesselation from a different camera location.

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

22 months agoFix Cycles bevel normal baking having some random incorrect pixels.
Brecht Van Lommel [Thu, 11 Jan 2018 21:25:40 +0000 (22:25 +0100)]
Fix Cycles bevel normal baking having some random incorrect pixels.

The bevel and SSS code could result in NaNs in some cases, tweak the
formulas so this can't happen.

22 months agoBuild: auto detection of libraries built by "make deps" on Linux.
Brecht Van Lommel [Mon, 31 Jul 2017 17:04:18 +0000 (19:04 +0200)]
Build: auto detection of libraries built by "make deps" on Linux.

Use the libraries if they exist in ../lib/linux_x86_64 or similar, so
that you can run "make deps && make full" to get a full static build.
Note that install_deps.sh is still the only officially supported way to
build Blender dependencies on Linux, but this may be useful to some.

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

22 months agoCleanup commented out OMP command.
Bastien Montagne [Thu, 11 Jan 2018 19:17:29 +0000 (20:17 +0100)]
Cleanup commented out OMP command.

22 months agoNuke OMP from multires.c: forgot that one in previous commit.
Bastien Montagne [Thu, 11 Jan 2018 19:14:16 +0000 (20:14 +0100)]
Nuke OMP from multires.c: forgot that one in previous commit.

Gives same kind of speedup too, 8.7ms with old OMP code, 2.7ms with new
one, with same level-4 multires monkey head.

22 months agoNuke OMP usage in multires.c.
Bastien Montagne [Thu, 11 Jan 2018 18:39:24 +0000 (19:39 +0100)]
Nuke OMP usage in multires.c.

New code is over three times quicker than old one here (e.g. Suzanne
subdiv level 4, 250k tris, threaded part is now 1.4ms instead of 4.5ms
with OMP).

22 months agoPreparation step for nuking OMP from multires code.
Bastien Montagne [Thu, 11 Jan 2018 16:56:18 +0000 (17:56 +0100)]
Preparation step for nuking OMP from multires code.

Remove the critical OMP sections used to protect mem allocation.

First one can be done in a separate loop before main, parallelized one.

Second one only affect 'private' data, so we only need to ensure
guardedalloc thread safety is enabled.

This is committed as separated step to ease troubleshooting in case
bisecting becomes necesary.

22 months agoCleanup typo in comment.
Bastien Montagne [Thu, 11 Jan 2018 16:55:58 +0000 (17:55 +0100)]
Cleanup typo in comment.

22 months agoSubsurf: Allow partial threading over geometry arrays
Sergey Sharybin [Thu, 11 Jan 2018 14:06:56 +0000 (15:06 +0100)]
Subsurf: Allow partial threading over geometry arrays

This helps avoiding threading overhead when having lots of system threads..

22 months agoMesh evaluate: Tweak threadability criteria
Sergey Sharybin [Thu, 11 Jan 2018 14:04:13 +0000 (15:04 +0100)]
Mesh evaluate: Tweak threadability criteria

Gives measurable speedup on layout scenes from Spring.

Actual value for chunk size is a subject for more scientific research.

22 months agoMesh deform: Tweak threadability criteria
Sergey Sharybin [Thu, 11 Jan 2018 13:51:30 +0000 (14:51 +0100)]
Mesh deform: Tweak threadability criteria

Allow threading using subset of all available threads. Makes it faster to
evaluate lower resolution mesh but with complex deform groups and such.

22 months agoSubsurf: Make copyFinalLoopArray() threaded
Sergey Sharybin [Thu, 11 Jan 2018 13:49:32 +0000 (14:49 +0100)]
Subsurf: Make copyFinalLoopArray() threaded

Gives about 40% speedup of object which has simple-ish deformation applied
on top of subdivided mesh.

This might easily happen with single character animation.

22 months agoDepsgraph: Make eval initialization more friendly for threading
Sergey Sharybin [Thu, 11 Jan 2018 13:47:12 +0000 (14:47 +0100)]
Depsgraph: Make eval initialization more friendly for threading

Helps in cases of not very complex scenes and lots of system threads available.

A bit hard to measure change on it's own, it works best with the upcoming
changes and gives measurable improvements.

22 months agoSubsurf: Use regular mutex instead of RW one
Sergey Sharybin [Thu, 11 Jan 2018 13:32:56 +0000 (14:32 +0100)]
Subsurf: Use regular mutex instead of RW one

Mutex is now local to particular CCGDM, and guarding edge hash which is only
used by a single function only. There is no need to acquire read lock after
edge hash was created.

22 months agoFix critical issue with our DNA ID tags (two totally different tags having same value).
Bastien Montagne [Thu, 11 Jan 2018 13:26:44 +0000 (14:26 +0100)]
Fix critical issue with our DNA ID tags (two totally different tags having same value).

Nice typo from rBc4046e9082f6, tssk. ;)

22 months agoFix T53311: transform edge/normal orientation
Campbell Barton [Thu, 11 Jan 2018 08:09:45 +0000 (19:09 +1100)]
Fix T53311: transform edge/normal orientation

When the edge is aligned with it's own normals,
transform orientation wasn't aligned with the edge.

22 months agoFix T53755: Cycles OpenCL lamp shaders have incorrect normal.
Brecht Van Lommel [Thu, 11 Jan 2018 07:42:57 +0000 (08:42 +0100)]
Fix T53755: Cycles OpenCL lamp shaders have incorrect normal.

22 months agoUI: option not to show screen splitting widgets
Campbell Barton [Thu, 11 Jan 2018 05:08:55 +0000 (16:08 +1100)]
UI: option not to show screen splitting widgets

Request for simplified Blender template,
this may be extended to limit access to other UI changes
that could be pressed by accident.

22 months agoUI: don't draw outline when it's not calculated
Campbell Barton [Thu, 11 Jan 2018 02:20:08 +0000 (13:20 +1100)]
UI: don't draw outline when it's not calculated

Outline drawing was running even when there were no verts to draw.
Causes an assert in 2.8.

22 months agoCycles: support animated object scale in motion blur.
Stefan Werner [Sat, 2 Dec 2017 02:28:13 +0000 (03:28 +0100)]
Cycles: support animated object scale in motion blur.

This was disabled previously due to CUDA compiler bugs, see T32900.

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

22 months agoFix T53455: Object disappear w/ TrackTo constraint
Campbell Barton [Wed, 10 Jan 2018 23:57:30 +0000 (10:57 +1100)]
Fix T53455: Object disappear w/ TrackTo constraint

Regression caused by own commit 16fbb47c886,
this is really an edge case though since calling normalize twice fixes.

22 months agoFix T53752: Draw curve fails w/ stylus
Philipp Oeser [Wed, 10 Jan 2018 23:22:08 +0000 (10:22 +1100)]
Fix T53752: Draw curve fails w/ stylus

22 months agoFix Windows compiler warning using WITH_CYCLES_NATIVE_ONLY.
Brecht Van Lommel [Tue, 9 Jan 2018 21:50:48 +0000 (22:50 +0100)]
Fix Windows compiler warning using WITH_CYCLES_NATIVE_ONLY.

22 months agoFix issue with moving CUDA memory to host and multiple devices.
Brecht Van Lommel [Tue, 9 Jan 2018 17:37:46 +0000 (18:37 +0100)]
Fix issue with moving CUDA memory to host and multiple devices.

This is not expected to fix all issues. Also adds some more details
to error reporting to investigate failures.

22 months agoFix T53692: OpenCL multi GPU rendering not using all GPUs.
Brecht Van Lommel [Thu, 4 Jan 2018 22:29:06 +0000 (23:29 +0100)]
Fix T53692: OpenCL multi GPU rendering not using all GPUs.

Ensure each OpenCL device has a unique ID even if the hardware ID is not
unique for some reason.

22 months agoCleanup: BKE naming conventions for datablock add/localize
Campbell Barton [Wed, 10 Jan 2018 22:55:41 +0000 (09:55 +1100)]
Cleanup: BKE naming conventions for datablock add/localize

Conventions were already followed nearly everywhere.

22 months agoSubsurf: Loop array should not be called mv
Sergey Sharybin [Wed, 10 Jan 2018 13:58:49 +0000 (14:58 +0100)]
Subsurf: Loop array should not be called mv

mv is a mesh vertex, not loop.

22 months agoSubsurf: Remove increment of unused variable
Sergey Sharybin [Wed, 10 Jan 2018 13:58:09 +0000 (14:58 +0100)]
Subsurf: Remove increment of unused variable

22 months agoFix wrong data type used for undo memory limit
Sergey Sharybin [Wed, 10 Jan 2018 12:20:36 +0000 (13:20 +0100)]
Fix wrong data type used for undo memory limit

22 months agoTask scheduler: Use const qualifier in callbacks for parallel range
Sergey Sharybin [Wed, 10 Jan 2018 11:53:59 +0000 (12:53 +0100)]
Task scheduler: Use const qualifier in callbacks for parallel range

22 months agoTask scheduler: Use restrict pointer qualifier
Sergey Sharybin [Wed, 10 Jan 2018 11:49:51 +0000 (12:49 +0100)]
Task scheduler: Use restrict pointer qualifier

Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.

22 months agoTask scheduler: Use more const qualifiers
Sergey Sharybin [Wed, 10 Jan 2018 11:27:43 +0000 (12:27 +0100)]
Task scheduler: Use more const qualifiers

22 months agoRNA: Increase memory limit settings to their possible max on platform
Sergey Sharybin [Thu, 21 Dec 2017 10:07:59 +0000 (11:07 +0100)]
RNA: Increase memory limit settings to their possible max on platform

This is quite common to have 64GB memory now, and even 128. There is no reason
to add any artificial caps on the cache and undo memory here. We can not protect
against using too much memory in one cases and allow use of full computer
potential in others.

Now 32 bit will use 2GB max (as it used to be), but 64bit will use whatever
number of megabytes fits into integer.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

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

22 months agomath utils: Add size_t version of min and max functions
Sergey Sharybin [Thu, 21 Dec 2017 09:39:15 +0000 (10:39 +0100)]
math utils: Add size_t version of min and max functions

22 months agoCleanup: comment block alignment
Campbell Barton [Wed, 10 Jan 2018 08:57:02 +0000 (19:57 +1100)]
Cleanup: comment block alignment

22 months agoAlternate fix for brush user count
Campbell Barton [Wed, 10 Jan 2018 08:34:34 +0000 (19:34 +1100)]
Alternate fix for brush user count

This reverts change to BKE_brush_add,
callers now remove the extra user.

Note this isn't very convenient for callers but
is consistent with other ID types.

In the future we will probably remove this and have new
ID's created with zero users.

22 months agoCorrection to brush user commit
Campbell Barton [Wed, 10 Jan 2018 07:31:54 +0000 (18:31 +1100)]
Correction to brush user commit

RNA API was compensating for the extra user.

22 months agoFix background_job template
Campbell Barton [Wed, 10 Jan 2018 06:49:20 +0000 (17:49 +1100)]
Fix background_job template

Update attribute and use empty file operator

22 months agoFix brush user count
Campbell Barton [Wed, 10 Jan 2018 06:45:34 +0000 (17:45 +1100)]
Fix brush user count

New brushes had 2 users on adding.
Caused assert removing them after.

22 months agoCorrect typos
Campbell Barton [Wed, 10 Jan 2018 01:43:29 +0000 (12:43 +1100)]
Correct typos

22 months agoFix T53491: Absolute tablet motion detection fails
Campbell Barton [Wed, 10 Jan 2018 01:25:20 +0000 (12:25 +1100)]
Fix T53491: Absolute tablet motion detection fails

When using a tablet, detecting absolute motion only worked
when activating a tool with the tablet.

Pressing Enter to run a tool for e.g. would use relative motion.

Now store is_motion_absolute in the event,
set for new events based on the most recent motion events.

22 months agofix t53701 minimal changes to get it working right
bjornmose [Wed, 10 Jan 2018 00:51:04 +0000 (01:51 +0100)]
fix t53701 minimal changes to get it working right

22 months agoFix (unreported) potential crash.
Bastien Montagne [Tue, 9 Jan 2018 18:51:50 +0000 (19:51 +0100)]
Fix (unreported) potential crash.

RNA_pointer_as_string could return NULL instead of a valid string in some cases.