Campbell Barton [Fri, 26 Jan 2018 01:23:15 +0000 (12:23 +1100)]
Tests: replace os.system w/ subprocess.call
Saves on process creation and avoids
being tripped up by command line parsing.
Based on D2967 by @ldo with edits.
Campbell Barton [Fri, 26 Jan 2018 00:52:01 +0000 (11:52 +1100)]
Docs: invoke_search_popup uses bl_property
Also add code example in docs.
Brecht Van Lommel [Thu, 25 Jan 2018 13:08:56 +0000 (14:08 +0100)]
Cycles: rename displacement methods, default to displace, tweak panel layout.
Differential Revision: https://developer.blender.org/D3019
Brecht Van Lommel [Thu, 25 Jan 2018 13:07:51 +0000 (14:07 +0100)]
Fix T53874: OpenGL render problem with OpenEXR in 2.8 with float buffers.
Dalai Felinto [Thu, 25 Jan 2018 12:10:21 +0000 (10:10 -0200)]
Fix missing broken notifiers
We can't have more than one NOTE_SUBTYPE in the same notifier.
Instead of calling both subtypes the code end up not calling either.
Dalai Felinto [Thu, 25 Jan 2018 11:45:13 +0000 (09:45 -0200)]
Fix T50967: When you move an icon from the outliner area object doesn't show up
We can't have more than one NOTE_SUBTYPE in the same notifier.
This is a partial revert of:
cd4d5dcb468a. In particular to the part concerning
"Also fixed a missing notifier of the object instancing operator".
Not only this was mixed with the original reason for the commit for no reason,
but it actually introduced a bug. Bad, bad developers ;)
Note: Although this commit is not needed for master, blender2.8 requires it for
the forementioned bug report.
Campbell Barton [Thu, 25 Jan 2018 10:49:31 +0000 (21:49 +1100)]
WM: comments on wmTooltipState struct
Campbell Barton [Thu, 25 Jan 2018 10:39:04 +0000 (21:39 +1100)]
WM: NULL check for recent tooltip change
Caused crash dragging boolean buttons.
Bastien Montagne [Thu, 25 Jan 2018 09:11:12 +0000 (10:11 +0100)]
Fix T53363: Blender won't update mesh's usercount when deleting object datablocks in Editmode.
Only do special handling of ob->data pointer in case we are remapping to
a valid (non-NULL) other obdata. Otherwise, handle it as any other
'remapping to NULL' case.
Hopefully not breaking anything else...
Campbell Barton [Thu, 25 Jan 2018 05:17:25 +0000 (16:17 +1100)]
UI: change tool-tips to be stored in the screen
Move timer and tip out of button code,
now the only requests a tooltip,
passing a creation callback to run.
Needed for manipulators in 2.8,
also helps de-duplicate logic - since we never want
multiple tool-tips showing at once.
Campbell Barton [Wed, 24 Jan 2018 23:21:31 +0000 (10:21 +1100)]
Cleanup: correct ATTR_NONNULL use
Brecht Van Lommel [Wed, 24 Jan 2018 14:55:54 +0000 (15:55 +0100)]
Fix T53874: more cases of OpenGL render to OpenEXR not working after recent changes.
Brecht Van Lommel [Wed, 24 Jan 2018 13:25:59 +0000 (14:25 +0100)]
Fix T53593: sculpt brush rake spacing bug after recent bugfix.
Bastien Montagne [Wed, 24 Jan 2018 10:20:46 +0000 (11:20 +0100)]
Cleanup: MOD_wireframe: remove useless isDisabled callback.
Bastien Montagne [Wed, 24 Jan 2018 10:17:53 +0000 (11:17 +0100)]
Fix (unreported) missing feature in ccgdm pbvh generator.
Compared to usual cddm one, ccgdm one was not applying the
ob->derivedDeform deformation to the pbvh generated from the
original mesh geometry, when possible.
Bastien Montagne [Wed, 24 Jan 2018 10:13:49 +0000 (11:13 +0100)]
Fix T53551: Weight paint crash when subsurf modifier is not first (master not 2.79).
We can only support painting from subsurf DM in a limited subset of
cases, others (like multiple subsurf, or topology-modyfying ones,
break mapping to original geometry).
This is not the most ideal fix (ideally, we should always be able to get
a mapping to original geometry from any point in modifiers stack...).
Bastien Montagne [Wed, 24 Jan 2018 10:12:01 +0000 (11:12 +0100)]
BKE's modifier_isEnabled: add check on NULL Scene pointer.
We do not always have that one available, and even without the
isDisabled callback this func is helpful.
Note that this is a bot stupid, only modifier actually needing a valid
Scene pointer here is subsurf... :|
Brecht Van Lommel [Wed, 24 Jan 2018 10:03:03 +0000 (11:03 +0100)]
Fix T53874: OpenGL render to OpenEXR not working after recent changes.
Multilayer EXR also failed already in 2.79 for Sequencer and OpenGL rendering.
Now we revert to single layer OpenEXR in that case.
Brecht Van Lommel [Wed, 24 Jan 2018 09:56:13 +0000 (10:56 +0100)]
Fix T53878: Cycles bug rendering multiple render layers with different passes.
This was caused by recent pass refactoring from
f78e963.
Brecht Van Lommel [Wed, 24 Jan 2018 07:24:21 +0000 (08:24 +0100)]
Fix Cycles GLSL bump not matching final render after recent changes.
Campbell Barton [Wed, 24 Jan 2018 00:29:29 +0000 (11:29 +1100)]
CMake: store icon names
Without this, adding/removing icons wouldn't force cmake to re-run
making builds fail.
This is the same issue with globbing source code.
Campbell Barton [Tue, 23 Jan 2018 09:22:26 +0000 (20:22 +1100)]
Cleanup: some ED_view3d functions used uppercase D
Brecht Van Lommel [Tue, 23 Jan 2018 12:01:02 +0000 (13:01 +0100)]
Fix Cycles assert when resizing rendererd viewport.
Brecht Van Lommel [Sat, 20 Jan 2018 01:01:07 +0000 (02:01 +0100)]
Cycles: change material output displacement to vector.
Previously only scalar displacement along the normal was supported,
now displacement can go in any direction. For backwards compatibility,
a Displacement node will be automatically inserted in existing files.
This will make it possible to support vector displacement maps in the
future. It's already possible to use them to some extent, but requires
a manual shader node setup. For tangent space maps the right tangent
may also not be available yet, depends on the map.
Differential Revision: https://developer.blender.org/D3015
Brecht Van Lommel [Sat, 13 Jan 2018 12:11:03 +0000 (13:11 +0100)]
Cycles: add Displacement node.
This converts object space height to world space displacement, to be
linked to the new vector displacement material output.
Differential Revision: https://developer.blender.org/D3015
Brecht Van Lommel [Tue, 23 Jan 2018 09:44:20 +0000 (10:44 +0100)]
Fix T53854: branched path tracing correlation bug with transparency in split kernel.
Campbell Barton [Tue, 23 Jan 2018 08:48:49 +0000 (19:48 +1100)]
Cleanup: use doxygen groups for view3d_edit.c
Campbell Barton [Tue, 23 Jan 2018 06:36:51 +0000 (17:36 +1100)]
Cleanup: code comment for view3d_viewmatrix_set
Campbell Barton [Tue, 23 Jan 2018 06:25:09 +0000 (17:25 +1100)]
Cleanup: CMake whitespace
Germano [Tue, 23 Jan 2018 01:06:38 +0000 (23:06 -0200)]
Fix screen split refresh issues
`Ctrl` (enable snapping) ans `TAB` (Switching direction) didn't refresh.
Campbell Barton [Tue, 23 Jan 2018 01:13:48 +0000 (12:13 +1100)]
Cleanup: sync w/ blender2.8 branch
Also make some args const
Ray Molenkamp [Mon, 22 Jan 2018 21:52:09 +0000 (14:52 -0700)]
Cycles: Fix optimal BVH selection.
Sergey Sharybin [Fri, 19 Jan 2018 09:59:58 +0000 (10:59 +0100)]
Cycles: Replace use_qbvh boolean flag with an enum-based property
This was we can introduce other types of BVH, for example, wider ones, without
causing too much mess around boolean flags.
Thoughs:
- Ideally device info should probably return bitflag of what BVH types it
supports.
It is possible to implement based on simple logic in device/ and mesh.cpp,
rest of the changes will stay the same.
- Not happy with workarounds in util_debug and duplicated enum in kernel.
Maybe enbum should be stores in kernel, but then it's kind of weird to include
kernel types from utils. Soudns some cyclkic dependency.
Reviewers: brecht, maxim_d33
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3011
Dalai Felinto [Mon, 22 Jan 2018 13:27:58 +0000 (11:27 -0200)]
Fix windows building (log10)
Error: math_base_inline.c(402): error C2668: 'log10' : ambiguous call to
overloaded function
Brecht Van Lommel [Mon, 22 Jan 2018 12:47:53 +0000 (13:47 +0100)]
Fix T53854: branched path tracing correlation bug with transparency.
This was broken in
d750d18.
Sergey Sharybin [Mon, 22 Jan 2018 09:59:14 +0000 (10:59 +0100)]
Cycles: Cleanup, remove unused argument
Campbell Barton [Mon, 22 Jan 2018 09:11:34 +0000 (20:11 +1100)]
Fix T53850: Lock to Cursor breaks 3D manipulators
Campbell Barton [Mon, 22 Jan 2018 03:06:32 +0000 (14:06 +1100)]
WM: add mouse-move after smooth-view
When hot-spots moved under the pointer,
clicking wouldn't activate the correct item.
Campbell Barton [Sun, 21 Jan 2018 22:50:41 +0000 (09:50 +1100)]
Fix manual lookups (data is now lowercase)
Campbell Barton [Sun, 21 Jan 2018 22:45:51 +0000 (09:45 +1100)]
Fix T53843: Error opening online manual
Campbell Barton [Sun, 21 Jan 2018 23:00:23 +0000 (10:00 +1100)]
Cleanup: unused var
Germano [Sun, 21 Jan 2018 20:22:39 +0000 (18:22 -0200)]
Update description of the screen_draw functions
Germano [Sun, 21 Jan 2018 20:18:12 +0000 (18:18 -0200)]
WM: Fix snapping on split area without preview
In addition to removing unnecessary variables and `tag_redraw` whenever the factor changes;
Brecht Van Lommel [Sun, 21 Jan 2018 14:19:34 +0000 (15:19 +0100)]
Fix T49159: missing Cycles tangents for adaptive subdivision.
Campbell Barton [Sun, 21 Jan 2018 08:28:54 +0000 (19:28 +1100)]
Cleanup: BLI_kdopbvh avoid negative array access
It's harder to reason about array access with negative indices.
Campbell Barton [Sun, 21 Jan 2018 00:41:28 +0000 (11:41 +1100)]
Cleanup: style
Brecht Van Lommel [Sat, 20 Jan 2018 00:04:07 +0000 (01:04 +0100)]
Fix old files with changed node socket type not loading correctly.
This would lead to sock.default_value pointing to the wrong data type,
possibly causing crashes. Unfortunately, this bug will still exist for
older Blender versions that try to load newer files, which makes
changing the type of a node socket problematic.
Campbell Barton [Sat, 20 Jan 2018 14:41:58 +0000 (01:41 +1100)]
Cleanup: doxy groups for screen_ops.c
Campbell Barton [Sat, 20 Jan 2018 13:39:06 +0000 (00:39 +1100)]
Fix screen split preview refresh issues
Switching direction didn't refresh, also cursors were flipped.
Dalai Felinto [Fri, 19 Jan 2018 19:04:19 +0000 (17:04 -0200)]
Fixup for integer digits commit
Dalai Felinto [Fri, 19 Jan 2018 18:52:59 +0000 (16:52 -0200)]
Util function to determine number of digits from an integer
Sergey Sharybin [Fri, 19 Jan 2018 14:47:53 +0000 (15:47 +0100)]
Cycles: Make it more proper check on vectorization flags from DebugFlags
Mimics to checks in system_cpu_support() checks.
Dalai Felinto [Fri, 19 Jan 2018 14:44:38 +0000 (12:44 -0200)]
Outliner Python UI cleanup: remove KEYMAPS
This was removed since 2013 (
ef765b360675). It should have been removed back
then from the UI file too.
Sergey Sharybin [Fri, 19 Jan 2018 14:02:23 +0000 (15:02 +0100)]
Cycles: Cleanup, stop using debug flags in system utilities
Debug flags are to be controlling render behavior, nothing to do with low level
system utilities.
it was simple to hack, but logically is wrong. Lets do things where they are
supposed to be done!
Sergey Sharybin [Fri, 19 Jan 2018 14:21:34 +0000 (15:21 +0100)]
Cycles: Remove util_debug include from kernel code
Not sure why it was in there, all the debug flags stuff is to be handled outside
of kernel.
Sergey Sharybin [Fri, 19 Jan 2018 13:55:53 +0000 (14:55 +0100)]
Cycles: Remove unneeded include statements
Also try to move them from headers to implementation files as much as possible.
Brecht Van Lommel [Thu, 18 Jan 2018 20:06:35 +0000 (21:06 +0100)]
Fix T53830: Cycles OpenCL debug assert on macOS,
This was probably harmless besides some unnecessary memory usage due to
aligning allocations too much.
Campbell Barton [Fri, 19 Jan 2018 10:39:18 +0000 (21:39 +1100)]
Cleanup: reaname LINKLIST_FOREACH -> LISTBASE
LinkList's are a different API, no need to confuse things.
Campbell Barton [Fri, 19 Jan 2018 10:09:16 +0000 (21:09 +1100)]
Fix T53786: Proportional size from redo ignored
Changing PET size while transforming stores the size in the
tool settings, but changing in the redo panel didn't.
Campbell Barton [Fri, 19 Jan 2018 10:07:43 +0000 (21:07 +1100)]
WM: operator flag to check repeat/redo execution
Campbell Barton [Fri, 19 Jan 2018 06:55:51 +0000 (17:55 +1100)]
Cleanup: sync w/ blender2.8 branch
Split screen_draw.c from screen_edit.c (avoid conflicts syncing).
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).
Campbell Barton [Fri, 19 Jan 2018 04:34:54 +0000 (15:34 +1100)]
Cleanup: typos
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...)
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.
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.
Campbell Barton [Thu, 18 Jan 2018 09:54:49 +0000 (20:54 +1100)]
Fix memory leak in recent curve refactor
5b25605761fb7
Sybren A. Stüvel [Thu, 18 Jan 2018 08:58:14 +0000 (09:58 +0100)]
Improved docstring of mathutils.Matrix.lerp()
Sybren A. Stüvel [Thu, 18 Jan 2018 08:37:54 +0000 (09:37 +0100)]
Improve docstring for mathutils.Matrix.decompose()
Campbell Barton [Thu, 18 Jan 2018 03:49:09 +0000 (14:49 +1100)]
Fix T53808: VSE doesn't show scene strip markers
Campbell Barton [Thu, 18 Jan 2018 03:02:26 +0000 (14:02 +1100)]
Fix weight particle brush versioning
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
Campbell Barton [Thu, 18 Jan 2018 01:36:25 +0000 (12:36 +1100)]
Fix T53811: "bmesh.ops.split" crash
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.
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
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
Brecht Van Lommel [Wed, 17 Jan 2018 20:11:59 +0000 (21:11 +0100)]
Fix Linux/GCC compiler warning in recent fixes.
Campbell Barton [Wed, 17 Jan 2018 23:52:51 +0000 (10:52 +1100)]
Loop Cut: Allow mouse placement w/ numeric input
D2973 by @cyaoeu
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
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
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
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.
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!
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.
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.
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'.
Campbell Barton [Wed, 17 Jan 2018 08:17:49 +0000 (19:17 +1100)]
Correct simple deform versioning from D2989
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.
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.
Sergey Sharybin [Tue, 16 Jan 2018 15:38:39 +0000 (16:38 +0100)]
Cleanup: Naming of depsgraph
Sybren A. Stüvel [Tue, 16 Jan 2018 15:28:10 +0000 (16:28 +0100)]
Alembic: don't explicitly pass NULL
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.
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
Sergey Sharybin [Tue, 16 Jan 2018 13:31:52 +0000 (14:31 +0100)]
Sculpting: Fix for "Hide Mask" does not work with multires
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
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.
Sergey Sharybin [Tue, 16 Jan 2018 10:43:05 +0000 (11:43 +0100)]
Depsgraph: Better relations name
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
Sergey Sharybin [Tue, 16 Jan 2018 10:40:02 +0000 (11:40 +0100)]
Depsgraph: Cleanup, indentation
Sergey Sharybin [Tue, 16 Jan 2018 10:38:44 +0000 (11:38 +0100)]
Depsgraph: Cleanup, brace placement\