blender.git
4 months agoMerge branch 'blender2.7'
Sergey Sharybin [Fri, 22 Feb 2019 14:50:36 +0000 (15:50 +0100)]
Merge branch 'blender2.7'

4 months agoAlways show version when running in background mode
Sergey Sharybin [Fri, 22 Feb 2019 14:47:54 +0000 (15:47 +0100)]
Always show version when running in background mode

The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.

4 months agoFix T61600: Physics properties inactive when appending objects
Dalai Felinto [Tue, 19 Feb 2019 22:33:31 +0000 (19:33 -0300)]
Fix T61600: Physics properties inactive when appending objects

This problem existed in 2.79 as well. The rigid body setting is related
to the scene the object was created.

We now clear all the rigid body properties of the appended objects to
prevent them from lingering in this state where they have settings yet
cannot be used in the simulation.

Reviewers: mont29, brecht

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

4 months agoMultires: Don't force smooth shading
Sergey Sharybin [Fri, 22 Feb 2019 13:45:32 +0000 (14:45 +0100)]
Multires: Don't force smooth shading

There is still work needed to be done from multires side to fully
support smooth shading. So can't just always have smooth shading.

Roll back to a proper code in GPU side, the rest will be handled
from CCG side.

4 months agoMultires: Fix ownership problem causing crashes
Sergey Sharybin [Fri, 22 Feb 2019 12:33:16 +0000 (13:33 +0100)]
Multires: Fix ownership problem causing crashes

Fixes crash when leaving multires mode.

Fixes T61836: Saving while in multires makes blender crash

4 months agoRevert "makesrna: Fix build error on windows."
Campbell Barton [Fri, 22 Feb 2019 08:43:21 +0000 (19:43 +1100)]
Revert "makesrna: Fix build error on windows."

This reverts commit 8b235dd2e3995a61e2a7db1ac2bc9eefe1394456.

4 months agoC logging: make pthread use optional
Campbell Barton [Fri, 22 Feb 2019 08:36:36 +0000 (19:36 +1100)]
C logging: make pthread use optional

There is no need for threading for makesrna/makesdna,
disable it to avoid hassles linking build time utilities.

4 months agoCleanup: function wrapping, spelling
Campbell Barton [Fri, 22 Feb 2019 07:35:07 +0000 (18:35 +1100)]
Cleanup: function wrapping, spelling

4 months agoComments: add doxy sections to readfile.c
Campbell Barton [Fri, 22 Feb 2019 07:15:56 +0000 (18:15 +1100)]
Comments: add doxy sections to readfile.c

Some minor changes to arrange code into useful sections too.

4 months agoreadfile: support blend files over 2gb
Campbell Barton [Fri, 22 Feb 2019 05:56:22 +0000 (16:56 +1100)]
readfile: support blend files over 2gb

Should work for 4gb+ files too however I wasn't able to test that.

4 months agoreadfile: reduce memory usage at load time
Campbell Barton [Fri, 22 Feb 2019 03:42:22 +0000 (14:42 +1100)]
readfile: reduce memory usage at load time

Delay loading all DATA sections of the blend file until they're needed.

Loading all data-blocks caused high peak memory usage especially with
libraries - since a lot of data may exist which isn't used directly.

In one test (spring project: 10_010_A.anim.blend),
peaked at ~12.5gig, dropping back to ~2.5gig once loaded.
With this change peaks memory usage reaches ~2.7gig while loading.

Besides this there are some minor gains from not having to read data
from the file-system and we can skip an alloc + memcpy reading data
written with the same version of Blender.

4 months agoCleanup: rename seek to file_offset
Campbell Barton [Fri, 22 Feb 2019 03:04:05 +0000 (14:04 +1100)]
Cleanup: rename seek to file_offset

Prepare for seek callback to be added.

4 months agoSculpt Overlay: Fix mask drawn as flat shaded when smooth shading enabled
Clément Foucault [Fri, 22 Feb 2019 03:03:22 +0000 (04:03 +0100)]
Sculpt Overlay: Fix mask drawn as flat shaded when smooth shading enabled

Removes the flat shader variant since the attrib is specified for each vert
loop in flat shaded mode. It was something leftover from the previous
implementation.

4 months agoGPUBuffers: Fix/cleanup multires implementation
Clément Foucault [Fri, 22 Feb 2019 03:00:19 +0000 (04:00 +0100)]
GPUBuffers: Fix/cleanup multires implementation

The multires sculpt drawing was a not working in smooth mode.
Also hidding was not supported by the wireframe overlay and flat shaded
faces.

Codewise it is cleaner and index buffers are only updated if the
smoothing changes.

4 months agoCleanup: make BHeadN private in readfile.c
Campbell Barton [Fri, 22 Feb 2019 02:46:44 +0000 (13:46 +1100)]
Cleanup: make BHeadN private in readfile.c

Also add macro for accessing BHeadN from BHead.

4 months agoMissed last commit
Campbell Barton [Thu, 21 Feb 2019 23:40:17 +0000 (10:40 +1100)]
Missed last commit

Harmless but not renamed as intended.

4 months agoCleanup: rename readfile API functions
Campbell Barton [Thu, 21 Feb 2019 23:31:17 +0000 (10:31 +1100)]
Cleanup: rename readfile API functions

- blo_bhead_first (was blo_firstbhead)
- blo_bhead_next (was blo_nextbhead)
- blo_bhead_prev (was blo_prevbhead)
- blo_bhead_id_name (was bhead_id_name)
- blo_filedata_free (was blo_freefiledata)
- blo_filedata_from_file (was blo_openblenderfile)
- blo_filedata_from_memory (was blo_openblendermemory)
- blo_filedata_from_memfile (was blo_openblendermemory)

4 months agoMissed last commit
Campbell Barton [Thu, 21 Feb 2019 22:34:00 +0000 (09:34 +1100)]
Missed last commit

4 months agoCleanup: comments, use bool for 'eof' variable
Campbell Barton [Thu, 21 Feb 2019 22:21:23 +0000 (09:21 +1100)]
Cleanup: comments, use bool for 'eof' variable

Also remove unused members headerdone, inbuffer & filedes,
use typed enum for file data flags.

4 months agoTransform: redo resize now constrains axis values
Campbell Barton [Thu, 21 Feb 2019 21:42:08 +0000 (08:42 +1100)]
Transform: redo resize now constrains axis values

Before 1bfbfa281046b this wasn't essential because the constraints
prevented the axes from being applied.

Now redo ignores constraints - the input values must be constrained.

4 months agomakesrna: Remove usage of dynamically linked pthreads4w
Ray Molenkamp [Thu, 21 Feb 2019 21:21:31 +0000 (14:21 -0700)]
makesrna: Remove usage of dynamically linked pthreads4w

With pthreads now being static, there is no more reason to copy the dll.

4 months agoWindows: Use static pthreads library.
Ray Molenkamp [Thu, 21 Feb 2019 21:16:26 +0000 (14:16 -0700)]
Windows: Use static pthreads library.

4 months agoWindows: Use static pthreads library.
Ray Molenkamp [Thu, 21 Feb 2019 21:16:26 +0000 (14:16 -0700)]
Windows: Use static pthreads library.

4 months agoUI: enum property menus now expand down, consistent with other menus.
Mikhail Rachinskiy [Thu, 21 Feb 2019 17:16:25 +0000 (18:16 +0100)]
UI: enum property menus now expand down, consistent with other menus.

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

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Thu, 21 Feb 2019 17:04:02 +0000 (18:04 +0100)]
Merge branch 'blender2.7'

4 months agoUI: better widget drawing with thick line width.
Harley Acheson [Thu, 21 Feb 2019 16:34:48 +0000 (17:34 +0100)]
UI: better widget drawing with thick line width.

When the line width was larger than the UI scale, there was not enough
space for thicker widget outlines to draw properly. Now widgets are made
a little larger to accommodate the thicker outlines.

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

4 months agoUI: improve corner splitting feedback by showing custom cursors.
Harley Acheson [Thu, 21 Feb 2019 16:22:51 +0000 (17:22 +0100)]
UI: improve corner splitting feedback by showing custom cursors.

* Two cursors for horizontal and vertical split.
* Four cursors for each join direction.
* One cursor to indicate when splitting is not possible.

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

4 months agoUI: increase corner splitting hit area to include screen edges.
Harley Acheson [Thu, 21 Feb 2019 16:04:20 +0000 (17:04 +0100)]
UI: increase corner splitting hit area to include screen edges.

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

4 months agomakesrna: Fix windows build.
Ray Molenkamp [Thu, 21 Feb 2019 17:02:54 +0000 (10:02 -0700)]
makesrna: Fix windows build.

makesrna requires the pthread dll to be available before it can run.

4 months agoFix T60646: From instancer texture coordinate doesn't work in viewport
Sergey Sharybin [Thu, 21 Feb 2019 16:25:34 +0000 (17:25 +0100)]
Fix T60646: From instancer texture coordinate doesn't work in viewport

Made it so that generated coordinate is always calculated.

Ideally, it will only be done depending on a current  shading,
but code is quite deep, and doing smarter thing here will end
up in way bigger refactor.

First, make things working, and then make them fast if they
pop up in a profiles.

4 months agoFix T61810: Cycles OpenCL denoising broken after recent changes.
Brecht Van Lommel [Thu, 21 Feb 2019 15:46:42 +0000 (16:46 +0100)]
Fix T61810: Cycles OpenCL denoising broken after recent changes.

4 months agoCycles OpenCL: Motion Blur Compile Directives
Jeroen Bakker [Thu, 21 Feb 2019 12:31:52 +0000 (13:31 +0100)]
Cycles OpenCL: Motion Blur Compile Directives

When using preview rendering through a camera or final rendering
the `scene.render.use_motion_blur` was not respected when building
the compile directives.

This patch will when building the compile directives check if
motion blur is enabled at all. This should lead to more efficient
kernels when no motion blur is needed.

Tags: #cycles

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

4 months agoFix for Fix (c) T61787: Duplicating a collection instance does not duplicate the...
Bastien Montagne [Thu, 21 Feb 2019 15:14:34 +0000 (16:14 +0100)]
Fix for Fix (c) T61787: Duplicating a collection instance does not duplicate the dupli_group.

Wrong logic in bitflags handling in own previous commit...

4 months agoFix (unreported) Broken DataTransfer modifier when source object is in Edit mode.
Bastien Montagne [Thu, 21 Feb 2019 14:48:29 +0000 (15:48 +0100)]
Fix (unreported) Broken DataTransfer modifier when source object is in Edit mode.

Just use common API func to get evaluated mesh of other object in
modifiers, instead of doing our own cooking. ;)

4 months agoFix T61787: Duplicating a collection instance does not duplicate the dupli_group.
Bastien Montagne [Thu, 21 Feb 2019 14:37:28 +0000 (15:37 +0100)]
Fix T61787: Duplicating a collection instance does not duplicate the dupli_group.

Transfomr init code called just after duplication (presumably before
regular depsgraph update is executed) would erase new objects'
transflags.

This is more like a hack than a real fix, but since that transform piece
of code is already a hack... Other solution would have been to force DEG
to run after object duplication, think it's better to go with that
solution for now.

Not to mention to fact that dupli flags are put into transflag... ;)

4 months agoCleanup: typos in comments.
Bastien Montagne [Thu, 21 Feb 2019 14:32:52 +0000 (15:32 +0100)]
Cleanup: typos in comments.

4 months agoFix T59338: Blender crashes immediately after loading attached file in ~80% of my...
Bastien Montagne [Wed, 20 Feb 2019 15:59:04 +0000 (16:59 +0100)]
Fix T59338: Blender crashes immediately after loading attached file in ~80% of my attempts.

Issue was a concurrent modification of an evaluated mesh by two
other meshes using it as source for custom normals data transfer.

Note that this fixes the crash (modifiers are strictly forbidden to modify
any data besides their own!), but now will have to add a new CD type to
be able to specifically request 'computed' clnors data layer, and not
only 'encoded' one, for source mesh...

4 months agoMerge branch 'blender2.7'
Sergey Sharybin [Thu, 21 Feb 2019 14:33:07 +0000 (15:33 +0100)]
Merge branch 'blender2.7'

4 months agoFix T61802: EXR preview JPEGs don't have the correct color
Sergey Sharybin [Thu, 21 Feb 2019 14:29:02 +0000 (15:29 +0100)]
Fix T61802: EXR preview JPEGs don't have the correct color

Missing color management, probably from the very beginnings of
the OCIO integration.

4 months agoSubdiv: Enable topology cache for animation
Sergey Sharybin [Thu, 21 Feb 2019 14:15:10 +0000 (15:15 +0100)]
Subdiv: Enable topology cache for animation

This commit makes it so both Subdivision Surface and Multiresolution
modifiers are caching OpenSubdiv topology. This cuts down evaluation
time quite a bit, especially for meshes which don't have many extra
ordinary verticies.

Only working for animation. Other modifications like edit mode needs
more work to make topology cache preserved by copy-on-write.

4 months agoFix: Missing closing brackets in include
Jeroen Bakker [Thu, 21 Feb 2019 13:36:51 +0000 (14:36 +0100)]
Fix: Missing closing brackets in include

4 months agoFix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.
John Quillan [Thu, 21 Feb 2019 12:26:22 +0000 (13:26 +0100)]
Fix T61733: wrong alpha for sequencer screen, multiply, .. blend modes.

It was copying the alpha from the foreground instead of background image,
which is not usually what is needed and inconsistent with the compositor.

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

4 months agoFix T61791: Motion path step is not taken into account
Jacques Lucke [Thu, 21 Feb 2019 12:28:21 +0000 (13:28 +0100)]
Fix T61791: Motion path step is not taken into account

4 months agoFix T61786: local view not exiting correctly after recent changes.
Brecht Van Lommel [Thu, 21 Feb 2019 10:32:52 +0000 (11:32 +0100)]
Fix T61786: local view not exiting correctly after recent changes.

4 months agoTransform: remove constraints from the redo panel
Campbell Barton [Thu, 21 Feb 2019 10:52:56 +0000 (21:52 +1100)]
Transform: remove constraints from the redo panel

Constraint options had confusing behavior:

- When non were pressed, the orientation was ignored.
- When any were pressed, the orientation was used,
  but only unconstrained axed could be adjusted.

Now constraining is only used for modal execution
so there is no need to show these in the interface.

When an orientation is selected, the XYZ values always transform
using that space.

Note, transform system should be refactored to support different
orientations w/o having to use constraints.

Addresses T57204

4 months agoCleanup: Line wrapping
Sergey Sharybin [Thu, 21 Feb 2019 10:08:33 +0000 (11:08 +0100)]
Cleanup: Line wrapping

4 months agoClip: Check memory allocation during prefetch
Sergey Sharybin [Thu, 21 Feb 2019 09:52:03 +0000 (10:52 +0100)]
Clip: Check memory allocation during prefetch

Aimed to make prefetching more stable for cases when
it causes Blender to run out of memory.

4 months agoCodestyle: Indentation
Jeroen Bakker [Thu, 21 Feb 2019 07:52:04 +0000 (08:52 +0100)]
Codestyle: Indentation

4 months agoFix: OpenCL Displacement and light sampling
Jeroen Bakker [Thu, 21 Feb 2019 07:11:02 +0000 (08:11 +0100)]
Fix: OpenCL Displacement and light sampling

The bake kernels are also used during mesh displacement and light
importance sampling. We disabled the implementation of these kernels
when baking was not enabled.

4 months agoFix redo regression w/ transform constraints
Campbell Barton [Thu, 21 Feb 2019 06:51:02 +0000 (17:51 +1100)]
Fix redo regression w/ transform constraints

Adjusting a constrained transform would always use global space.

4 months agoFix transform reading all ob-data as a mesh
Campbell Barton [Thu, 21 Feb 2019 06:27:57 +0000 (17:27 +1100)]
Fix transform reading all ob-data as a mesh

4 months agoTool: Use scale keymap for scale cage tool
Campbell Barton [Thu, 21 Feb 2019 05:42:59 +0000 (16:42 +1100)]
Tool: Use scale keymap for scale cage tool

Needed so clicking anywhere performs uniform scale.

4 months agoTheme: update blender-light theme clipping border
Campbell Barton [Thu, 21 Feb 2019 05:08:44 +0000 (16:08 +1100)]
Theme: update blender-light theme clipping border

Color was too dark compared to the background color.

4 months agomakesrna: Fix build error on windows.
Ray Molenkamp [Thu, 21 Feb 2019 04:56:11 +0000 (21:56 -0700)]
makesrna: Fix build error on windows.

rB94f83a4ebd929e7c4f405b1c78d9db842dfe1689 introduced a dependency on pthreads
but did not add it to the linker inputs.

4 months agoKeymap: add context menus for paint modes
Campbell Barton [Thu, 21 Feb 2019 04:43:39 +0000 (15:43 +1100)]
Keymap: add context menus for paint modes

These are place-holders with only a few items in each, as with the rest
of the context menus they need to be populated & organized.

Weight Paint 'weight' shortcut has been changed from W to Ctrl-F,
to co-exist w/ the context menu shortcut.

4 months agoFix assert w/ multi-dimensional array printing
Campbell Barton [Thu, 21 Feb 2019 03:46:54 +0000 (14:46 +1100)]
Fix assert w/ multi-dimensional array printing

Own oversight adding assert, result from MEM_allocN_len may be padded.

4 months agoKeymap: Ctrl-Home/End to set start/end frame
Campbell Barton [Thu, 21 Feb 2019 03:37:14 +0000 (14:37 +1100)]
Keymap: Ctrl-Home/End to set start/end frame

New shortcuts for the dope-sheet.

4 months agoFix T61563: Info space prints matrices as flat tuple
Sebastian Parborg [Thu, 21 Feb 2019 01:30:47 +0000 (12:30 +1100)]
Fix T61563: Info space prints matrices as flat tuple

Add support for printing multi-dimensional arrays.

4 months agoFix T61765: thread-unsafe logging used
Campbell Barton [Thu, 21 Feb 2019 00:31:00 +0000 (11:31 +1100)]
Fix T61765: thread-unsafe logging used

4 months agoMerge branch 'blender2.7'
Sergey Sharybin [Wed, 20 Feb 2019 22:20:43 +0000 (23:20 +0100)]
Merge branch 'blender2.7'

4 months agoCycles: Fix uninitialized number of hits
Sergey Sharybin [Wed, 20 Feb 2019 22:15:21 +0000 (23:15 +0100)]
Cycles: Fix uninitialized number of hits

Was happening when looking for all intersections for transparent shadow rays
in the case the ray is degenerate.

Still quesitonable whether we should consider this a transparent or opaque
configuraiton. Ideally, we should prevent such rays from happening, but that
is another vector of debugging.

4 months agoUnits: Use units for smoke
William Reynish [Wed, 20 Feb 2019 20:50:27 +0000 (21:50 +0100)]
Units: Use units for smoke

-Use factor for flame_vorticity, slice_depth, density & volume_density
-Use distance for surface_distance
-Use factor for mix factor in Data Transfer modifier
-Use prop_translation for pivot constraint offset

4 months agoUnits: Use correct units for transform operators
William Reynish [Wed, 20 Feb 2019 20:10:32 +0000 (21:10 +0100)]
Units: Use correct units for transform operators

-Use distance for Shrink/Fatten Distance
-Use factor for Smooth Factor
-Use Factor for Randomize Uniform and Normal values
-Use Distance for Randomize distance amount
-Randomize Transform Scale was wrongly using distance

4 months agofix T61122 : Collada exporter exported alpha value (always 0) from deprecated materia...
Gaia Clary [Wed, 20 Feb 2019 19:46:20 +0000 (20:46 +0100)]
fix T61122 : Collada exporter exported alpha value (always 0) from deprecated material attribute

4 months agocycles/opencl: Fix compile error.
Ray Molenkamp [Wed, 20 Feb 2019 18:44:06 +0000 (11:44 -0700)]
cycles/opencl: Fix compile error.

added missing quote, introduced in rB15edda3a8e07003bef695cca939744bbea80ad18

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 20 Feb 2019 18:07:25 +0000 (19:07 +0100)]
Merge branch 'blender2.7'

4 months agoLocal view: add operator property to disable framing selected objects.
Brecht Van Lommel [Wed, 20 Feb 2019 17:30:13 +0000 (18:30 +0100)]
Local view: add operator property to disable framing selected objects.

Default behavior is unchanged still, but can be changed in the keymap.
From testing I think this needs better visual feedback to indicate that
you are in local view, if the view does not move it's not as clear.

4 months agoLocal view: don't restore selection when exiting local view.
Brecht Van Lommel [Wed, 20 Feb 2019 17:17:33 +0000 (18:17 +0100)]
Local view: don't restore selection when exiting local view.

Losing the selection can be inconvenient, and it's easy to select all local
objects before exiting local view if needed.

4 months agoUI: Use checkbox for shape keys 'mute'.
Pablo Vazquez [Wed, 20 Feb 2019 17:56:26 +0000 (18:56 +0100)]
UI: Use checkbox for shape keys 'mute'.

Muting functions as enable/disable toggle, it's not viewport-only.

4 months agoUnits: Use pixels for denoising radius property, and set Cycles motion blur duration...
William Reynish [Wed, 20 Feb 2019 17:02:26 +0000 (18:02 +0100)]
Units: Use pixels for denoising radius property, and set Cycles motion blur duration to factor.

Also fix own mistake of using of spaces instead of tabs in RNA.

4 months agoTests: only run OpenGL draw tests on lib/tests/opengl, support symlinks.
Brecht Van Lommel [Wed, 20 Feb 2019 15:03:13 +0000 (16:03 +0100)]
Tests: only run OpenGL draw tests on lib/tests/opengl, support symlinks.

To keep running these tests relatively fast and practical to run often,
running it on all .blend files is a bit much. So now we only run it on
files from this directory.

Additionally this adds supports for following symlinks, so that you can
easily symlinks to other directories if you want to tests extra files
which may have linked libraries.

4 months agoCleanup: fix compiler warning.
Brecht Van Lommel [Wed, 20 Feb 2019 15:32:06 +0000 (16:32 +0100)]
Cleanup: fix compiler warning.

4 months agoCleanup: fix some versioning code running when not needed.
Brecht Van Lommel [Wed, 20 Feb 2019 14:30:50 +0000 (15:30 +0100)]
Cleanup: fix some versioning code running when not needed.

4 months agoFix crash when rendering and drawing curves at the same time
Sergey Sharybin [Wed, 20 Feb 2019 15:06:44 +0000 (16:06 +0100)]
Fix crash when rendering and drawing curves at the same time

Need to stop modifying original DNA data, this is not safe
for threading and easily avoidable.

4 months agoUI: Make Shutter Speed properties consistent in Eevee & Cycles.
William Reynish [Wed, 20 Feb 2019 15:04:56 +0000 (16:04 +0100)]
UI: Make Shutter Speed properties consistent in Eevee & Cycles.

-Use PROP_FACTOR for both (It is a factor of the total frame length)
-Set soft max to 1 and hard max to 2 for both.

4 months agoUI: Change name of Sequencer option from 'Draw Waveform' to 'Display Waveform' to...
William Reynish [Wed, 20 Feb 2019 13:04:03 +0000 (14:04 +0100)]
UI: Change name of Sequencer option from 'Draw Waveform' to 'Display Waveform' to fit the naming conventions described in T56648.

4 months agoMerge branch 'blender2.7'
Jeroen Bakker [Wed, 20 Feb 2019 14:22:23 +0000 (15:22 +0100)]
Merge branch 'blender2.7'

4 months agoCycles OpenCL: Remove OpenCL MegaKernel
Jeroen Bakker [Wed, 20 Feb 2019 13:41:56 +0000 (14:41 +0100)]
Cycles OpenCL: Remove OpenCL MegaKernel

Using OpenCL MegaKernel has been slow and therefore not usefull.
This patch will remove the mega kernel from the OpenCL codebase
and the OpenCLDeviceBase class.

T61736: removal of mega kernel
T61703: baking does not work with mega kernel

Tags: #cycles

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

4 months agoCycles: Fix wrong vertex color and UV for hair
Sergey Sharybin [Wed, 20 Feb 2019 13:47:46 +0000 (14:47 +0100)]
Cycles: Fix wrong vertex color and UV for hair

Was introduced by rB03013c23179 and caused by missing
occasions of when hair strands are zero length.

4 months agoSubdiv: Fix function naming
Sergey Sharybin [Wed, 20 Feb 2019 13:37:38 +0000 (14:37 +0100)]
Subdiv: Fix function naming

Not sure where displacement came from into there, maybe
file was based on displacement evaluator.

4 months agoNode headers should not respect theme alpha values
Sebastian Parborg [Wed, 20 Feb 2019 13:35:27 +0000 (14:35 +0100)]
Node headers should not respect theme alpha values

As pointed out in https://developer.blender.org/rB558d7dd90e56ca1b4dbf1b7b8b7b555791821148,
the theme color alpha should not be taken into account when rendering node headers.

Reviewed By: Brecht Van Lommel

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

4 months agoFix File > Save not showing red highlight when saving over existing files.
Brecht Van Lommel [Wed, 20 Feb 2019 12:57:17 +0000 (13:57 +0100)]
Fix File > Save not showing red highlight when saving over existing files.

Don't disable the save over popup through the keymap, just remove it entirely
from the code so that the file browser interprets the property correctly.

4 months agoFix missing dependency upgrade when changing image to/from sequence.
Brecht Van Lommel [Wed, 20 Feb 2019 12:52:10 +0000 (13:52 +0100)]
Fix missing dependency upgrade when changing image to/from sequence.

Since animation is now handled by the dependency graph.

4 months agoDepsgraph: Fix relation when lamp has driver on custom property
Sergey Sharybin [Wed, 20 Feb 2019 10:48:42 +0000 (11:48 +0100)]
Depsgraph: Fix relation when lamp has driver on custom property

Was once again caused by an ambiguity of the entry/exit operations.

Only did for objects since those are the only one who needs this.
The rest types of IDs needs to be checked and only added extra
operations if needed (adding operations and relations causes some
overhead for evaluation, so need to be careful).

4 months agoFix T61689: Crash when having image and regular animation
Sergey Sharybin [Wed, 20 Feb 2019 10:32:22 +0000 (11:32 +0100)]
Fix T61689: Crash when having image and regular animation

Was caused by ambiguity in entry/exit operation for animation channel.
Made those explicit now,

4 months agoDepsgraph: Simplify creation of animation nodes
Sergey Sharybin [Wed, 20 Feb 2019 10:18:38 +0000 (11:18 +0100)]
Depsgraph: Simplify creation of animation nodes

4 months agoCleanup: Indentation and wrapping
Sergey Sharybin [Wed, 20 Feb 2019 10:15:19 +0000 (11:15 +0100)]
Cleanup: Indentation and wrapping

4 months agoMeasure Tool: delete now removes protractor when it's active
Campbell Barton [Wed, 20 Feb 2019 06:16:22 +0000 (17:16 +1100)]
Measure Tool: delete now removes protractor when it's active

4 months agoMeasure Tool: use x/del key to remove the active ruler
Campbell Barton [Wed, 20 Feb 2019 05:38:21 +0000 (16:38 +1100)]
Measure Tool: use x/del key to remove the active ruler

Dragging outside the view was only meant to be a temporary workaround.

4 months agoCleanup: rename keymap handler callbacks for clarity
Campbell Barton [Wed, 20 Feb 2019 04:42:37 +0000 (15:42 +1100)]
Cleanup: rename keymap handler callbacks for clarity

Now there are two callbacks, the name 'keymap_callback' is too vague.

4 months agoWM: support dynamic keymap handlers
Campbell Barton [Wed, 20 Feb 2019 03:29:29 +0000 (14:29 +1100)]
WM: support dynamic keymap handlers

Add getter callback support for 'WM_HANDLER_TYPE_KEYMAP' type handlers
this is needed for key-maps which change based on the active tool.

Replaces 'sneaky_handler' hack which temporarily inserted a handler.

4 months agoRNA: use factor when appropriate
William Reynish [Tue, 19 Feb 2019 23:15:27 +0000 (10:15 +1100)]
RNA: use factor when appropriate

- Many factor properties were set to PROP_NONE,
  even properties that had 'Factor' in the name!

- Some time properties were not set to PROP_TIME,
  especially in Particles.

- Changed motion_blur_shutter to use a soft max value of 1 instead of 2.
  Anything > 1 here is not physically correct
  and makes no real logical sense.

- Changed display name of Dynamic Paint dissolve_speed to Dissolve Time,
  since it's a time property, not speed.

4 months agoCleanup: rename generic handler -> handler_base
Campbell Barton [Tue, 19 Feb 2019 23:05:40 +0000 (10:05 +1100)]
Cleanup: rename generic handler -> handler_base

Avoids having type specific handler names.

4 months agoCleanup: simplify handler type conditional
Campbell Barton [Tue, 19 Feb 2019 22:56:18 +0000 (09:56 +1100)]
Cleanup: simplify handler type conditional

Each handler type now has it's own block (fileselect was an exception).

4 months agoCleanup: rename wmEventHandler_* base -> head
Campbell Barton [Tue, 19 Feb 2019 22:43:29 +0000 (09:43 +1100)]
Cleanup: rename wmEventHandler_* base -> head

Makes it more clear it's the header/start of the struct.

4 months agoCleanup: use iterator macros for event handlers
Campbell Barton [Tue, 19 Feb 2019 22:19:07 +0000 (09:19 +1100)]
Cleanup: use iterator macros for event handlers

4 months agoBLI_listbase: add an iterator macro that supports removal
Campbell Barton [Tue, 19 Feb 2019 22:15:43 +0000 (09:15 +1100)]
BLI_listbase: add an iterator macro that supports removal

Avoids manually defining 'for' loops that store the next item in the
linked list.

4 months agoEEVEE Shader comments: Explain why material gets darkened when using mix shader
Dalai Felinto [Tue, 19 Feb 2019 21:33:46 +0000 (18:33 -0300)]
EEVEE Shader comments: Explain why material gets darkened when using mix shader

We are still ditching the specular intensity of SSR (ssr_data.xyz).
But at least now there is some comment about it.

See T61704 for user reports on that matter.

Comments with the blessing of Clément Foucault.

4 months agoComment: clarify reason for using scale as size
Campbell Barton [Tue, 19 Feb 2019 21:25:00 +0000 (08:25 +1100)]
Comment: clarify reason for using scale as size

4 months agoCleanup: style
Campbell Barton [Tue, 19 Feb 2019 21:26:17 +0000 (08:26 +1100)]
Cleanup: style