Commit Graph

8695 Commits

Author SHA1 Message Date
William Reynish d1f04658d8 Fix: Cycles Subdivisions panel was showing, even when using Eevee 2019-03-18 15:56:54 +01:00
Sergey Sharybin 4070bb242d Merge branch 'blender2.7' 2019-03-18 12:03:22 +01:00
Sergey Sharybin 7c5be750a3 Cycles: Cleanup strict compiler warnings 2019-03-18 12:02:41 +01:00
Brecht Van Lommel 76277e7402 Cleanup: fix compiler warning. 2019-03-18 10:42:56 +01:00
Brecht Van Lommel df96455c55 UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
2019-03-17 21:53:13 +01:00
Sergey Sharybin b28bd7c5a4 Cocoa: Fix missing key window after closing "About"
The cause of this issue goes deeper inside of the custom nature of
the event loop. In short, when not using [NSApp run] closing "About"
window does not make previous key window a key again.

The solution is quite similar to other projects, but we only force
key window from handler when closing one appears to be "About" window.
In all other cases we leave it up to Blender's window manager to make
decision and do not interfere with it.

Test plan:
- Open Blender application
- Go to Blender -> About Blender menu item
- Close About window
- Note that Blender's window does not become active again.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4534
2019-03-17 13:24:38 +01:00
Brecht Van Lommel e691929686 Merge branch 'blender2.7' 2019-03-17 12:54:19 +01:00
Brecht Van Lommel 7778a1a0a1 Cycles: optimization for constant background colors.
Skip shader evaluation then, as we already do for lights. Less than
1% faster in my tests, but might as well be consistent for both.
2019-03-17 12:01:19 +01:00
Brecht Van Lommel 9c7517fb63 Fix Cycles OpenCL compile waiting unnecessarily for background shader.
Makes preview kernel appear quicker when background color is fixed.
2019-03-17 12:01:19 +01:00
Brecht Van Lommel 9873005ecd Cleanup: simplify kernel features definition.
No functional changes, logic here got too complex after many changes over
the years.
2019-03-17 12:01:19 +01:00
Brecht Van Lommel 2d8aa2e6ad Cleanup: remove unused code. 2019-03-17 11:39:17 +01:00
Brecht Van Lommel 5ad2302413 Fix Cycles not doing versioning for some files saved in 2.80. 2019-03-17 11:39:17 +01:00
Brecht Van Lommel e17f7af0ce Cleanup: remove Cycles advanced shading features toggle.
It's effectively always enabled, only not on some unsupported OpenCL devices.
For testing those it's not useful to disable these features. This is replaced
by the more fine grained feature toggles that we have now.
2019-03-17 01:58:39 +01:00
Miguel Porces 9e152f919f Python API: add Python-defined node groups for shaders and compositing.
This was already supported for Cycles shader nodes, but now also works for
Eevee and compositing nodes. Instead of a generic NodeCustomGroup, now
there is ShaderNodeCustomGroup and CompositorNodeCustomGroup that can be
subclassed and registered.

Differential Revision: https://developer.blender.org/D4370
2019-03-16 20:36:35 +01:00
Brecht Van Lommel b9af4efe41 Cleanup: fix compiler warnings. 2019-03-16 20:21:16 +01:00
Brecht Van Lommel bc8bd87dff Merge branch 'blender2.7' 2019-03-15 18:31:48 +01:00
Brecht Van Lommel 65d95879f7 Cycles: upgrade to CUDA 10.1 as the one officially supported version.
This version fixes various bugs, and there is no need anymore to use both
9.1 and 10.0 for different cards.

There is a bug related to WITH_CYCLES_CUBIN_COMPILER and bump mapping in the
regression tests, so that remains disabled same as it was for CUDA 10.0.

Fix T59286: CUDA bake failing on some cards.
Fix T56858: CUDA 9.2 and 10 issues.
2019-03-15 16:52:28 +01:00
Brecht Van Lommel 56a8c2a320 Fix cycles preferences.get_devices() not returning all devices as before.
It only returned those for the active device type. For backwards compatibility
return them all again, but still avoid enumerating them from our own code on
startup or opening preferences.
2019-03-15 16:52:28 +01:00
Jeroen Bakker 5051e580e4 Merge branch 'blender2.7' 2019-03-15 16:28:33 +01:00
Jeroen Bakker 2f6257fd7f Cycles/OpenCL: Compile Kernels During Scene Update
The main goals of this change is faster starting when using foreground
rendering.

This patch will build kernels in parallel to the update process of
the scene. When these optimized kernels are not available (yet) an AO
kernel will be used.

These AO kernels are fast to compile (3-7 seconds) and can be
reused by all scenes. When the final kernels become available we
will switch to these kernels.

In background mode the AO kernels will not be used.
Some kernels are being used during Scene update (displace, background
light). When these kernels are being used the process can halt until
these become available.

Reviewed By: brecht, #cycles

Maniphest Tasks: T61752

Differential Revision: https://developer.blender.org/D4428
2019-03-15 16:18:21 +01:00
Campbell Barton 41b289be30 Cleanup: unused imports 2019-03-15 19:45:21 +11:00
Jeroen Bakker 6237743111 Cycles/OpenCL: Added missing opencl programs
The functions that determine the program name + filename of kernels
were missing some base kernels like denoising and base. For completeness
I added those kernels so the function returns the correct results.
2019-03-15 08:11:28 +01:00
Brecht Van Lommel 81a03e17f7 Merge branch 'blender2.7' 2019-03-14 19:00:10 +01:00
Brecht Van Lommel 7b38ad7286 Fix T57138: Cycles CMJ failing with viewport samples set to 0.
Can't use INT_MAX, CMJ runs into precision/overflow issues before that.
2019-03-14 17:39:00 +01:00
Stefan Werner d8f1b18d9b Merge branch 'blender2.7' of git.blender.org:blender 2019-03-14 11:47:27 +01:00
Stefan Werner 47da8dcbca Cycles: Improved thread order for better CUDA performance.
This patch puts threads that render the same pixel closer together,
as opposed to threads that render the same sample. Thus threads
within a warp are more coherent in memory access and control flow,
leading to performance improvements.

Example benchmarks on a Quadro RTX4000 (WDDM) on Windows 10:
Koro:                 4:23 ->  3:46
BMW:                  1:18 ->  1:25
Barbershop Interior: 17:52 -> 14:55
Classroom:            4:37 ->  3:45

Performance differences on OpenCL/AMD were hit and miss, some scenes
became faster, others lost significantly. Therefore, this is kept as
CUDA only change for now.
2019-03-14 11:45:58 +01:00
Jeroen Bakker 687e4b42d5 Merge branch 'blender2.7' 2019-03-14 09:31:20 +01:00
Jeroen Bakker 4887baf7d6 Fix T62145: Geometry.Backface Node Renders Black
The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is
NODE_GROUP_LEVEL_0.
2019-03-14 09:20:11 +01:00
Brecht Van Lommel 2d4a4fa0c1 Merge branch 'blender2.7' 2019-03-13 18:37:09 +01:00
Brecht Van Lommel 1be16466e7 Fix T60434: crash with OSL and viewport + preview render at the same time.
Don't free LLVM JIT memory until process exit, there might be multiple OSL
instances using it.
2019-03-13 18:31:12 +01:00
Campbell Barton 3afc77655e Fix T57305: NDOF frozen w/ lock view to camera
This effectively reverts 030297209f and 785e8a636a,
which caused this issue.
2019-03-13 22:21:23 +11:00
Sergey Sharybin 9984c6494a Fix Cycles interface after 3017d88aec 2019-03-13 09:53:07 +01:00
Campbell Barton 100854c17c UI: rename PresetMenu to PresetPanel, move to bl_ui.utils
Confusing to call a menu a panel when subclasses need to define
panel specific variables.

Avoid having bl_ui depend on bl_operator module too.
Since this isn't an operator, add utils modules for shared types.
2019-03-13 13:32:10 +11:00
Brecht Van Lommel cae89a6889 Python/ViewLayers: add object.hide_get/set(), and optional view layer parameters.
These new functions control the per view layer object hiding state, similar to
the selection state. All these object state checking functions now also optionally
take a view layer to use instead of the active view layer.

Fixes T62062.
2019-03-12 18:52:56 +01:00
Brecht Van Lommel 645cc3e871 Merge branch 'blender2.7' 2019-03-12 14:22:53 +01:00
Brecht Van Lommel e3b1ae9a81 Fix T62481: Cycles crash rendering with UV pass after recent changes. 2019-03-12 14:11:36 +01:00
Jeroen Bakker 298dabc79b Cycles/OpenCL: Reduce How Often Kernel Recompilations Are Needed
This patch will reduce the number of times that we need to
recompile kernels. It does this by (en/dis)abling features
by default. So when the user needs them that the kernels are
already available.

Other features are enabled by default for background and foreground
rendering. When in background rendering the user wants the best
render performance. When in foreground rendering the user wants
the least amount of recompilations.

Enabling volumetrics or subdivision evaluation will still trigger
a recompilation during foreground rendering.

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D4485
2019-03-12 14:06:45 +01:00
Brecht Van Lommel f608964549 Merge branch 'blender2.7' 2019-03-11 14:34:17 +01:00
Brecht Van Lommel 56a633fd2c Fix T61103: Cycles bevel wrong on objects with negative scale. 2019-03-11 14:26:06 +01:00
Brecht Van Lommel 6503b4f90f Fix T61831: Denoising Clean pass not scaled correctly with samples. 2019-03-11 14:26:06 +01:00
Sergey Sharybin 0152bf2edf Color management: Fix/workaround broken getDefaultDisplay()
This is something what is caused by OCIO library. The patch
has been submitted there:

  https://github.com/imageworks/OpenColorIO/pull/638

For until it is refined and checked we do workaround from
our side.
2019-03-11 11:27:04 +01:00
Julian Eisel 4041249943 Merge branch 'blender2.7'
Conflicts:
	intern/cycles/blender/addon/properties.py
	intern/cycles/device/opencl/opencl_split.cpp
2019-03-09 17:19:52 +01:00
Jeroen Bakker 02a7e875d7 Cycles OpenCL: Remove single program
Part of the cleanup of the OpenCL codebase.
Single program is not effective when using OpenCL, it is slower
to compile and slower during rendering (when used in for example
`barbershop` or `victor`).

Reviewers: brecht, #cycles

Maniphest Tasks: T62267

Differential Revision: https://developer.blender.org/D4481
2019-03-08 16:31:35 +01:00
Jeroen Bakker 12a32d1bf1 Codestyle: comments 2019-03-08 07:19:48 -07:00
Jeroen Bakker 76442e676e Codestyle: comments 2019-03-08 08:56:16 +01:00
Dalai Felinto 92d185faeb Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.

Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.

This would lead to all sort of pinning problems:

* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.

* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.

* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.

I also sanitized the name of the panels, their inheritance and poll
functions.

Reviewers: antoniov, brecht

Subscribers: billrey

Differential Revision: https://developer.blender.org/D4470
2019-03-07 20:28:25 +00:00
Brecht Van Lommel 35a2edf761 Linux/X11: update icon in taskbar to match new icons.
Adds a few different resolutions for better quality when scaling up/down.
2019-03-06 17:12:11 +01:00
Brecht Van Lommel ebcea3029d Merge branch 'blender2.7' 2019-03-06 13:45:21 +01:00
Brecht Van Lommel f08191a459 Fix Cycles build error on non-x86 processors. 2019-03-06 13:37:06 +01:00
Brecht Van Lommel 3428ec5984 Merge branch 'blender2.7' 2019-03-05 19:14:00 +01:00