Commit Graph

103518 Commits

Author SHA1 Message Date
Sergey Sharybin b4dca4ea2c Cleanup: Use raw string literal
Resolves modernize-raw-string-literal Clang-Tidy warning

The way warning works is it suggests to use raw literal when
overhead of having escape characters is higher than the overhead
of having raw literal syntax (talking about code size overhead).
This means that the warning will not trigger for "foo\"bar".

Differential Revision: https://developer.blender.org/D10322
2021-02-05 16:43:23 +01:00
Sergey Sharybin 5ec4ba8080 Cleanup: Use lambda instead of function bind
More detailed explanation why it is a preferred way of coding
nowadays can be found at

https://clang.llvm.org/extra/clang-tidy/checks/modernize-avoid-bind.html

Resolves modernize-avoid-bind Clang-Tidy warning.

Differential Revision: https://developer.blender.org/D10320
2021-02-05 16:43:23 +01:00
Jacques Lucke a0867f05a4 DNA: support structs with a size of 1 or 2 bytes.
Before the smallest possible dna struct size was 4 bytes.

Differential Revision: https://developer.blender.org/D10287
2021-02-05 16:24:46 +01:00
Sebastián Barschkis e8a5744cda Merge branch 'blender-v2.92-release' 2021-02-05 16:24:03 +01:00
Sebastián Barschkis a563775649 Fluid: Updated Mantaflow source files
This updates fixes the following issues (critical for 2.92):

- Issue that prevented dense 'int' grids from being exported (incorrect clip value)
- Issue with particles outside out of domain bounds (position between -1 and 0) not being deleted
2021-02-05 16:23:02 +01:00
Richard Antalik 66923031e6 Cleanup: Minimize seq->tmp usage
Using this persistent field in `select_more_less_seq__internal` was
inapropriate in this case.

Split select more/less and linked code, because it was mixed in
`select_more_less_seq__internal()`
These operators work in completely different way.
`select_linked_internal()` doesn't use seq->tmp at all.

`seq->tmp` was used to mask strips selected by operator while iterating.
Use GSet to store temporary data instead of `seq->tmp`.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D10326
2021-02-05 16:21:58 +01:00
Jacques Lucke 16abe9343a Geometry Nodes: add Volume to Mesh node
This node takes a volume and generates a mesh on it's "surface".
The surface is defined by a threshold value.

Currently, the node only works on volumes generated by the
Points to Volume node. This limitation will be resolved soonish.

Ref T84605.

Differential Revision: https://developer.blender.org/D10243
2021-02-05 16:20:14 +01:00
Jacques Lucke 46e0efb462 Geometry Nodes: support fixed pivot axis in Align Rotation to Vector node
When the pivot axis is not set to auto, the node will try to align the rotation
to vector as best as possible, given the selected rotation axis.

Ref T85211.

Differential Revision: https://developer.blender.org/D10292
2021-02-05 16:10:54 +01:00
Sergey Sharybin 56903024dc Cleanup: Use transparent functor
Resolves modernize-use-transparent-functors Clang-Tidy warning.

Differential Revision: https://developer.blender.org/D10323
2021-02-05 15:39:50 +01:00
Victor-Louis De Gusseme 4d39a0f8eb Geometry Nodes: Add Attribute Proximity Node
This node calculates a distance from each point to the closest position
on a target geometry, similar to the vertex weight proximity modifier.
Mapping the output distance to a different range can be done with an
attribute math node after this node.

A drop-down changes whether to calculate distances from points,
edges, or faces. In points mode, the node also calculates distances
from point cloud points.

Design task and use cases: T84842

Differential Revision: https://developer.blender.org/D10154
2021-02-05 08:28:31 -06:00
Ankit Meel 7054d03701 Cleanup: Clang-tidy modernize-use-default-member-init
Using assignment syntax as we don't use `{}` initialization yet.

Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9501
2021-02-05 19:09:36 +05:30
Sebastian Parborg be636f72dc Cleanup: Remove LibAV support
Ubuntu and Debian dropped libav in 2015 in favor of ffmpeg.
Development stopped of libav in 2018, so it should be save to remove.
2021-02-05 14:30:35 +01:00
Jeroen Bakker 6b4cd92e4d Merge branch 'blender-v2.92-release' 2021-02-05 13:07:14 +01:00
Jeroen Bakker 4212ea7b7d Fix T85260: Viewport render does not draw background
Regression introduced by {rBed809866b172} where overlays weren't drawn
when overlays are turned off. The background in wireframe, solid
(always) and material preview and render preview (when not using scene
world) are also part of the overlays.
2021-02-05 13:05:58 +01:00
Philipp Oeser 8c0b0b7c96 Merge branch 'blender-v2.92-release' 2021-02-05 12:46:42 +01:00
Philipp Oeser 0a546beb1f Fix T85396: Display Texture Paint UV only working in editmode
Caused by rBf83aa830cd00.

Since above commit, only meshes in editmode were considered for drawing
(because
BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs was
used), but the option needs to work for texture paint mode as well, so
use BKE_view_layer_array_from_objects_in_mode_unique_data instead on
pass the draw_ctx->object_mode.

note: there is no good filter_fn to check if we have UVs if mesh is not
in editmode, this shouldnt cause much of a performance hit though.

Maniphest Tasks: T85396

Differential Revision: https://developer.blender.org/D10319
2021-02-05 12:43:00 +01:00
Campbell Barton 606805d1b7 Cleanup: use 'r_' prefix for return arguments, order last 2021-02-05 22:34:03 +11:00
Campbell Barton f8cbd333d6 Cleanup: outdated/unhelpful comments 2021-02-05 22:33:27 +11:00
Richard Antalik f21b4e69b0 Fix T82973: Strips overlap after transforming
When transforming multiple strips to limits of sequencer timeline they get
squashed into one channel.

Store selection minimum and maximum channel in TransSeq and limit
transformation so no strip can be transformed beyond timeline boundary.

Reviewed By: Sergey, mano-wii

Differential Revision: https://developer.blender.org/D10013
2021-02-05 10:40:35 +01:00
Julian Eisel fa96aa5811 Fix missing preview images for actions when browsing in external files
When reading the preview images of external .blend files, action data-blocks
were not handled.
Preview support for actions was added in 2397ccc583.
2021-02-05 11:28:34 +01:00
Sergey Sharybin db40d5ed97 Cleanup: Modernize type definition in Alembic
Use newer `using` semantic for type definition.
Solves modernize-use-using Clang-Tidy warning.
2021-02-05 11:04:28 +01:00
Sergey Sharybin b6921506c9 Fix integer types in ImBuf leading to warnings
Replace `long long` with an explicit `int64_t`. This is also what is
used in the FFmpeg headers.

Fixes clang diagnostics warning about wrong format used in the log.

Should be no functional changes.
2021-02-05 10:58:44 +01:00
Bastien Montagne 600625794d install_deps: Add libharu.
Old lib available as packages everywhere, easy. ;)
2021-02-05 09:41:35 +01:00
Campbell Barton 38420f19b6 Cleanup: rename USER_ZOOM_{CONT->CONTINUE} improve comments
USER_ZOOM_CONT only had comments saying this was 'oldstyle',
remove these comments, add brief explanations of the zoom style
in the enum.
2021-02-05 17:04:14 +11:00
Campbell Barton f2bf5acd58 Keymap: use Shift-Tab to cycle backwards over edit-buttons
All modifiers were being checked, a hang-over from 2.4x
where this checked the modifier flag was non-zero.
2021-02-05 16:44:42 +11:00
Campbell Barton d975e19583 Cleanup: correct spelling in code 2021-02-05 16:30:49 +11:00
Campbell Barton 17e1e2bfd8 Cleanup: correct spelling in comments 2021-02-05 16:23:34 +11:00
Campbell Barton b62b923f54 Cleanup: replace inline loops with RNA_enum_from_identifier 2021-02-05 09:45:17 +11:00
Campbell Barton 7e850ffa73 Cleanup: cmake indentation, white-space 2021-02-05 09:45:16 +11:00
Bastien Montagne 94cf74afbb Cleanup/refactor: Undosys: Get rid of the magic values for undo direction.
Move `eUndoStepDir` to `BKE_undo_system.h` and use its values
everywhere.

Note that this also introduce the `STEP_INVALID` value in that enum.

Finally, kept the matching struct members in some lower-level readfile
code as an `int` to avoid having to include `BKE_undo_system.h` in a lot
of unrelated files.
2021-02-04 22:03:39 +01:00
Bastien Montagne 7d5640ee10 LibOverride: Improve/Fix issues in override resync process.
When we have a local override, its linked reference may not be detected
as needing to be overridden anymore.

In that case, if there is no actual override defined by the user, assume
that we can get rid of this local override as part of the resync
process, and use the linked data directly instead.
2021-02-04 19:23:10 +01:00
Sybren A. Stüvel 0f893656f4 Fix T85356: Dope Sheet not showing keyframes of Geometry Nodes graph
The animation filter wasn't following ID pointers to Node Trees yet.
2021-02-04 18:56:41 +01:00
Sybren A. Stüvel 2397ccc583 Animation: Add PreviewImage to bAction struct
Make it possible to attach a preview image to an Action.

In the #asset_browser_pose_libraries project, poses will be stored as
individual Action datablocks. Having a thumbnail for each pose is of
course essential.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D10306
2021-02-04 18:56:41 +01:00
Nathan Craddock e027d93ab0 Merge branch 'blender-v2.92-release' 2021-02-04 10:40:35 -07:00
Nathan Craddock 7fb540b4cf Fix T85357: Setting collection color restricted to View Layer mode
Allow setting collection color in Scenes and Blender File outliner
display modes in addition to View Layer mode.
2021-02-04 10:38:44 -07:00
Jacques Lucke e7af04db07 Geometry Nodes: new Is Viewport node
This node outputs true when geometry nodes is currently evaluated
for the viewport and false for final renders.

Ref T85277.

Differential Revision: https://developer.blender.org/D10302
2021-02-04 16:36:34 +01:00
Bastien Montagne 95703d19e0 Liboverride: clean-up/sanitize tagging of root overrides.
now do this in utils that also handle the hierarchy tagging, doing it in
caller code is prone to errors.

Issue reported by @sebbas, thanks.
2021-02-04 16:15:16 +01:00
Sebastián Barschkis 07f7483296 LibOverride: Added log statements in liboverride operator functions
As discussed in D10301.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D10303
2021-02-04 15:11:42 +01:00
Sebastián Barschkis bd973dbc44 LibOverride: Only show relevant operators in outliner menu
No need to show certain operators when they have no functionality.

For example, when adding a library override from the outliner menu, there should only be an option to add one (i.e. reset, delete, resync operators not relevant for objects without library override).

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D10301
2021-02-04 15:09:12 +01:00
Germano Cavalcante 4ef8033116 Merge branch 'blender-v2.92-release' 2021-02-04 10:50:43 -03:00
Germano Cavalcante 760a16b88b Fix for 3D view transform: flipped rotation direction for numeric input
The rotation direction was flipped recently.

This meant that rotation on a single axis gave negative results compared
with previous Blender releases.

This partially reverts a9b53daf23.

Differential Revision: https://developer.blender.org/D10299
2021-02-04 10:43:57 -03:00
Johannes Jakob bec08621d6 Fix T85363: Cmd + Tab shortcut overridden on macOS
Adds an exception so that the key-binding `control + Tab` does not get
duplicated as `command + Tab` on macOS because this is a global system
shortcut for the app switcher.

The key-binding `command + Tab` was shown for the operators “Toggle
Graph Editor“ and “Toggle Dope Sheet” in Dope Sheet and Graph Editor,
but only `control + Tab` actually worked.

Differential Revision: https://developer.blender.org/D10304
2021-02-04 14:27:44 +01:00
Campbell Barton 3be5859b21 Cleanup: pass keymap items as const where possible 2021-02-04 22:21:10 +11:00
Jacques Lucke dff51d418a Fix: window manager can reference scenes and workspaces
This also fixes T83592 for me.

Differential Revision: https://developer.blender.org/D10046
2021-02-04 11:31:01 +01:00
Campbell Barton 4895d1f9ce Cleanup: replace '_imp' function suffix with '_impl'
Use the more common abbreviation for `implementation`.
2021-02-04 13:10:29 +11:00
Campbell Barton 54cb9e1d79 PyAPI: correct docstring 2021-02-04 13:10:29 +11:00
Harley Acheson 492e64c7bc UI: Win32 Child Windows On Top
Win32 child windows on top of parents. Short-term solution of forcing is_dialog when owned.

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

Reviewed by Brecht Van Lommel
2021-02-03 17:51:19 -08:00
Harley Acheson 261fa052ac UI: Win32 Window Creation Refactor
Simplification of Win32 GHOST_WindowWin32 with improved support for owned windows.

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

Reviewed by Brecht Van Lommel
2021-02-03 17:44:24 -08:00
Ankur Deria 1ad1ecf1c9 Fix T79822: Custom preset casing not preserved
When adding a new preset the name would be converted to lower case and
then displayed in the interface in title case. This was confusing
because the name didn't reflect what was typed, and there are many cases
when the name shouldn't be forced into title case (like 8K UHDTV for
example).

This commit leaves the custom preset names in the original casing, and
removes the conversion of filenames to title case for preset lists.

Differential Revision: https://developer.blender.org/D10224
2021-02-03 17:48:39 -07:00
Nathan Craddock 01d49d1542 Presets: Cleanup preset naming
Before committing D10224, bundled preset names that are lowercase need
updating to title case for display in the UI. This changes several of
the preset file names to title case, and fixes a couple of other naming
issues in the preset names. A few strings in the code are also changed
to reflect the new filename of the Blender keymap.
2021-02-03 17:34:27 -07:00