Commit Graph

1604 Commits

Author SHA1 Message Date
Campbell Barton 3633a79789 Cleanup: correct misleading classmethod arg 2019-04-19 07:36:07 +02:00
Campbell Barton 108045faa0 ClangFormat: format '#if 0' code in intern/ 2019-04-17 08:17:13 +02:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton 157872922a CMake: fix building WITH_CYCLES_LOGGING=ON 2019-04-16 14:56:34 +02:00
Campbell Barton 5498e7f193 CMake: add library deps to CMakeLists.txt
Tested to work on Linux and macOS.

This will be enabled once all platforms are verified.

See D4684
2019-04-16 06:20:52 +02:00
Campbell Barton 47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
Brecht Van Lommel b2e2db94bd Fix T60379: Cycles viewport adaptive subdivision hangs after updates.
The camera world to raster computation was using wrong values. Also fixes
update when changing subdivision scene settings.
2019-04-04 21:22:31 +02:00
Brecht Van Lommel 6d4d7c7ca3 Cycles: reduce number of synchronizing object prints.
Do it only for meshes/curves since those are potentially slow and need user
feedback to see things are not stuck. For object instances and lights assume
it's fast enough.

Printing too much can have a performance impact on slow Windows command
prompt or when logging complex scene renders.
2019-03-29 01:42:38 +01:00
Stefan Werner 69fb859909 Merge branch 'blender2.7' of git.blender.org:blender 2019-03-20 12:51:32 +01:00
Brecht Van Lommel d555c92e3c Cleanup: fix debug warnign due to tooltip ending in dot. 2019-03-19 19:16:39 +01:00
Brecht Van Lommel fa59c6a3e7 Merge branch 'blender2.7' 2019-03-19 18:54:17 +01:00
Brecht Van Lommel 83de13f75a Cycles: add cycles.merge_images operator for combing EXR renders.
This is only available through the API, mainly intended for render farms to
combine rendered multilayer EXR Files with different samples. The images are
currently expected to have the exact same render layers and passes, just with
different samples.

Variance passes are still simply a weighted average, ideally these should be
merged more intelligently.

Differential Revision: https://developer.blender.org/D4554
2019-03-19 18:23:19 +01:00
Sergey Sharybin 5b7b7101c8 Cycles: Implement function to format and parse human readable time
Gives value in seconds for a string which is encoded in format HH:MM:SS.hh.
2019-03-19 17:38:43 +01:00
Brecht Van Lommel a29186efb4 Merge branch 'blender2.7' 2019-03-18 19:06:21 +01:00
Brecht Van Lommel 01df4818a6 Fix Cycles curve UVs wrong after recent changes. 2019-03-18 19:02:59 +01:00
William Reynish d1f04658d8 Fix: Cycles Subdivisions panel was showing, even when using Eevee 2019-03-18 15:56:54 +01:00
Brecht Van Lommel 8162a6c51d Cleanup: fix compiler warnings. 2019-03-18 14:56:08 +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
Brecht Van Lommel e691929686 Merge branch 'blender2.7' 2019-03-17 12:54: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 bc8bd87dff Merge branch 'blender2.7' 2019-03-15 18:31:48 +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
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
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
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
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 3428ec5984 Merge branch 'blender2.7' 2019-03-05 19:14:00 +01:00
Brecht Van Lommel 25c935e65f Fix Cycles bug rendering with multiple UV maps after recent changes. 2019-03-05 18:39:55 +01:00
Stefan Werner c891fb2fbe Merge branch 'blender2.7' 2019-03-05 15:06:09 +01:00
Brecht Van Lommel db7f9a70b0 Cycles: Added Float2 attribute type.
Float2 are now a new type for attributes in Cycles. Before, the choices
for attribute storage were float and float3, the latter padded to
float4. This meant that UV maps were inflated to twice the size
necessary.

Reviewers: brecht, sergey

Reviewed By: brecht

Subscribers: #cycles

Tags: #cycles

Differential Revision: https://developer.blender.org/D4409
2019-03-05 14:55:21 +01:00
Sergey Sharybin b526a38ba2 Cycles: Store various render stages timings
Includes time spent on synchronization and time spent on just
path tracing/denoising.
2019-03-04 11:52:49 +01:00
Sergey Sharybin 2150a68a80 Cleanup: Indentation 2019-03-04 11:32:30 +01:00
Brecht Van Lommel 9ad379fe55 Fix T61891: Cycles light use nodes button greyed out. 2019-02-25 10:24:40 +01:00
Brecht Van Lommel d6b5ee99fe Merge branch 'blender2.7' 2019-02-21 18:04:02 +01:00
Jeroen Bakker 6e53fdc18f 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
2019-02-21 16:33:29 +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
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
Jeroen Bakker 84a5abdb31 Merge branch 'blender2.7' 2019-02-19 08:05:15 +01:00