Commit Graph

103510 Commits

Author SHA1 Message Date
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
Campbell Barton d30320b4f5 Merge branch 'blender-v2.92-release' 2021-02-04 11:22:11 +11:00
Campbell Barton 3f90c11621 Fix T85318: Driver variable don't resolve collection indices
The driver variable `splines[0]` (on a curve)
behaved as if the path was `splines`.

Resolve pointers was well as properties as it's supported by the caller.

Error in original commit that added property support
82b0a9e369.
2021-02-04 11:19:09 +11:00
Campbell Barton d85c5accec Cleanup: unused function warning 2021-02-04 10:01:19 +11:00
Wayde Moss 0352546cdd NLA: Fix nlasnapshot_blend() Misplaced Null Check
From original commit: rB40b7929cc040
2021-02-03 17:35:21 -05:00
Wayde Moss 40b7929cc0 NLA: Extract nlasnapshot_blend()
Refactor
//nlastrip_evaluate_actionclip()// and //nlaeval_blend_value()// into
//nlasnapshot_blend()//, //nlastrip_evaluate_actionclip()//,
//nlasnapshot_from_action()//.

**Motivations**:
* {T83615} Requires reading all pose bone fcurves before being able to
apply pre-blend transforms. The function //nlasnapshot_from_action()//
achieves this. This effectively removed the need to specially handle
Quaternion blend queuing so that code has been removed.

* {D8296} Adds support for keyframe remapping through an upper stack of
strips. Instead of introducing a variant of the form:
//nlastrip_evaluate_actionclip_inverted_get_lower()//,
//nlastrip_evaluate_actionclip()// will later be extended to take an
`evaluation_mode` as input to avoid duplicating the recursion functions
related to //nlastrip_evaluate()//.

* //nlasnapshot_blend()// will eventually have variants of
//nlasnapshot_blend_get_inverted_lower_snapshot()// and
//nlasnapshot_blend_get_inverted_upper_snapshot()// which are all
independent of NlaStrips and NlaTracks, further simplifying the
blending implementation. Ideally, //nlastrip_evaluate()// would get
renamed to //nlasnapshot_blend_strip()// but that'll be a later patch
to avoid unnecessary patches slowing the review of more important
patches.

No User-side Functional changes

Reviewed By: sybren, #animation_rigging

Differential Revision: https://developer.blender.org/D10220
2021-02-03 16:45:53 -05:00
Wayde Moss 264af1519e NLA: Fix Strip Truncate When Next to Transition
**Problem**:
Translating a strip will truncate it when next to a transition.

**Solution**:
The code only accounted for the prev/next strip for whether it exceeds.
When it was a transition, the exceed logic fails. Now, we use the
nearest non-transition strip instead.

Reviewed By: sybren, #animation_rigging

Differential Revision: https://developer.blender.org/D10083
2021-02-03 16:19:07 -05:00
Pablo Dobarro 70371299ae Merge branch 'blender-v2.92-release' 2021-02-03 21:06:56 +01:00
Pablo Dobarro ebd2aa789e Fix T85230: Face Set Boundary automasking not working with dyntopo
Dyntopo does not have Face Sets implemented yet, so the entire mesh is
considered a single Face Set. In that case, the check unique face set
function should always return true.

Reviewed By: JacquesLucke

Maniphest Tasks: T85230

Differential Revision: https://developer.blender.org/D10259
2021-02-03 21:05:48 +01:00