Commit Graph

78336 Commits

Author SHA1 Message Date
Jacques Lucke
b13bbb22e4 Fix link error in bf_nodes
I got undefined reference errors on the `NodeMFNetworkBuilder::get_default_fn`
function under some circumstances. This symbol is definitely defined in bf_blenkernel.
The error seemed a bit undeterministic and was probably caused by some incorrect
link order. I don't get the error with this change.
2020-07-16 19:52:28 +02:00
Jacques Lucke
02a3720000 Simulation: rename bf_physics to bf_simulation
Also see {rB9363c4de0635394548fa2eb8d205581313029775}.
2020-07-16 18:49:59 +02:00
Sybren A. Stüvel
a138bf57c9 Tests: move tests from USD test directory into io/common and io/usd
This commit is a followup of {D7649}, and ports the USD tests to the new
testing approach. It moves test code from `tests/gtests/usd` into
`source/blender/io/common` and `source/blender/io/usd`, and adjusts the
use of namespaces to be consistent with the other tests.

I decided to put one test into `io/usd/tests`, instead of
`io/usd/intern`. The reason is that this test does not correspond with a
single file in that directory; instead, it tests Blender's integration
with the USD library itself.

There are two new CLI arguments for the Big Test Runner:

- `--test-assets-dir`, which points to the `lib/tests` directory in the
  SVN repository. This allows unit tests to find test assets.
- `--test-release-dir`, which points to `bin/{BLENDER_VERSION}` in the
  build directory. At the moment this is only used by the USD test.

The CLI arguments are automatically passed to the Big Test Runner when
using `ctest`. When manually running the tests, the arguments are only
required when there is a test run that needs them.

For more info about splitting some code into 'common', see
rB084c5d6c7e2cf8.

No functional changes to the tests themselves, only to the way they are
built & run.

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

Reviewed by: brecht, mont29
2020-07-16 17:38:29 +02:00
Clément Foucault
671c6d8afd Cleanup: Gizmo: Remove non matched glDisable
We use the polyline shader for drawing the rotation gizmo now.
This shader supports clipping without hardware clip planes.
2020-07-16 18:01:44 +02:00
Clément Foucault
07d70a76df Cleanup: WM: Use GPUTexture API instead of raw ogl calls 2020-07-16 18:01:44 +02:00
Clément Foucault
5099cbeec9 Cleanup: GPU: Move depth/color masks functions to GPU_state 2020-07-16 18:01:44 +02:00
Clément Foucault
436d38bb54 Cleanup: GPU: Move XOR logic op to gpu_state.c 2020-07-16 18:01:44 +02:00
Clément Foucault
3481f6eaf2 Cleanup: GPU: Remove GL_DITHER usage 2020-07-16 18:01:44 +02:00
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