Commit Graph

120055 Commits

Author SHA1 Message Date
Germano Cavalcante
1dd163c2f7 Fix: build error with 'WITH_CXX_GUARDEDALLOC' 2024-02-13 10:59:56 -03:00
Campbell Barton
2119d271e0 Cleanup: remove "-noaudio" argument in background mode
This is no longer needed as background mode implies -noaudio.
2024-02-14 00:13:38 +11:00
Campbell Barton
7c90018f23 CLI: make "-noaudio" implicit with "-b/--background"
Running background mode now behaves as if the "-noaudio" was passed in.

The -setaudio command now has a "Default" option which can be used
in the rare cases audio playback is desired in background mode. e.g.

  blender --background -setaudio Default

Ref !118192
2024-02-14 00:13:37 +11:00
Pratik Borhade
2b02d6c1e2 GPv3: Include hide/reveal operators in layer menu
Similar to gpv2 layer panel, add these operators in gpv3 layer popup
menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/118199
2024-02-13 13:48:36 +01:00
Omar Emara
749768db5b Merge branch 'blender-v4.1-release' 2024-02-13 14:34:13 +02:00
Omar Emara
0c9df3d470 Fix: Image does not update when file path changes
Images do not update in the compositor and other places when their file
path changes or their generated options change. This is because the
compositor relies on depsgraph updates, which weren't tagged in this
case. Fix this by tagging appropriately in RNA.

Pull Request: https://projects.blender.org/blender/blender/pulls/118187
2024-02-13 13:31:49 +01:00
Philipp Oeser
cb37fe751b Fix #118184: crash deleting a material output node
Caused by 7e8fd2cc2c

Code added in above commit didnt take into account that we might have no
output node in the tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/118202
2024-02-13 13:07:27 +01:00
Bastien Montagne
d2fbfe0ec0 Merge branch 'blender-v4.1-release' 2024-02-13 12:57:50 +01:00
Bastien Montagne
711e4cdd94 Fix #118055: libOverride resync() RNA call crashes when view_layer is not specified.
Underlying `lib_override_library_resync` code lost the optional aspect
of its `view_layer` parameter at some point, trivial to restore it
luckily.
2024-02-13 12:48:50 +01:00
Bastien Montagne
d38824bc02 Fix #108407: Crash on deleting shape key from Blender File view.
`BKE_library_id_can_use_filter_id` was missing the ShapeKey type for
geometry IDs (meshes, legacy curves, and lattices), leading to the
remapping code to fail to do its job when deleting the ShapeKey only.
2024-02-13 12:34:09 +01:00
Jacques Lucke
cd0e41c73e BLI: improve printing of IndexMask
The new printed format is like this: `(Size: 503 | 0-499, 555, 699, 900)`.
2024-02-13 12:33:48 +01:00
Jacques Lucke
bce1edc2bd BLI: add IndexMask.shift method 2024-02-13 12:33:48 +01:00
Jacques Lucke
9a5de97c4c BLI: rename slice_and_offset to slice_and_shift on IndexMask 2024-02-13 12:33:48 +01:00
Falk David
2f42782fa8 Fix: GPv3: Memory leak after conversion
The `LayerMask` structs were allocated with just using `new`.
They should use the guarded allocator. This
fixes a memory leak reported by ASAN.
2024-02-13 12:20:37 +01:00
Sietse Brouwer
2f0b293da3 GPv3: Add function to retrieve falloff factor for multi frame editing
This PR prepares GPv3 for calculating falloff factors when working in  multi frame editing mode.

The falloff popover is added to the UI.
A `float multi_frame_falloff` is added to `MutableDrawingInfo`. This is a factor from 0.0 to 1.0f.
A `retrieve_editable_drawings_with_falloff()` is added to the utility functions, which retrieves the falloff factor for each drawing when
multi frame falloff is enabled.

To avoid a copy, the return type of  `retrieve_editable_drawings()` and friends is changed from
`Array<MutableDrawingInfo>` to `Vector<MutableDrawingInfo>`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118108
2024-02-13 12:04:45 +01:00
Campbell Barton
888c4d0766 BLI_convexhull_2d: optimize AABB fitting method
Previously the bounding box was calculated for each rotation,
even though the loop would early exit if the area exceeded the best
known area, this meant the areas of the bounds was checked for
each point too. This scaled poorly, close to O(n^2).

Replace this with simple logic that keeps track of the indices
at the bounds, advancing them forward for each rotation.

This is around ~140x faster for a hull with 10k points on my system.

Note that there is potential for other improvements although
the cases where this new method doesn't perform well are quite specific
and faster than checking all points, see code-comments for details.
2024-02-13 21:29:46 +11:00
Sybren A. Stüvel
ff4a473ad4 RNA: update property flag descriptions
Add new descriptions to the `PROP_HIDDEN`, `PROP_SKIP_SAVE`, and
`PROP_LIB_EXCEPTION` flags. For the former two, these are more
explanatory than the previous descriptions. For the latter it's the
first ever description.

Personally I don't think "Do not use ghost values" was particularly
helpful, as the concept of "ghost values" isn't actually that well known
(compared to generally how many people use `bpy`). Granted, it's
described at [1], but IMO if the term "ghost values" is to be kept here,
it should include a link to that page.

[1]: https://docs.blender.org/api/current/bpy.types.bpy_struct.html

Pull Request: https://projects.blender.org/blender/blender/pulls/118036
2024-02-13 11:14:48 +01:00
Sybren A. Stüvel
f85538a56b RNA: unify property flag descriptions between enum and non-enum flags
These flags (like `'HIDDEN', 'SKIP_SAVE', etc.) mean the same thing when
used on enums and non-enum properties. Now they actually use the same
description definition in the source code, ensuring that any
improvements will apply to both.

No changes to the actual messages. Just using them for both enums and
non-enum property flags.

Pull Request: https://projects.blender.org/blender/blender/pulls/118036
2024-02-13 11:14:39 +01:00
Christoph Lendenfeld
7fddad529e Fix: keyframe values with additive NLA stack
The new keyframing functions introduced in #113504
didn't call the functions to decompose the NLA stack.

In practice this meant that when inserting keys into strip
that is under an additive strip, it would take the result of the additive Strip and
bake it back into the base. This would double the transform.

The fix is to call `BKE_animsys_nla_remap_keyframe_values`.
Unfortunately to do so, I had to pass through a few more
arguments to the keyframing functions.

Also adds unit tests to cover the caused bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/118053
2024-02-13 11:10:18 +01:00
Campbell Barton
0e4f9104bc Cleanup: unused includes in source/blender/gpencil_modifiers_legacy
Remove 159 includes.
2024-02-13 19:59:14 +11:00
Campbell Barton
866974ae56 Cleanup: unused includes in source/blender/animrig
Remove 13 includes.
2024-02-13 19:21:03 +11:00
Campbell Barton
38023283ac Cleanup: unused includes in source/blender/bmesh
Remove 26 includes.
2024-02-13 19:21:03 +11:00
Campbell Barton
e6cb2ca380 Cleanup: unused includes in source/blender/compositor
Remove 5 inclues.
2024-02-13 19:21:03 +11:00
Campbell Barton
0933e21750 Cleanup: unused includes in source/blender/geometry
Remove 13 includes.
2024-02-13 19:21:03 +11:00
Campbell Barton
976c56e69c Cleanup: unused includes in source/blender/render
Remove 37 includes.
2024-02-13 19:20:59 +11:00
Campbell Barton
903a76031a Cleanup: unused includes in source/creator
Remove 7 includes.
2024-02-13 19:14:48 +11:00
Campbell Barton
9ad127780a Tests: remove unnecessary fmod in BLI_convexhull_2d_test
The intention was to accept both 0 and M_PI however this isn't needed
as the result is always M_PI.

See !118186 for details.
2024-02-13 18:22:41 +11:00
Pratik Borhade
da2ba2f3f6 Windows: Compile error due to missing header
Caused by 9e4129feeb
Error: `undeclared identifier M_PI and M_PI_2`

Pull Request: https://projects.blender.org/blender/blender/pulls/118185
2024-02-13 07:48:22 +01:00
Campbell Barton
c8961d150d Tests: update BLI_convexhull_2d_test since fixing vertical segments
Changing the angle was needed as there is no longer a duplicate
end-point added to the polygon for vertical lines.
2024-02-13 16:47:48 +11:00
Campbell Barton
688cf175e5 Merge branch 'blender-v4.1-release' 2024-02-13 16:44:56 +11:00
Campbell Barton
0053de6556 Fix buffer overflow passing a vertical segment to convexhull_2d
Convex hull calculation would "cap" line segments with the first point.
Besides causing a buffer overflow when passing in two points,
it's not needed as matching first/last ends aren't expected
to be set by this function.
2024-02-13 16:42:39 +11:00
Campbell Barton
680701e915 Cleanup: spelling in comments 2024-02-13 14:20:00 +11:00
Campbell Barton
7747b8c944 Fix convexhull_2d_test for macOS & re-enable the test
Use EXPECT_NEAR instead of EXPECT_EQ to account for a differences in
atan2 implementation on macOS, more generally relying on exact
float comparison for tests is error prone.
2024-02-13 14:07:26 +11:00
Campbell Barton
cc154144ef Cleanup: unused includes in source/blender/blenloader
Remove 45 includes.
2024-02-13 13:53:10 +11:00
Campbell Barton
fee47f6da8 Cleanup: unused includes in source/blender/sequencer
Remove 95 includes.
2024-02-13 13:37:56 +11:00
Campbell Barton
1a3b5452c4 Cleanup: unused includes in source/blender/nodes
Remove 166 includes.
2024-02-13 13:23:35 +11:00
Campbell Barton
51bc826ca1 Cleanup: unused includes in source/blender/python
Remove 72 includes.
2024-02-13 13:09:03 +11:00
Hans Goudey
1394907474 Cleanup: Move uvproject.c to C++ 2024-02-12 20:43:24 -05:00
Campbell Barton
bdd9f32f84 Cleanup: unused includes in source/blender/modifiers
Remove 359 includes.
2024-02-13 12:28:24 +11:00
Campbell Barton
e205772596 Cleanup: includes in source/blender/imbuf
Remove 25 includes.
2024-02-13 12:22:50 +11:00
Campbell Barton
6cc6ccecd0 Cleanup: unused includes from source/blender/windowmanager
Remove 56 includes.
2024-02-13 11:58:42 +11:00
Campbell Barton
c29fdd1e12 Fix error in recent blenkernel cleanup
The BLI_endian_defines.h include was removed in [0] because
the resulting object files were unchanged on little endian systems.
Using -Werror=undef with GCC prevents this from happening in the future.

[0]: 9e4129feeb
2024-02-13 11:54:46 +11:00
Campbell Barton
9e4129feeb Cleanup: unused includes in source/blender/blenkernel
Remove 397 includes.
2024-02-13 11:32:38 +11:00
Campbell Barton
de18b629f0 Cleanup: unused includes in source/blender/blenlib
Remove 30 includes.
2024-02-13 11:07:14 +11:00
Campbell Barton
b372ebae68 Cleanup: unused headers for source/blender/editors
Remove 1317 includes from editors.
2024-02-13 10:02:53 +11:00
Campbell Barton
eb318b7733 Cleanup: use FILE_MAX instead of PATH_MAX for paths based on blend files
The blend file path is limited to FILE_MAX.
2024-02-13 09:53:45 +11:00
Campbell Barton
22b382fc84 Cleanup: replace PATH_MAX with FILE_MAX_LIBEXTRA for file drawing 2024-02-13 09:43:04 +11:00
Campbell Barton
39f0dbf47a Cleanup: use FILE_MAX instead of PATH_MAX for operators
FILE_MAX is used by operators, avoid an MSVC specific include.
2024-02-13 09:19:47 +11:00
ok_what
751d9c5999 Fix: VSE transition strip factor is not clamped
Previewing strip outside of it's boundary caused overflow.
Clamp the factor to prevent overflow.

Pull Request: https://projects.blender.org/blender/blender/pulls/118086
2024-02-12 21:21:19 +01:00
Harley Acheson
332efa7250 Merge branch 'blender-v4.1-release' 2024-02-12 12:17:45 -08:00