Commit Graph

85092 Commits

Author SHA1 Message Date
Campbell Barton
94f83a4ebd Fix T61765: thread-unsafe logging used 2019-02-21 11:33:50 +11:00
Sergey Sharybin
9e4d561a8b Merge branch 'blender2.7' 2019-02-20 23:20:43 +01:00
Sergey Sharybin
ccd291aafb 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.
2019-02-20 23:20:07 +01:00
William Reynish
1303bd57f5 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
2019-02-20 21:50:27 +01:00
William Reynish
1af810b4ff 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
2019-02-20 21:10:32 +01:00
Gaia Clary
e2cefc7dad fix T61122 : Collada exporter exported alpha value (always 0) from deprecated material attribute 2019-02-20 20:47:08 +01:00
Ray Molenkamp
4ec6b16b4e cycles/opencl: Fix compile error.
added missing quote, introduced in rB15edda3a8e07003bef695cca939744bbea80ad18
2019-02-20 11:44:06 -07:00
9a9336cb45 Merge branch 'blender2.7' 2019-02-20 19:07:25 +01:00
5df82b60d1 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.
2019-02-20 19:06:18 +01:00
c4f961a54c 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.
2019-02-20 19:06:18 +01:00
Pablo Vazquez
12a6059f8a UI: Use checkbox for shape keys 'mute'.
Muting functions as enable/disable toggle, it's not viewport-only.
2019-02-20 18:56:26 +01:00
William Reynish
3f65cad5ae 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.
2019-02-20 18:02:26 +01:00
848f589fdf 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.
2019-02-20 17:13:33 +01:00
fda79dbd79 Cleanup: fix compiler warning. 2019-02-20 16:39:12 +01:00
27c72e22aa Cleanup: fix some versioning code running when not needed. 2019-02-20 16:22:23 +01:00
Sergey Sharybin
ee7c9790a2 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.
2019-02-20 16:09:52 +01:00
William Reynish
7ed5e9f2f7 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.
2019-02-20 16:04:56 +01:00
William Reynish
32314e2d4e UI: Change name of Sequencer option from 'Draw Waveform' to 'Display Waveform' to fit the naming conventions described in T56648. 2019-02-20 15:28:10 +01:00
Jeroen Bakker
8a4cdda373 Merge branch 'blender2.7' 2019-02-20 15:22:23 +01:00
Jeroen Bakker
949ab753bb 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
2019-02-20 15:17:22 +01:00
Sergey Sharybin
9315cc443b 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.
2019-02-20 14:47:46 +01:00
Sergey Sharybin
ffd66ce7d5 Subdiv: Fix function naming
Not sure where displacement came from into there, maybe
file was based on displacement evaluator.
2019-02-20 14:38:24 +01:00
Sebastian Parborg
a1bd25af72 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
2019-02-20 14:37:30 +01:00
b285f92d80 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.
2019-02-20 14:04:12 +01:00
cfbcd7f0da Fix missing dependency upgrade when changing image to/from sequence.
Since animation is now handled by the dependency graph.
2019-02-20 13:53:32 +01:00
Sergey Sharybin
c985c60bdc 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).
2019-02-20 11:48:42 +01:00
Sergey Sharybin
e6bdc950d2 Fix T61689: Crash when having image and regular animation
Was caused by ambiguity in entry/exit operation for animation channel.
Made those explicit now,
2019-02-20 11:32:22 +01:00
Sergey Sharybin
c57f1f3d27 Depsgraph: Simplify creation of animation nodes 2019-02-20 11:18:38 +01:00
Sergey Sharybin
db5db0bfc2 Cleanup: Indentation and wrapping 2019-02-20 11:15:19 +01:00
Campbell Barton
f62371e6ea Measure Tool: delete now removes protractor when it's active 2019-02-20 17:16:22 +11:00
Campbell Barton
4d085c9bae Measure Tool: use x/del key to remove the active ruler
Dragging outside the view was only meant to be a temporary workaround.
2019-02-20 16:44:54 +11:00
Campbell Barton
7ee9fe4991 Cleanup: rename keymap handler callbacks for clarity
Now there are two callbacks, the name 'keymap_callback' is too vague.
2019-02-20 15:43:35 +11:00
Campbell Barton
effe750ec1 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.
2019-02-20 14:37:15 +11:00
William Reynish
855b3e68ef 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.
2019-02-20 10:18:24 +11:00
Campbell Barton
079099e8db Cleanup: rename generic handler -> handler_base
Avoids having type specific handler names.
2019-02-20 10:05:40 +11:00
Campbell Barton
4d83507f39 Cleanup: simplify handler type conditional
Each handler type now has it's own block (fileselect was an exception).
2019-02-20 09:57:38 +11:00
Campbell Barton
63d77d6d27 Cleanup: rename wmEventHandler_* base -> head
Makes it more clear it's the header/start of the struct.
2019-02-20 09:43:29 +11:00
Campbell Barton
e53676a5c7 Cleanup: use iterator macros for event handlers 2019-02-20 09:38:33 +11:00
Campbell Barton
c1c01f062e BLI_listbase: add an iterator macro that supports removal
Avoids manually defining 'for' loops that store the next item in the
linked list.
2019-02-20 09:38:33 +11:00
Dalai Felinto
0e7409d466 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.
2019-02-19 18:51:14 -03:00
Campbell Barton
a10dc319ca Comment: clarify reason for using scale as size 2019-02-20 08:27:15 +11:00
Campbell Barton
39afc2775f Cleanup: style 2019-02-20 08:27:01 +11:00
Dalai Felinto
6c0cbfcd53 Fix T61696: Filepath buttons not accepting empty values
The reported case was with the render output filename,
however the same was happening for file open.

Bug introduced on c20c203b82260c06888c2a535c08ec383923ee8a.
I can't find in the original commit any reasoning for the change
that introduced this bug.
2019-02-19 17:24:10 -03:00
e2a90b8045 Merge branch 'blender2.7' 2019-02-19 19:00:46 +01:00
Sebastian Parborg
2be29999bd Fix T61701: Orthographic Viewpoints Hidden Grid
If all axis and grid options were turned off, the grid in the main ortho views would not be rendered.
Now we force rendering of the grid regardless of the settings when in one of the main ortho views.

Reviewed By: Brecht Van Lommel

Differential Revision: https://developer.blender.org/D4378
2019-02-19 18:53:15 +01:00
Philipp Oeser
81aa2a93e9 Fix T61274: duplicate current workspace makes the workspace menu disappear.
Differential Revision: https://developer.blender.org/D4321
2019-02-19 18:43:32 +01:00
Gaia Clary
df8bd07313 fix: Collada replace <polylist> export by <triangle> export for triangulated meshes.
This is a regression from Blender 2.79 where the usage
of <triangles> was already implemented, but unintentionally
removed in Blender 2.80

Also renamed variables for better reading.
2019-02-19 17:49:54 +01:00
Jeroen Bakker
667033e89e T61463: Separate Baking kernels
Cycles OpenCL: Split baking kernels in own program

Fix T61463. Before this patch baking was part of the base kernels. There
are 3 baking kernels that and all 3 uses shader evaluation. Only for one
of these kernels the functionality was wrapped in the __NO_BAKING__
compile directive.

When you start baking this leads to long compile times. By separating
in individual programs will reduce the compile times.

Also wrapped all baking kernels with __NO_BAKING__ to reduce the
compilation times.

Impact on compilation time

    job   |   scene_name    | previous |  new  | percentage
  --------+-----------------+----------+-------+------------
   T61463 | empty           |    10.63 |  7.27 |         32%
   T61463 | bmw             |    17.91 | 14.24 |         20%
   T61463 | fishycat        |    19.57 | 15.08 |         23%
   T61463 | barbershop      |    54.10 | 48.18 |         11%
   T61463 | classroom       |    17.55 | 14.42 |         18%
   T61463 | koro            |    18.92 | 17.15 |          9%
   T61463 | pavillion       |    17.43 | 14.23 |         18%
   T61463 | splash279       |    16.48 | 15.33 |          7%
   T61463 | volume_emission |    36.22 | 34.19 |          6%

Impact on render time

    job   |   scene_name    | previous |   new   | percentage
  --------+-----------------+----------+---------+------------
   T61463 | empty           |    21.06 |   20.54 |          2%
   T61463 | bmw             |   198.44 |  189.59 |          4%
   T61463 | fishycat        |   394.20 |  388.50 |          1%
   T61463 | barbershop      |  1188.16 | 1185.49 |          0%
   T61463 | classroom       |   341.08 |  339.27 |          1%
   T61463 | koro            |   472.43 |  360.70 |         24%
   T61463 | pavillion       |   905.77 |  902.14 |          0%
   T61463 | splash279       |    55.26 |   54.92 |          1%
   T61463 | volume_emission |    62.59 |   39.09 |         38%

I don't have a grounded explanation why koro and volume_emission is this much
faster; I have done several tests though...

Maniphest Tasks: T61463

Differential Revision: https://developer.blender.org/D4376
2019-02-19 16:34:55 +01:00
Jeroen Bakker
15edda3a8e T61463: Separate Baking kernels
Cycles OpenCL: Split baking kernels in own program

Fix T61463. Before this patch baking was part of the base kernels. There
are 3 baking kernels that and all 3 uses shader evaluation. Only for one
of these kernels the functionality was wrapped in the __NO_BAKING__
compile directive.

When you start baking this leads to long compile times. By separating
in individual programs will reduce the compile times.

Also wrapped all baking kernels with __NO_BAKING__ to reduce the
compilation times.

Impact on compilation time

    job   |   scene_name    | previous |  new  | percentage
  --------+-----------------+----------+-------+------------
   T61463 | empty           |    10.63 |  7.27 |         32%
   T61463 | bmw             |    17.91 | 14.24 |         20%
   T61463 | fishycat        |    19.57 | 15.08 |         23%
   T61463 | barbershop      |    54.10 | 48.18 |         11%
   T61463 | classroom       |    17.55 | 14.42 |         18%
   T61463 | koro            |    18.92 | 17.15 |          9%
   T61463 | pavillion       |    17.43 | 14.23 |         18%
   T61463 | splash279       |    16.48 | 15.33 |          7%
   T61463 | volume_emission |    36.22 | 34.19 |          6%

Impact on render time

    job   |   scene_name    | previous |   new   | percentage
  --------+-----------------+----------+---------+------------
   T61463 | empty           |    21.06 |   20.54 |          2%
   T61463 | bmw             |   198.44 |  189.59 |          4%
   T61463 | fishycat        |   394.20 |  388.50 |          1%
   T61463 | barbershop      |  1188.16 | 1185.49 |          0%
   T61463 | classroom       |   341.08 |  339.27 |          1%
   T61463 | koro            |   472.43 |  360.70 |         24%
   T61463 | pavillion       |   905.77 |  902.14 |          0%
   T61463 | splash279       |    55.26 |   54.92 |          1%
   T61463 | volume_emission |    62.59 |   39.09 |         38%

I don't have a grounded explanation why koro and volume_emission is this much
faster; I have done several tests though...

Maniphest Tasks: T61463

Differential Revision: https://developer.blender.org/D4376
2019-02-19 16:33:50 +01:00
Jeroen Bakker
e6f5632eb1 T61513: Refactored Cycles Attribute Retrieval
There is a generic function to retrieve float and float3 attributes
`primitive_attribute_float` and primitive_attribute_float3`. Inside
these functions an prioritised if-else construction checked where
the attribute is stored and then retrieved from that location.

Actually the calling function most of the time already knows where
the data is stored. So we could simplify this by splitting these
functions and remove the check logic.

This patch splits the `primitive_attribute_float?` functions into
`primitive_surface_attribute_float?` and `primitive_volume_attribute_float?`.
What leads to less branching and more optimum kernels.

The original function is still being used by OSL and `svm_node_attr`.

This will reduce the compilation time and render time for kernels.
Especially in production scenes there is a lot of benefit.

Impact in compilation times

    job  |   scene_name    | previous |  new  | percentage
  -------+-----------------+----------+-------+------------
  t61513 | empty           |    10.63 | 10.66 |          0%
  t61513 | bmw             |    17.91 | 17.65 |          1%
  t61513 | fishycat        |    19.57 | 17.68 |         10%
  t61513 | barbershop      |    54.10 | 24.41 |         55%
  t61513 | classroom       |    17.55 | 16.29 |          7%
  t61513 | koro            |    18.92 | 18.05 |          5%
  t61513 | pavillion       |    17.43 | 16.52 |          5%
  t61513 | splash279       |    16.48 | 14.91 |         10%
  t61513 | volume_emission |    36.22 | 21.60 |         40%

Impact in render times

    job  |   scene_name    | previous |  new   | percentage
  -------+-----------------+----------+--------+------------
  61513 | empty           |    21.06 |  20.35 |          3%
  61513 | bmw             |   198.44 | 190.05 |          4%
  61513 | fishycat        |   394.20 | 401.25 |         -2%
  61513 | barbershop      |  1188.16 | 912.39 |         23%
  61513 | classroom       |   341.08 | 340.38 |          0%
  61513 | koro            |   472.43 | 471.80 |          0%
  61513 | pavillion       |   905.77 | 899.80 |          1%
  61513 | splash279       |    55.26 |  54.86 |          1%
  61513 | volume_emission |    62.59 |  61.70 |          1%

There is also a possitive impact when using CPU and CUDA, but they are small.

I didn't split the hair logic from the surface logic due to:

* Hair and surface use same attribute types. It was not clear if it could be
  splitted when looking at the code only.
* Hair and surface are quick to compile and to read. So the benefit is quite
  small.

Differential Revision: https://developer.blender.org/D4375
2019-02-19 16:28:25 +01:00