Commit Graph

116002 Commits

Author SHA1 Message Date
Brecht Van Lommel
b8064e3312 Build: add HIP version to buildbot configuration 2022-06-28 16:54:45 +02:00
Christian Rauch
bd6912930f Build: when using Wayland, always enable EGL and disable system GLEW
GLEW does not support GLX and EGL at the same time, and the distribution version
is likely to have GLX.

This also refactors the code so all OpenGL related CMake options are together.

Differential Revision: https://developer.blender.org/D12034
2022-06-28 16:54:45 +02:00
Bastien Montagne
614aa9d8ec Py API Doc: add runtime changelog generation to sphinx_doc_gen.py.
Optionally use `sphinx_changelog_gen.py` to dump current version of the
API in a JSON file, and use closest previous one listed in given index
file to create a changelog RST page for Sphinx.

Part of {T97663}.
2022-06-28 16:53:12 +02:00
Bastien Montagne
f9f73473d6 Py API Doc: refactor changelog generation script.
Main change is to make it use JSON format for its dump files, instead of
some Python code.

It also introduces an index for those API dump files, mapping a blender
version to the relevant file path.

This is then used to automatically the most recent (version-number wise)
previous API dump to compare against current one, when generating the
change log RST file.

Part of {T97663}.
2022-06-28 16:52:46 +02:00
Richard Antalik
b585872450 Fix frame_final_start/end strip property not setting handle position
This was a mistake in 17a773cdcee9 - I did not notice existing set
function and assumed, that property set DNA directly.

Both get and set functions are now available and readonly flag is
removed.
2022-06-28 15:58:08 +02:00
Brecht Van Lommel
d5dcbabdd2 Build: remove GLEW version checking from install_deps.sh
Latest OpenSubdiv builds without GLEW by default, which is also what we do
for precompiled libraries. So there is no need for compatibility checking
with system GLEW.

Additionally WITH_SYSTEM_GLEW is turned off by default for Blender, and this
logic was presumably added when it was still on by default a few years ago.

Also remove outdated mention of glew-mx, we use intern/glew-mx and no
external library for this.

Differential Revision: https://developer.blender.org/D15281
2022-06-28 15:57:06 +02:00
luzpaz
4d982cbb5d Cleanup: fix various typos
Differential Revision: https://developer.blender.org/D15304
2022-06-28 15:56:16 +02:00
Bastien Montagne
0124de9d0e Install_deps: Fix several issues with TBB.
* TBB MEX version is now 2021, since this versin introduces 'oneTBB'
  which brings a lot of incompatibilities with previous versions.
* Fix several typos and mistakes in OSD, Embree and OIDN build code that
  prevented proper usage of a local TBB build.
2022-06-28 15:47:41 +02:00
Jacques Lucke
c96f2778f0 Fix: sampling points on mesh surface generates too many points 2022-06-28 13:13:41 +02:00
Jacques Lucke
dfea5e24ad BLI: add kdtree range search method that accepts c++ lambda
This is easier to use in C++ code compared to passing a function
and user-data separately.
2022-06-28 13:13:41 +02:00
Sergey Sharybin
c1ffea157c Mask editor: Always use smooth drawing
The mask is expected to be always be displayed smooth, and the
option mainly existed for some legacy drivers. IF smooth drawing
causes issues it should be fixed in the drawing code, not as an
option in the interface.

Differential Revision: https://developer.blender.org/D15266
2022-06-28 10:55:45 +02:00
Julian Eisel
f9076f3869 Cleanup: Remove redundant theme versioning code
Since we reset the default theme for the 3.0 release, we don't need to
keep these version patches around anymore.

Ref D13131
2022-06-28 16:07:30 +10:00
Philipp Oeser
33fc230ba2 Fix T98799: camera unselectable in camera view below a certain scale
The camera frame (used for selection) was drawn outside the near
clipping plane in those cases.

This has been an issue before as seen in the following commits:
- rB6e7e6832e87
- rB33d322873e6
- rB4f9451c0442

Remaining issue was that the code which ensure the frame isn't behind
the near clipping plane was not taking into account the camera could be
scaled (in Z).
A caller of `BKE_camera_view_frame_ex` (namely
`OVERLAY_camera_cache_populate`) applies scale (also on the depth) which
does not play well with the way `BKE_camera_view_frame_ex` did it.

Now take Z scale into account.

Ref D15178
2022-06-28 15:54:02 +10:00
Red Mser
e6d50cdd43 Fix textview selection rendering in front of text
Selection of Python Console renders in front of the text.
Since the default theme uses a low opacity selection color,
it isn't obvious, but increasing alpha to 100% shows it clearly.

Ref D13111
2022-06-28 15:20:06 +10:00
Campbell Barton
ca9e1f6391 Cleanup: replace magic number with define for scan-code/key-code offset 2022-06-28 14:43:37 +10:00
Campbell Barton
dd95deadf3 GHOST/Wayland: avoid creating a keyboard-state each key press/release
Instead, create keyboard two states when the keyboard layout is set
(one with & one without num-lock pressed).
This avoids key-press lookups having to check if num-lock exists and
setting the keyboard state for key press & release events.

No functional changes.
2022-06-28 14:35:14 +10:00
Campbell Barton
fd7c070861 Fix T96170: keys mis-mapped with NeoQwertz layout under Wayland
Accessing the symbols for keys with no modifiers & num-lock enabled
has unintended consequences for some keyboard layouts that use this
to switch layers.

Resolve by restricting num-locked lookups to keys typically toggled
with num-lock (key-pad home, page up/down ... etc).
2022-06-28 13:48:05 +10:00
Campbell Barton
40cd041f74 Cleanup: group wayland event codes in their own doxy section
Also don't pass typedef'd ints as references.
2022-06-28 12:01:29 +10:00
Campbell Barton
b8cc181808 Fix T99202: AccentGrave key doesn't work with Wayland
Implement scan-code fallback when the scan-code used for AccentGrave
on US keyboards doesn't map to a key known to GHOST.

Without this, shortcuts that use AccentGrave are inaccessible and the
key does nothing.

This matches functionality from X11, see [0].

[0]: f3427cbc981e5ad530d1a73ab4ecbf6b64751774
2022-06-28 11:31:12 +10:00
Keith Boshoff
b910114384 UI: add Custom properties panel to collections
Show a custom properties panel in the collections tab,
matching other data-blocks which already support this.

Reviewed by: HooglyBoogly, campbellbarton

Ref D12598
2022-06-28 10:52:31 +10:00
Campbell Barton
381fe684e2 GHOST: only use GHOST_PRINT when WITH_GHOST_DEBUG is enabled
Revert part of [0] so only assert behavior is changed.

[0]: 9b5dda3b07496bda28970dfd23e4951a76d0f8ed
2022-06-28 10:16:28 +10:00
Campbell Barton
65f4f50640 Cleanup: compiler warnings, remove unused functions 2022-06-28 10:13:24 +10:00
Chris Blackbourn
7a44f62bdb Fix T99156: UV parameterizer respects both Pins and Seams
Rgression from: e6e9f1ac5a2d

Reviewed By: Brecht Van Lommel

Differential Revision: D15292
2022-06-28 10:46:10 +12:00
Germano Cavalcante
317dfc1735 Fix T96776: Assets dropped upside down when looking through camera
In perspective mode the snap point direction needs to be taken into
account to define which side of the face is being looked at.

If there is no face under the mouse cursor, there is no direction
adjustment and the element normal will be used.
2022-06-27 19:00:24 -03:00
Richard Antalik
17a773cdce Fix T99216: RNA startdisp and enddisp return unreliable values
Since 7afcfe111aac `startdisp` and `enddisp` fields are used as runtime
position storage for effect strips exclusively.

Use getter functon to return handle position and make properties read
only.
2022-06-27 22:22:18 +02:00
Richard Antalik
36348bf4fc Fix error in previous commit - missed include 2022-06-27 22:17:59 +02:00
Richard Antalik
8eef98710b Fix meta strip has incorrect range when created
Caused by using `startdisp` and `enddisp` to initialize range.
Use handle position instead.
2022-06-27 22:06:07 +02:00
Germano Cavalcante
67e23b4b29 Fix T84369: Fluid: Missing cache invalidation when properties on non-domain objects change
The `DEG_OB_COMP_TRANSFORM` and `DEG_OB_COMP_GEOMETRY` relations between
the **Domain** object and the **Flow**, **Effector** and **Force Field** objects
are added in the `updateDepsgraph` callback of the Fluid modifier, more
specifically in `DEG_add_collision_relations`.

The node linked to these components is the `POINT_CACHE` whose assigned
function is `BKE_ptcache_object_reset`.

So include the `eModifierType_Fluid` modifier in outdated cache checks.

Reviewed By: sergey, zeddb

Maniphest Tasks: T84369

Differential Revision: https://developer.blender.org/D15210
2022-06-27 16:54:23 -03:00
Joseph Eagar
a571c74e10 Sculpt: Fix backwards normals in PBVH_GRIDS raycasting
Winding order of grid quads was backwards.
2022-06-27 11:16:05 -07:00
Clément Foucault
31ebe8982e BLI: Math: Add ceil_to_multiple_u()
Standalone version of a function added to `BLI_math_vector.hh`.
2022-06-27 20:06:32 +02:00
Félix
6b35d9e6fb VSE: Add API function to select displayed meta strip
Use function `sequence_editor.display_stack(meta_strip)` to set
displayed timeline content.

To view top-level timeline, that does not belong to any meta strip, pass
`None` as argument.

Differential Revision: https://developer.blender.org/D12048
2022-06-27 19:44:16 +02:00
Brecht Van Lommel
a2b9b9d3c4 Fix broken build on macOS after recent changes 2022-06-27 17:29:24 +02:00
Richard Antalik
f0a3d2beb2 FFmpeg: Add VFR media support
Variable frame rate (VFR) files have been difficult to work with.
This is because during sequential decoding, spacing between frames is
not always equal, but it was assumed to be equal. This can result in
movie getting out of sync with sound and difference between preview and
rendered image. A way to resolve these issues was to build and use
timecodes which is quite lengthy and resource intensive process. Such
issues are also difficult to communicate through UI because it is not
possible to predict if timecode usage would be needed.

With this patch, double buffer is used to keep previously decoded frame.
If current frame has PTS greater than what we are looking for, it is not
time to display it yet, and previous frame is displayed instead.

Each `AVFrame` has information about it's duration, so in theory double
buffering would not be needed, but in practice this information is
unreliable.

To ensure double buffer is always used, function
`ffmpeg_decode_video_frame_scan` is used for sequential decoding, even
if no scanning is expected.

This approach is similar to D6392, but this implementation does not
require seeking so it is much faster. Currently `AVFrame` is only
referenced, so no data is copied and therefore no overhead is added.

Note: There is one known issue where seeking fails even with double
buffering: Some files may seek too far in stream and miss requested
PTS. These require preseeking or greater negative subframe offset

Fixes: T86361, T72347

Reviewed By: zeddb, sergey

Differential Revision: https://developer.blender.org/D13583
2022-06-27 16:58:07 +02:00
Julian Eisel
6f7171525b File Browser UI: Use "Widget" font style instead of "Widget Label"
It didn't make much sense to use the "Widget Label" font style here,
since this is just regular text, not labels for widgets. Checked with
@pablovazquez and we agreed on using the "Widget" font style instead.

Also fixes a mismatch where we used the "Widget Label" font style for
drawing, but the "Widget" font style for string width calculations.
Fixes T99207.
2022-06-27 16:18:57 +02:00
Sonny Campbell
64a3a11e19 Fix T98055: Library Filters do not work in Source Files
The fix is to ensure the filter for id type is run when displaying
assets from an Asset Library.

In the current implementation the id_type filter does not run if a blend
file is opened that also happens to be in an Asset Library directory. If
we have opened a blend file that is in an Asset Library directory, we
now use the same filtering check as for the "Current File" asset
library.

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

Reviewed by: Julian Eisel
2022-06-27 16:09:38 +02:00
Harley Acheson
6243972319 UI: Scrollbar Behavior Changes
Changes to scrollbars so that they are always visible, but thin and
dim, and widen and become more visible as your mouse approaches.

See D6505 for details and examples.

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

Reviewed by Campbell Barton
2022-06-27 06:46:29 -07:00
Pratik Borhade
279e7dac7d Fix T99070: Apply transform fails to clear delta transform values
Clear delta transform value after applying transform.
Include delta location while applying transform.
Use `copy_v3_fl` for resetting object scale

Reviewed By: mano-wii

Maniphest Tasks: T99070

Differential Revision: https://developer.blender.org/D15270
2022-06-27 10:38:34 -03:00
Julian Eisel
83c2cbb880 Cleanup: Use assert instead of early exit for asset dragging internals
Instead of failing silently, throw a failed assert in debug builds.
2022-06-27 15:36:25 +02:00
Julian Eisel
36f5967b99 Fix T93650: Asset drag into catalogs broken, Industry Compatible keymap
Issue was that the Industry Compatible keymap wouldn't select files on a
mouse press, and since the dragged items are determined by the
selection, nothing would be considered as dragged.

Selecting items on mouse press happens since c606044157a3. I haven't
heard of that issue happening in the Industry Compatible keymap. But if
it did happen, it should be fixed too now.
2022-06-27 15:36:25 +02:00
Harley Acheson
228d79b789 Revert 6de0f299505a: BLF: Support for Variable Fonts
Reverting for now, breaks on GCC
2022-06-27 06:32:30 -07:00
Harley Acheson
6de0f29950 BLF: Add Support for Variable Fonts
Add support for Variable/Multiple Master font features. These are fonts
that contain a range of design variations along multiple axes. This
contains no client-facing options.

See D12977 for details and examples

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

Reviewed by Brecht Van Lommel
2022-06-27 06:07:55 -07:00
Hans Goudey
151fc2fcd8 Fix T99171: Crash in mesh vertices positions RNA update function
Solution found by Philipp Oeser (@lichtwerk), thanks.
2022-06-27 08:01:54 -05:00
Campbell Barton
6a2c42a0d5 Cleanup: remove redundant RNA_struct_property_is_set check
This dates back to [0] from before PROP_SKIP_SAVE existed.
While harmless it's confusing why only one option uses this check.

[0]: ff83a98a07c3d55eac03ebd903ad7a0c3e6c33b4
2022-06-27 21:35:32 +10:00
Clément Foucault
2b806cb955 Cleanup: DRW: Remove drw_view renaming MACROS 2022-06-27 12:46:47 +02:00
Kévin Dietrich
ddc6b86a5b Fix color attribute interpolation with GPU subdivision
Handling of 16-bits compression was missing, which gave values that were
way off.
2022-06-27 12:39:39 +02:00
Campbell Barton
a617929683 Cleanup: rename misleading/inconsistent GHOST types
Remove mask suffix from:
- GHOST_TButtonMask
- GHOST_TModifierKeyMask
.. neither are used as bit-masks.

Remove 'Grab' from:
- GHOST_kGrabAxisNone
- GHOST_kGrabAxisY
.. matching the existing GHOST_TAxisFlag & GHOST_kAxisX.
2022-06-27 20:36:40 +10:00
Campbell Barton
3cf6516e7b Cleanup: format 2022-06-27 20:27:34 +10:00
Jason Fielder
9130a60d3d MTLCommandBufferState for coordinating GPU workload submission and render pass coordination.
MTLFrameBuffer has been implemented to support creation of RenderCommandEncoders, along with supporting functionality in the Metal Context.

Optimisation stubs for GPU_framebuffer_bind_ext has been added, which enables specific assignment of attachment load-store ops at the bind level, rather than on a framebuffer object as a whole.

Begin and end frame markers are used to encapsulate frame boundaries for explicit workload submission. This is required for explicit APIs where implicit flushing of work does not occur.

Ref T96261

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D15027
2022-06-27 11:45:49 +02:00
Campbell Barton
7b6b740ace Cleanup: spelling in comments 2022-06-27 17:29:57 +10:00
Campbell Barton
e1c0d18598 Cleanup: remove redundant has key checks 2022-06-27 17:25:07 +10:00