Commit Graph

78328 Commits

Author SHA1 Message Date
Clément Foucault
71ac137662 Cleanup: GPU: Move quad buffer stereo check to GPU module 2020-07-16 18:01:44 +02:00
Clément Foucault
8084b7e6e2 Cleanup: GPU: Replace all glReadPixels by GPU equivalent 2020-07-16 18:01:44 +02:00
Clément Foucault
ab19abe223 Cleanup: Port glClear calls to GPU module functions 2020-07-16 18:01:44 +02:00
Clément Foucault
bc85081156 Cleanup: DRW: remove uneeded double bind
Now that binds are permanent there is no need to setup the same
texture for each subgroups.
2020-07-16 18:01:44 +02:00
Jacques Lucke
56b8adb9e2 Particles: avoid crash when connected unimplemented node 2020-07-16 16:43:42 +02:00
Jacques Lucke
1494ad20b9 Particles: add implicit covnersions between Vector and Color
Not sure if these conversions are a good idea. However, we have them
in Cycles, so they be available in the simulation node tree for consistency
reasons.
2020-07-16 16:43:42 +02:00
Jacques Lucke
76bf050853 Particles: simplify adding new implicit conversions between sockets 2020-07-16 16:43:42 +02:00
Jacques Lucke
f64710a518 Particles: change initial velocity of particles
This is only temporary, but makes testing the system a bit easier.
2020-07-16 16:09:19 +02:00
Jacques Lucke
4249d6f58e Particles: support Separate/Combine RGB nodes 2020-07-16 16:09:19 +02:00
Jacques Lucke
ada173ebfd Particles: simplify Combine XYZ node 2020-07-16 16:09:19 +02:00
Jacques Lucke
72df7c23c4 Particles: support Color Ramp node 2020-07-16 16:09:19 +02:00
Brecht Van Lommel
c7aa0f9d74 Fix T78537: too much memory usage rendering animation with persistent images
For still images, always return 0 for the current frame number. This ensures
Cycles can detects that the image did not change.

Based on patch by Vincent Blankfield.

Differential Revision: https://developer.blender.org/D8242
2020-07-16 15:50:43 +02:00
Jacques Lucke
83955d6769 Particles: support Map Range node
Only linear interpolation mode is supported for now.
2020-07-16 13:26:20 +02:00
Jacques Lucke
9b6088cb9d Simulation: Change BPH prefix to SIM
In a previous commit the `physics` folder has been renamed to `simulation`.
This commit updates the function/file prefix accordingly.
2020-07-16 14:37:21 +02:00
Jacques Lucke
9363c4de06 Simulation: Rename physics directory to simulation
Function names will be updated in a separate commit.

This will be the place for the new particle system and other
code related to the Simulation data block. We don't want
to have all that code in blenkernel.

Approved by brecht.
2020-07-16 14:28:38 +02:00
Jacques Lucke
f3ea6a5b28 Particles: implement more vector math operations 2020-07-16 14:15:24 +02:00
Jacques Lucke
b882f89fe3 Particles: support for most math node operations 2020-07-16 13:41:47 +02:00
Jacques Lucke
2ddb3dc617 Nodes: support default function for partially implemented nodes 2020-07-16 13:38:23 +02:00
Sybren A. Stüvel
56aa5b0d8c T73268: Link C/C++ unit tests into single executable
This commit introduces a new way to build unit tests. It is now possible
for each module to generate its own test library. The tests in these
libraries are then bundled into a single executable.

The test executable can be run with `ctest`. Even though the tests
reside in a single executable, they are still exposed as individual
tests to `ctest`, and thus can be selected via its `-R` argument.

Not yet ported tests still build & run as before.

The following rules apply:

- Test code should reside in the same directory as the code under test.
- Tests that target functionality in `somefile.{c,cc}` should reside in
  `somefile_test.cc`.
- The namespace for tests is the `tests` sub-namespace of the code under
  test. For example, tests for `blender::bke` should be in
  `blender::bke:tests`.
- The test files should be listed in the module's `CMakeLists.txt` in a
  `blender_add_test_lib()` call. See the `blenkernel` module for an
  example.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D7649
2020-07-16 12:58:49 +02:00
Sybren A. Stüvel
065a00ee3e Fix T78920: missing depsgraph relation when using sound strips in VSE
Having a sound strip in the VSE caused a missing relation error to be
logged on the console. This was caused by the AUDIO depsgraph component
not having an entry node. This commits adds that node, and sets up
relations correctly.

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

Reviewed By: Sergey
2020-07-16 11:51:39 +02:00
Jacques Lucke
d4ce777aed BLI: move inline include to the bottom to avoid redeclaration warning 2020-07-16 11:33:35 +02:00
Jacques Lucke
d897228682 BLI: move safe math functions to separate header 2020-07-16 11:28:31 +02:00
Jacques Lucke
f6f93b5b12 BLI: add safe_divide, safe_modf and safe_logf
Those are defined exactly as their corresponding functions in Cycles.
2020-07-16 11:05:30 +02:00
Bastien Montagne
7e0bf7a0f1 LibOverride: Fix getting proper RNA path and ID from embedded ones.
Master collections and root node trees should now be working as expected
in that regard.
2020-07-16 11:04:03 +02:00
Jacques Lucke
35bfe1702c BLI: add safe_powf function
The same function is also used by cycles.
2020-07-16 10:46:18 +02:00
Campbell Barton
ad4928a171 UI: avoid aligning labels for ui_item_with_label
Key-map display was doing thousands of redundant alignment operations.
Set the spacing instead as align was only set to use zero spacing.

This would have prevented the crash reported by T78636.
2020-07-16 17:00:16 +10:00
Campbell Barton
75520894c7 Fix T78636: Crash displaying many aligned buttons
Displaying user preferences search crashed on macOS when the search
contained a common character such as 'E'.
This caused alignment to 'alloca' too much memory.

Replace with a heap allocation fallback.
2020-07-16 16:38:07 +10:00
Campbell Barton
2811de6e5c Cleanup: fix building without USE_UIBUT_SPATIAL_ALIGN defined 2020-07-16 13:48:01 +10:00
Campbell Barton
5b099a25d7 Fix T78966: Center cursor doesn't refresh the UI 2020-07-16 13:27:50 +10:00
Campbell Barton
123e29c274 Cleanup: missing CMake headers from source lists 2020-07-16 13:17:31 +10:00
Campbell Barton
54abab53bf Cleanup: undeclared function warning, unused argument 2020-07-16 11:14:27 +10:00
Campbell Barton
a3d90337b8 Cleanup: spelling 2020-07-16 11:09:39 +10:00
Campbell Barton
d11a2dfe71 Cleanup: minor change to grease pencil material access
Rename for clarity and avoid passing in the prefix length.
2020-07-16 11:09:39 +10:00
Richard Antalik
75a09ba2ed Fix T78837: Prefetching can corrupt .blend files
This happened because of typo in seq_dupli() when duplicating effect data.
Instead of duplicating data to new sequence, it was duplicated into original.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8295
2020-07-16 02:24:37 +02:00
Clément Foucault
974e36d7d0 Fix T78647 UVEdit: Crash when entering edit mode with UV Editor open
Only affects MacOS.
2020-07-15 21:14:46 +02:00
Clément Foucault
058514aa0a PointCloud: Initial rendering support for Workbench
Also includes outline overlays. Removes the temp overlay drawing

We make the geometry follow camera like billboards this uses less
geometry. Currently we use half octahedron for now. Goal would be
to use icospheres.

This patch also optimize the case when pointcloud has uniform radius.
However we should premultiply the radius prop by the default radius
beforehand to avoid a multiplication on CPU.

Using geometry instead of pseudo raytraced spheres is more scalable as
we can render as low as 1 or 2 triangle to a full half sphere and can
integrate easily in the render pipeline using a low amount of code.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8301
2020-07-15 20:10:45 +02:00
Clément Foucault
d4d810f817 Cleanup: EEVEE: Remove concentric samples. 2020-07-15 19:51:55 +02:00
Clément Foucault
37a8c6d809 Cleanup: EEVEE: Remove unused IRRADIANCE_CUBEMAP 2020-07-15 19:51:55 +02:00
Clément Foucault
47885abbe6 Workbench: Replace viewvecs caculation by DRWView 2020-07-15 19:51:55 +02:00
Clément Foucault
cd8f3c9ee7 DRW: Add glsl math libraries
Copied from eevee bsdf_common_lib.glsl
2020-07-15 19:51:55 +02:00
Clément Foucault
2c1edcf3ef EEVEE: Fix undefined behavior in world output 2020-07-15 19:51:55 +02:00
Clément Foucault
24c846b2b4 GPU: Shader: Move IN_OUT define to shader GPU_shader_create_ex
This adds the opportunity to use it in multiple places.
2020-07-15 19:51:55 +02:00
Clément Foucault
987d14a3b2 DRW: Shader: Fix const correctness and print better debug output 2020-07-15 19:51:55 +02:00
Clément Foucault
8e16873086 DRW: Shader: Add DRW_shader_create(_fullscreen)_with_shaderlib
Some convenience function for using DRWShaderLibrary.
2020-07-15 19:51:55 +02:00
Clément Foucault
5dcf60e053 DRW: View: Add ViewVecs calculation
This will remove some code duplication between draw engines.
2020-07-15 19:51:55 +02:00
Pablo Dobarro
f1104c2828 Fix T78369: Sculpt Vertex Colors not rendering in EEVEE
The vertex colors node was using the M_COL attribute type but Sculpt
Vertex Colors use CD_PROP_COLOR
Now the Vertex Color node also fallbacks to legacy vertex colors if
Scultp Vertex Colors are not enabled as experimental.

Reviewed By: brecht

Maniphest Tasks: T78369

Differential Revision: https://developer.blender.org/D8185
2020-07-15 18:55:33 +02:00
Bastien Montagne
eb54624a9a LibOverride: make outliner's 'override hierarchy' use same logic as 3DView operator.
So now one can create a 'full', 'complete' override of a character from
the outliner as well.
2020-07-15 18:17:34 +02:00
Bastien Montagne
5057b28a2f LibOverride: move most of 'complete override creation' from ED_object to BKE_lib_override.
This code is fairly complex and can be used in more places, better not
duplicate that logic and just have it in BKE area.
2020-07-15 18:17:34 +02:00
Bastien Montagne
ba100c883c BKE collection: add util to add a collection using another collection as 'template'.
Similar to what we already had using an object as 'template'.
2020-07-15 18:17:34 +02:00
Bastien Montagne
a082e49671 Cleanup: remove debug prints. 2020-07-15 18:17:34 +02:00