Commit Graph

98769 Commits

Author SHA1 Message Date
Sybren A. Stüvel 6414da0381 Cleanup: enable and silence Clang-Tidy readability-function-size
Enable Clang-Tidy's `readability-function-size` rule and add a few
`NOLINT` markers to explicitly silence warnings for three functions.
These functions are huge and would IMO benefit from splitting up, but
are hard to without intimate knowledge of the code.

At least by enabling the rule, we can start tweaking the values and
refactoring other functions that bubble up as being too long/complex.

No functional changes.
2020-08-07 16:23:17 +02:00
Sybren A. Stüvel 2a0bc4d23e Cleanup: Nodes, silence Clang-Tidy readability-function-size
Add a `NOLINT` marker to explicitly silence a warning from Clang-Tidy's
`readability-function-size` rule for the `node_type_base()` function.
This function is indeed huge, but that is because a lot of macros are
expanded. Before expansion things are still not small, but still
understandable & expandable.

No functional changes.
2020-08-07 16:23:02 +02:00
Sergey Sharybin 4ce298b3c0 Cleanup: Clang-Tidy. readability-non-const-parameter in pixel drawing 2020-08-07 16:13:11 +02:00
Julian Eisel 17dbdcc552 Fix T79571: "Assign Shortcut" doesn't work for "Clear Keyframes"
In the 3D View, the "Animation" keymap is not used, but the mode
specific ones. So the shortcut editing code should use these too, just
like the default keymap does.
2020-08-07 16:11:30 +02:00
Sybren A. Stüvel d4bd0789ab Cleanup: Delaunay 2D, silence Clang-Tidy readability-function-size
This adds a `NOLINT` marker to explicitly silence a warning from
Clang-Tidy's `readability-function-size` rule for the `incircleadapt()`
function in `delaunay_2d.c`.

No functional changes.
2020-08-07 15:54:28 +02:00
Sybren A. Stüvel b27a953798 Cleanup: Versioning: silence Clang-Tidy readability-function-size
This adds `NOLINT` markers to explicitly silence warnings from Clang-Tidy's
`readability-function-size` rule for versioning functions. Technically
these could be refactored and split up into smaller bits, but generally
they are hardly ever looked at once they're a few releases old.

No functional changes.
2020-08-07 15:54:28 +02:00
Sybren A. Stüvel 3090b52f8c Cleanup: PyBGL, Clang-Tidy readability-function-size fixes
This addresses warnings from Clang-Tidy's `readability-function-size`
rule in the `source/blender/python` module.

It's just `BPyInit_bgl()` that's been split up into one or two smaller
functions per OpenGL version.

No functional changes.
2020-08-07 15:54:28 +02:00
Sebastián Barschkis 24d8ab1556 Merge branch 'blender-v2.90-release' 2020-08-07 15:50:42 +02:00
Sebastián Barschkis c2691c93d5 Fix T79201: Mantaflow: Fluid guides don't affect simulation.
This broke during the OpenVDB update for 2.90. Just making sure that guiding velocity files are being read correctly.
2020-08-07 15:33:51 +02:00
Julian Eisel 076a93b855 UI Code Quality: Use derived struct for progessbar buttons
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`, which is a very ugly design
choice (hard to reason about).

Part of T74432.
2020-08-07 15:17:52 +02:00
Julian Eisel 9f475db6c9 Fix failing assert when entering Texture Paint mode
Was unbinding the shader twice.
2020-08-07 15:17:52 +02:00
Julian Eisel 68c00e6f8f UI Code Quality: Use derived struct for color buttons
For the main rationale behind this design, see 03b122e2a18df. Further,
this removes users of `uiBut.a1`/`uiBut.a2`, which is a very ugly design
choice (hard to reason about).

Part of Part of T74432.
2020-08-07 15:17:52 +02:00
Julian Eisel 49f088e2d0 UI Code Quality: Use derived structs for search buttons and decorators
The current on-size-fits-all `uiBut` creates quite a mess, where it's
hard to reason about which members are free for use, under which
conditions they are used and how.
`uiBut` also has members that aren't used at times, violating the "don't
pay for what you don't use" principle.

To address this, we want to move to typed buttons, where `uiBut` is just
a base struct and each type extends it as needed. That structures data
better and type specific data is only available if it's actually used by
a button type.

Two trade-offs:
* Many casts to the derived type have to be done.
* Sometimes we change the button type after it's created. So I had to
  add logic to reallocate the button for use with the new, possibly
  derived struct. Ideally that wouldn't be needed, but for now that's
  what we have.

Part of T74432.

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

Reviewed by: Brecht Van Lommel, Campbell Barton
2020-08-07 15:17:52 +02:00
Campbell Barton 48e089375e Cleanup: pass arrays const where possible 2020-08-07 22:56:13 +10:00
Campbell Barton b134434224 Cleanup: declare arrays arrays where possible 2020-08-07 22:37:39 +10:00
Sybren A. Stüvel 3db67fd670 Revert "Cleanup: Cycles, applied Clang-Format"
This reverts commit 88cc3f167f. It was
caused by running Clang-Format version 10, instead of 9 from the
precompiled libs directory.
2020-08-07 13:38:07 +02:00
Sybren A. Stüvel c04088fed1 Cleanup: Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule. This should be the final commit of the series of commits that
addresses this particular rule.

No functional changes.
2020-08-07 13:38:07 +02:00
Sybren A. Stüvel 3d48d99647 Cleanup: Python, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.

No functional changes.
2020-08-07 13:38:07 +02:00
Sybren A. Stüvel 44b7354742 Cleanup: Nodes, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/nodes` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel 47f8c444a4 Cleanup: Modifiers, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/modifiers` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel dee359e26e Cleanup: IO, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/io` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel dbf4f52fe0 Cleanup: ImBuf, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/imbuf` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel c889d93c80 Cleanup: GPU, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/gpu` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel 326e137a8c Cleanup: Freestyle, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/freestyle` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel 94eaaf097c Cleanup: Depsgraph, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/depsgraph` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel f453ee7d3a Cleanup: Compositor, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/compositor` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel fb18e48a84 Cleanup: Blenloader, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenloader` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sybren A. Stüvel 1b272a649b Cleanup: Blenkernel, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.

No functional changes.
2020-08-07 13:38:06 +02:00
Sergey Sharybin cfc6f9eb18 Clang-Tidy: Address readability-redundant-string-init 2020-08-07 12:18:15 +02:00
Sybren A. Stüvel 156448ba4b Cleanup: Draw, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/draw` module. Not all warnings are addressed
in this commit.

No functional changes.
2020-08-07 12:01:40 +02:00
Sybren A. Stüvel 88cc3f167f Cleanup: Cycles, applied Clang-Format
No functional changes.
2020-08-07 12:01:40 +02:00
Julian Eisel 4ba9d7d71e Fix fast clicks on File Browser sort columns not changing sorting
Clicking on the column header is supposed to enable sorting by this
column, or switch the sort order if already enabled.
The double-click event would be blocked by the `file.execute()`
operator, which is not supposed to act if the user clicked outside the
file list.
2020-08-07 11:39:04 +02:00
Julian Eisel 5809dc6b5b Fix T79616: Sort by column in filebrowser is broken
After changes in rBc606044157a3, mouse press events would be blocked by
the selection operator. This only worked by chance before.
2020-08-07 11:39:04 +02:00
Sybren A. Stüvel a29686eeb3 Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.

No functional changes.
2020-08-07 11:23:02 +02:00
Jacques Lucke e0c51b466f Merge branch 'blender-v2.90-release' into master 2020-08-07 10:23:33 +02:00
Jacques Lucke 1b1129f82a Code Style: use "#pragma once" in intern/ghost
More information can be found in D8466.
2020-08-07 10:18:01 +02:00
Jacques Lucke 8198dbb888 Code Style: use "#pragma once" in some newer headers
Those were missing from the previous commit, because these headers
only exist in the `master` and not in the `blender-v2.90-release` branch.
2020-08-07 10:10:37 +02:00
Jacques Lucke af88cc0701 Cleanup: make format 2020-08-07 10:07:36 +02:00
Jacques Lucke 7283e6fb73 Merge branch 'blender-v2.90-release' into master 2020-08-07 10:04:57 +02:00
Jacques Lucke 91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Clément Foucault 21fec95139 Merge branch 'blender-v2.90-release' 2020-08-07 01:23:20 +02:00
Clément Foucault 58909abc68 EEVEE: Render: Fix regression caused by previous Motion blur fix
Caused by rB4f59e4bddcb0c06e441adf68a5f252a4e5b4b260
2020-08-07 00:59:14 +02:00
Clément Foucault 6e226275fd Merge branch 'blender-v2.90-release' 2020-08-06 23:06:33 +02:00
Clément Foucault 4f59e4bddc Fix T78452 EEVEE: Motion Blur: Crash when using camera switching
This was caused by the ViewLayer being freed with all its
engine data.
2020-08-06 23:06:18 +02:00
Clément Foucault 3dcaca93a0 Fix T78160 EEVEE: Motion Blur: Bug with Follow Path animation
Follow path seems to not be catched by `BKE_object_moves_in_time`.
For this reason, we cache all transforms for all object and check
ourselves if an animation occurs. This is almost what cycles does.

We also fix the rigid body case if the rigid body use deformation.
2020-08-06 23:06:18 +02:00
Antonio Vazquez 9a1ff4445b Merge branch 'blender-v2.90-release' 2020-08-06 19:52:49 +02:00
Antonio Vazquez 3d35012a05 GPencil: Fix unreported wrong Polyline bottom tooltip
It was mising the Wheelmouse option and the name of the tool was wrong.
2020-08-06 19:52:30 +02:00
Antonio Vazquez 6f87a7ad9f GPencil: Fix unreported wrong Polyline bottom tooltip
It was mising the Wheelmouse option and the name of the tool was wrong.
2020-08-06 19:44:41 +02:00
Brecht Van Lommel 8123b12006 Fix T79586: "rendering paused" not shown when viewport render starts paused 2020-08-06 19:19:22 +02:00
Vincent Blankfield 8fbfc150a0 Fix T77885: crash rendering grease pencil from compositor with multiple scenes 2020-08-06 19:19:22 +02:00