Commit Graph

129979 Commits

Author SHA1 Message Date
Campbell Barton
f533fade0f Merge branch 'blender-v4.0-release' 2023-11-06 20:58:21 +11:00
Campbell Barton
27bb822511 Cleanup: remove unused variable 2023-11-06 20:58:11 +11:00
Campbell Barton
c7afbbc836 Fix potential buffer overflow in strcpy use on macOS
The null byte wasn't taken into account when allocating memory
to strcpy into.

The calculation to check if allocation was needed  was also wrong,
causing allocation for every string.

In practice it's not so likely users would ever hit this since
the function tended to over allocate, even in the case an off by one
error occurred, in all likelihood the room would already be available.

Ref !114512
2023-11-06 20:54:21 +11:00
Omar Emara
99712d17fd Merge branch 'blender-v4.0-release' 2023-11-06 11:49:24 +02:00
Omar Emara
54e35e7388 Nodes: Draw using draw_color_simple as a fallback
If the draw_color method is not defined, try to use draw_color_simple as
a fallback. If not defined either, fallback to a magenta color.

The patch also updates the description of the method to clarify its use.

Pull Request: https://projects.blender.org/blender/blender/pulls/114527
2023-11-06 10:47:32 +01:00
Richard Antalik
fe4f895214 Merge branch 'blender-v4.0-release' 2023-11-06 06:09:38 +01:00
Richard Antalik
0ca1e70de1 Fix #114434: Separate Images operator produces duplicate strips
Caused by typo - it has assigned `SEQ_SINGLE_FRAME_CONTENT` to `seq`,
while it should have been assigned to `seq_new`.
2023-11-06 06:08:52 +01:00
Richard Antalik
6eab42555c Cleanup: VSE cache drawing
Use `sequencer_visible_strips_get()` to iterate over strips, refactor
the code, so background drawing has own function and de-duplicate the
code.
2023-11-06 05:07:39 +01:00
Richard Antalik
2add7c9f78 Cleanup: Remove unnecessary typedefs 2023-11-06 04:21:09 +01:00
Richard Antalik
18ac16e592 Cleanup: VSE strip drawing readability
Decouple strip ordering logic from iteration.
2023-11-06 03:47:16 +01:00
Richard Antalik
41e030d2a5 Cleanup: Refactor VSE strip highlighting
Selected active strip highlights effect inputs and input channels for
multicam strips. This was done as 3rd pass in `draw_seq_strips()`.
4th pass was highlighting strip when doing solo preview.

Now this is added to a column of functions in `draw_seq_strip()`.

Highlighting effect input and solo preview is done when drawing actual
highlighted strip, but this is still done via alpha blending.

Highlighting multicam has to be done as alpha blending since this is
done by drawing rectangle over whole channel.
2023-11-06 03:10:19 +01:00
Richard Antalik
7673fc7d53 Cleanup: VSE: Strip drawing code readability
Originally code iterated twice over whole listbase with a lot of
preconditions to draw unselected, then selected strips.

Use `sequencer_visible_strips_get()` to get vector of visible strips,
split iteration in 2 separate loops.
Also move `special_seq_update` case to own function.
2023-11-06 02:20:42 +01:00
Richard Antalik
3fccfe0bc6 VSE: Use C++ containers for strip iteration
Use `VectorSet`, `Vector` or `Span` instead of `SeqCollection` struct.
It is now possible to use native `for` loops and `SEQ_ITERATOR_FOREACH`
macro can be removed.

Another feature is, sets of strips no longer needs to be freed. However,
this poses a limitation, that query functions can not be used in case,
where these sets need to be available outside of scope where they are
created.

Pull Request: https://projects.blender.org/blender/blender/pulls/111909
2023-11-06 01:36:44 +01:00
Campbell Barton
93f6001683 Cleanup: use explicit global/local naming for walk flags
Also remove the "Global" prefix from the modal key-map items
as this takes space in the status text.
2023-11-06 09:45:22 +11:00
Campbell Barton
b66378bf00 Cleanup: use "g_" prefixed static walk variables, enable strict flags 2023-11-06 09:45:22 +11:00
Campbell Barton
361bd68f21 Fix error in recent cleanup to walk mode
[0] caused gravity not to work properly.

[0]: 1b3cfcc74f
2023-11-05 22:33:44 +11:00
Campbell Barton
02f0abe331 Cleanup: use full sentences as comments, blocks around case statements 2023-11-05 18:32:42 +11:00
Campbell Barton
1b3cfcc74f Cleanup: use enum types and improve argument naming for walk mode 2023-11-05 18:32:41 +11:00
Aaron Franke
c62009a6ac 3D View: add local up/down movement to walk navigation
Minor usability enhancement for the walk navigation mode. Previously
walk navigation had local movement for forward/back/left/right,
but only global movement for up/down.
This PR adds local up/down movement, bound to the R and F keys.

Ref: !111682
2023-11-05 17:23:59 +11:00
Douglas Paul
23e3f8f563 Fix: Correct order of nodes in the Mesh > Write menu
The ordering of geometry nodes in the menus is intended to be
alphabetic, but the new "Set Face Set" node was listed _after_ the
"Set Shade Smooth" node in the Mesh > Write menu. This fixes the order.

Pull Request: https://projects.blender.org/blender/blender/pulls/114475
2023-11-04 11:02:59 +01:00
Campbell Barton
b177f27e6f Cleanup: compile the match for reuse in UI_UL_list.filter_items_by_name 2023-11-04 16:53:49 +11:00
Campbell Barton
944905c394 CMake: mark X11 & openpgl variables as advanced 2023-11-04 16:41:26 +11:00
Campbell Barton
637fd13957 CMake: mark FFTW3_LIBRARY_{F,D} as advanced, update doc-string
Missed from [0].

[0]: 1015bed2fd
2023-11-04 16:41:24 +11:00
Campbell Barton
1a82019ba2 CMake: mark internal SSL deps variable as internal
_PYTHON_SSL_CERT_FILE_DEPS was showing up in CMake's options
when it's intended only as internal cache to track changes.
2023-11-04 16:41:22 +11:00
Campbell Barton
5d3f735fea CMake: remove "_" prefixed "LEVEL_ZERO_" variables
These look as if they were meant to be internal but they showed up in
configuration were the only way to configure level zero libraries.
2023-11-04 16:41:20 +11:00
Campbell Barton
efef0bac5f CMake: remove redundant white-space as part of multi-line strings 2023-11-04 16:41:19 +11:00
Campbell Barton
2b508f7ae3 Cleanup: cmake indentation 2023-11-04 16:41:18 +11:00
Campbell Barton
243516e1d3 Cleanup: quiet warning from missing include 2023-11-04 14:34:45 +11:00
Campbell Barton
ee3da7c26c Tests: add wrapper script to launch a graphical headless session
This wrapper script can be used instead of executing "blender"
to launch blender in it's own display server which is closed
when Blender quits.
The BLENDER_BIN environment variable is used to run Blender,
forwarding arguments & passing the exit-code back to the script.

This can be used to run automated graphical-tests while still being
in background (from a user perspective).
This has the advantage that windows don't popup in the foreground,
or on servers/VM's that aren't running a graphical session.
Running many Blender instances, each in their own display server
is also supported, allowing for tests to make use of multiple jobs.

Tested with graphical undo tests which have not yet been made part of
CTests (needs further investigation).

Currently this only supports WAYLAND however it can run on X11
since it launches it's own WAYLAND compositor instance for each
Blender session. The wrapper has been written with the intention of
adding support for other back-ends in the future (if practical).

Use the WESTON compositor since it's widely available and has a
headless server, any other WAYLAND-server could likely be used without
much trouble.
2023-11-04 14:29:38 +11:00
Campbell Barton
134393e846 Cleanup: spelling in comments 2023-11-04 14:08:13 +11:00
Campbell Barton
10e7d5da84 Cleanup: remove unused variables 2023-11-04 14:08:11 +11:00
Bastien Montagne
9b0ea21a5b USD: Fix Export progress report.
This progress report was utterly broken and useless when not exporting
animations, and not great either with animation export. This commit
fixes:
* Not generating any progress report when exporting a single frame.
* Assuming actual data export covers 100% of progress.

That last point is the biggest change, now actual export (be it
animated or still) only covers 75% of the whole range. The rest is used
to cover depsgraph building and updates (which can be noticiably slow
with big scenes), stage writing, etc.

Progression is still far from linear in time, but at least it gives
better feedback on actual progress of the whole export.

Pull Request: https://projects.blender.org/blender/blender/pulls/114416
2023-11-03 18:00:45 +01:00
Aras Pranckevicius
6833202ab3 PLY: improve import of custom vertex normals
Several improvements how PLY files containing vertex normals are imported:
- When they are present on a regular mesh, the code no longer sets
  all faces as "flat" (since that makes custom normals be ignored).
- When they are present on a pure point cloud (i.e. no faces),
  custom vertex normals are added as a float3 point domain attribute
  (ref #114371).
2023-11-03 17:41:27 +02:00
Sergey Sharybin
27faf83fff Merge branch 'blender-v4.0-release' 2023-11-03 15:41:29 +01:00
Sergey Sharybin
e623d07362 Fix missing relations built for camera referenced by markers
A missing part since PR #110139: the nodes and relations builders
needs to be in-sync and build the same objects. The relations builder
was missing relations building for camera referenced by markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114443
2023-11-03 15:41:05 +01:00
Miguel Pozo
e3d4db5ded Fix: EEVEE-Next: Planar display probe shader compilation 2023-11-03 15:26:19 +01:00
Philipp Oeser
16dd73b895 Merge branch 'blender-v4.0-release' 2023-11-03 15:11:09 +01:00
Philipp Oeser
e7ad3af301 Fix #114216: crash moving "instanced" NLA strips between tracks
Code tried to move such strips (using the same action on equal IDs such
as meshes or shapekeys) between tracks multiple times [even though they
were actually moved already] which could end up with the wrong track
index and things just went downhill from there.

So now skip strips we cannot find in the original track, saves
us from the whole codepatch about "Moving strip into track in the
requested direction".

Pull Request: https://projects.blender.org/blender/blender/pulls/114458
2023-11-03 15:10:32 +01:00
Jeroen Bakker
e77cf08b02 Cleanup: Vulkan: Replace FlagBits with Flags
Vulkan API uses Flags and FlagBits for enumerations. The FlagBits
contains the options that can be hold with the Flags data type.

This wasn't well understood at the beginning of the project and
the FlagBits where used where Flags should have been used. This cleanup
fixes this, improving the readability of the code where bit
manipulations where used.

Pull Request: https://projects.blender.org/blender/blender/pulls/114459
2023-11-03 14:42:12 +01:00
Jeroen Bakker
e2215fea35 Vulkan: Specify Pipeline Stages When Adding Barriers
This PR adds support to specify pipeline stages when adding barriers.
This would make it possible more carefully specify barriers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114457
2023-11-03 14:24:39 +01:00
Jeroen Bakker
2193bd4b89 Fix #114414: Drawing Artifacts Grayscale Byte Images
Single channel JPEG files are stored in 4 channels image buffers, with their
bit planes set to 8.

When creating the GPU texture the number of bit planes is used to identify
if the data could be stored as a single channel texture, but in this case
the source data contains 4 channels and doesn't align with the GPU
texture format.

In Blender 3.6 the way how bit planes were stored changed (the planes
used to be 32 for the grayscale byte images matching the number of channels,
but now is set to 8, matching the original loaded image).

Since Blender 3.5 the grayscale byte images are uploaded using a single channel
GPU format, which leads to the mentioned artifacts. Grayscale byte buffers never
seems to have worked since its introduction in
https://archive.blender.org/developer/D15484

This PR disables using the grayscale GPU textures when it sourced from
a byte image.

Pull Request: https://projects.blender.org/blender/blender/pulls/114441
2023-11-03 13:54:05 +01:00
Bastien Montagne
d6e1a6d616 Merge branch 'blender-v4.0-release' 2023-11-03 13:01:07 +01:00
Bastien Montagne
9c2164ba7c Fix #114430: UI: Blender no longer displays a warning for too new .blends
Root of the issue was that a1d7ec7139 (from !110109, new comptibility
handling) missed to update code of `handle_subversion_warning`, file
version numbers should be checked here now, not the minversion ones.

On top of that, this report has been changed to a `RPT_WARNING` instead
of a `RPT_ERROR`, and reports 'print level' for file reading was set to
`WARNING` level way too late to have any effect in existing code...
2023-11-03 12:55:29 +01:00
Christoph Lendenfeld
794565ba0d Refactor: Rename functions in animrig to remove prefix
No functional changes.

Since the following functions are now in a C++ namespace, their prefix can be removed:
* ANIM_setting_get_rna_values -> get_rna_values
* ED_action_fcurve_find -> action_fcurve_find
* ED_action_fcurve_ensure -> action_fcurve_ensure

Pull Request: https://projects.blender.org/blender/blender/pulls/114450
2023-11-03 12:03:35 +01:00
Jeroen Bakker
747ec05f69 Cleanup: Make format 2023-11-03 12:00:38 +01:00
Clément Foucault
60df70b082 EEVEE-Next: Fix empty layers utiltex
This fixes interpolating of invalid data for
very high roughness.
2023-11-03 11:54:18 +01:00
Christoph Lendenfeld
cfb50a2e2e Cleanup: Comments in animrig
No functional changes.

For all the recently moved keyframing code I did the following:
* Remove comments that just repeat what the code is doing.
* Move comments for public functions to their location in the header file.
* Make sure comments are formatted properly with a capital letter at the start and a dot at the end.

Pull Request: https://projects.blender.org/blender/blender/pulls/114448
2023-11-03 11:53:42 +01:00
Bastien Montagne
d1e732a114 FFMPEG: Cleanup: Remove storage of last FFMPEG frame read as ImBuf in anim data.
The `anim` data (e.g. of a VSE sequence) would store the last frame read from
FFMPEG as an image buffer, increasing its refcounting and preventing it
to be freed until the whole `anim` data itself gets freed.

In current code, there is no reason to keep a reference to this image
buffer in the `anim` data, so removing it. This may also give a few
percent improvement on the memory usage of the VSE in some cases.

Found while investigating #114342.

Pull Request: https://projects.blender.org/blender/blender/pulls/114395
2023-11-03 11:18:21 +01:00
Christoph Lendenfeld
0f5e7c7469 Refactor: Move fcurve functions to animrig
No functional changes.

Moving the following two functions to animrig
`ED_action_fcurve_ensure`
`ED_action_fcurve_find`

Pull Request: https://projects.blender.org/blender/blender/pulls/114445
2023-11-03 11:15:27 +01:00
Bastien Montagne
ba37c59e13 Merge branch 'blender-v4.0-release' 2023-11-03 11:04:23 +01:00