Commit Graph

130225 Commits

Author SHA1 Message Date
Christoph Lendenfeld cd90e04347 Refactor: arguments for get_normalized_fcurve_bounds
No functional changes.

In order for the function `get_normalized_fcurve_bounds` to be
reusable in [#114407: WIP: Anim: View FCurve of Property in the Graph Editor](https://projects.blender.org/blender/blender/pulls/114407)
the arguments need to be simplified.

Pull Request: https://projects.blender.org/blender/blender/pulls/114679
2023-11-09 17:17:07 +01:00
Christoph Lendenfeld 6e7af8ceff Refactor: More specific arguments for ANIM_get_normalization_flags
No functional changes.

`ANIM_get_normalization_flags` had the argument type of `bAnimContext *`.
That made it more difficult than it needs to be to reuse that function.
Pass a `SpaceLink *` instead since that is what the function actually uses.

Pull Request: https://projects.blender.org/blender/blender/pulls/114676
2023-11-09 17:02:13 +01:00
Sergey Sharybin 43c2c1844f Cleanup: Remove unused arguments from sculpt automasking API
Pull Request: https://projects.blender.org/blender/blender/pulls/114674
2023-11-09 16:15:54 +01:00
Jeroen Bakker 8c7f927ec8 Vulkan: Workbench Shadow Drawing
There were some issues with workbench shadow drawing. This PR
does some tweaks to fix the shadow drawing on vulkan.

* Framebuffer stencil clearing when write stencil is disabled
* Tweaks to stencil operation and tests
* Disable restart for line adjacency

Pull Request: https://projects.blender.org/blender/blender/pulls/114673
2023-11-09 16:07:26 +01:00
Sergey Sharybin 9125848f2a Cleanup: Remove unused pointer to PBVH node
Pull Request: https://projects.blender.org/blender/blender/pulls/114672
2023-11-09 15:57:35 +01:00
Christoph Lendenfeld b670e7a82c Fix #114588: Graph Editor increment snap not working
Restoring the behavior while transforming keys and pressing `Ctrl`

The regular snapping code has the feature that
when you press `Ctrl` you can toggle the snapping on and off.
Prior to 4.0 the snapping for the Graph Editor used a
completely different system, including a different flag to toggle snapping.

Because of that, the flag that the regular snapping
code uses was never set by default. So the system thought it was disabled.

Now when you press `Ctrl` you would enable that
flag and the snapping code would run.
It would snap to increments because that is the mode that
is returned for the Graph Editor space type.
(Note that this is the mode of the generic snapping
system, not of the Graph Editor specific one)

However at the same time, doing that would disable the
Graph Editor specific snapping code.
So the snapped values from the original system would bubble through.

This did not occur in the Dope Sheet and NLA Editor,
because those never returned a snapping mode.
Those still have a different behavior to 3.6 where they
now snap to seconds, instead of not snapping at all.

Pull Request: https://projects.blender.org/blender/blender/pulls/114607
2023-11-09 14:38:30 +01:00
Sergey Sharybin bf8728f99e Cleanup: Remove unneeded extern "C" linkage for C++ code
Pull Request: https://projects.blender.org/blender/blender/pulls/114663
2023-11-09 13:23:41 +01:00
Campbell Barton 45cf94904b Fix EEVEE Next panel masking the non-next EEVEE panel
Mistake in [0] re-used the same names for both panels.

[0]: 80a8368b88
2023-11-09 23:17:23 +11:00
Hans Goudey d0ce1ca173 Merge branch 'blender-v4.0-release' 2023-11-09 11:58:29 +01:00
Falk David ff5df8a78f Fix #114564: Can't search grease pencil modifiers
The grease pencil modifier list hasn't been converted to a menu yet.
This fixes the issue by filtering out grease pencil objects in
the search poll function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114665
2023-11-09 11:57:07 +01:00
Hans Goudey 16553c2a44 Geometry Nodes: Support top-level instance meshes in boolean node
During the 2.93 to 3.0 transition, instance handling was made more
explicit in general. However, we forgot to change the boolean node,
which still implicitly gathered all the instanced meshes and fed them
to the boolean algorithm separately. We waited for the next breaking
release, 4.0 to "correct" this, and did it in fc06a471f1.
However, in that commit it was assumed that the "Self Intersection"
mode would be able to address the use case. The idea was also to push
some complexity outside of the boolean code, which is already one of
the more complex areas in Blender. Though it's possible to have a
"Group ID" or "Shape ID" input in the future as well, it's also
reasonable to expect some instances to be processed by the node,
even though it isn't quite consistent.

This commit makes a compromise by processing meshes contained by
top-level instances. We do it at this stage of the release to avoid the
breaking change.

Pull Request: https://projects.blender.org/blender/blender/pulls/114632
2023-11-09 11:54:41 +01:00
Jeroen Bakker 59a21a63bb Cleanup: Remove unused r_data_format parameter
The r_data_format parameter from imb_gpu_get_format is always ignored
or overwritten by the r_data_format parameter from imb_gpu_get_data.

It makes more sense to just use the result from the imb_gpu_get_data
function for to determine the data format.

Pull Request: https://projects.blender.org/blender/blender/pulls/114662
2023-11-09 11:21:56 +01:00
Jeroen Bakker 7e95bfbba8 Merge branch 'blender-v4.0-release' 2023-11-09 11:05:48 +01:00
Jason Fielder ed540b4d3a Fix #114414: Alternative fix for greyscale textures retaining perf
Alternative solution to #114414 which reduces the scope of
textures for which single-channel greyscale optimization
is removed from.

Some byte buffers are converted to float buffers during
color management. These cases should retain support in
the optimal path.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/114611
2023-11-09 11:02:20 +01:00
Sergey Sharybin a4f4cb6c4a Cleanup: Sculpt, use C++ types for PBVH proxy node API
- Use float3 for coordinates inside of proxy
- Use Vector for storing coordinates and proxy nodes
- Use MutableSpan in the API to access proxy nodes

Pull Request: https://projects.blender.org/blender/blender/pulls/114638
2023-11-09 11:00:58 +01:00
Jeroen Bakker b51027ea0c Vulkan: Fix Issues surrounding Grease Pencil Drawing
Some minor tweaks to the vulkan backend to support grease pencil
drawing. The changes include:

* Add support for GPU_DATA_10_11_11_REV clearing
* Use correct index buffer start and count

Anti aliasing isn't working as they require different samplers being
configured and that require some design work.
Effects haven't been tested.

Pull Request: https://projects.blender.org/blender/blender/pulls/114659
2023-11-09 11:00:09 +01:00
Sergey Sharybin c3609ec435 Cleanup: Sculpt, use C++ vector types in internal types
Only converted value types in the structures.

The pointer values are left unchanged as it requires more careful look
to avoid possible alignment mismatch.

Function arguments are left unchanged as well.

Only float[3] is converted as the float[4] will likely need to be
converted to some C++ rotation class. And float[4][4] often did not
compile when change is only done in the header.

Pull Request: https://projects.blender.org/blender/blender/pulls/114636
2023-11-09 10:05:24 +01:00
Campbell Barton fdbf235ba3 Merge branch 'blender-v4.0-release' 2023-11-09 18:45:17 +11:00
Campbell Barton 46517cc486 Merge branch 'blender-v4.0-release' 2023-11-09 18:45:11 +11:00
Thomas Barlow 1058a93994 Fix #106696: Invalid flag combinations used in #PyObject_GetBuffer
Code using #PyObject_GetBuffer was combining the `PyBUF_FORMAT` and
`PyBUF_SIMPLE` flags, but the documentation specifies that
`PyBUF_FORMAT` can be |'d to any of the flags except `PyBUF_SIMPLE`
because the latter already implies format `B` (unsigned bytes).

The flags in such cases have been replaced with
`PyBUF_ND | PyBUF_FORMAT`, which has the additional requirement that the
buffer must provide it's `shape` field.

This fixes `memoryview` objects raising a `BufferError` when requested,
due to the invalid combination of flags making them be considered
invalid buffers when they would otherwise be valid.

Ref: !106697
2023-11-09 18:43:05 +11:00
Thomas Dinges 801c3275f5 Release: Bump Blender 4.0 to RC, Bcon4 2023-11-09 08:17:55 +01:00
Campbell Barton 536e5323f5 Cleanup: suppress UBSAN undefined behavior warnings 2023-11-09 17:28:39 +11:00
Campbell Barton 690d427045 Merge branch 'blender-v4.0-release' 2023-11-09 17:01:03 +11:00
Campbell Barton 391b5ac93c Fix uninitialized pending actions for Windows under Wayland
A windows pending actions wasn't cleared for new windows.
Although I'm not aware of user visible bugs, this prevents
unpredictable updates for new windows.
2023-11-09 16:57:06 +11:00
Campbell Barton 6fe995740a Merge branch 'blender-v4.0-release' 2023-11-09 15:49:10 +11:00
Campbell Barton 8ee209cb77 Fix #114614: Reload scripts leaks memory
Address regression in [0] which allowed wmKeyMapItem::properties to
remain set when a valid wmKeyMapItem::ptr can't be created because the
wmOperatorType isn't available (temporarily in the case of reloading).

Resolve by freeing wmKeyMapItem::properties when the `ptr` isn't set.

Also add null pointer check not to assume wmKeyMapItem::properties
implies an allocated wmKeyMapItem::ptr. Something which is already
accounted for everywhere else.

[0]: 08e5f94a70
2023-11-09 15:48:07 +11:00
Campbell Barton 33e6e5aed1 Fix #114614: Reload scripts leaks memory
Also add null pointer check not to assume wmKeyMapItem::properties
implies an allocated wmKeyMapItem::ptr. Something which is already
accounted for everywhere else.
2023-11-09 15:37:40 +11:00
Campbell Barton 5ebaf8af59 Build: correct package name & code-comment for WESTON in lib/ 2023-11-09 14:57:09 +11:00
Campbell Barton 59264115ce Merge branch 'blender-v4.0-release' 2023-11-09 14:52:29 +11:00
Campbell Barton 7e12d92f40 Fix invalid value for ENUM_OPERATORS(...) macro
Use defines for multiple flags.
2023-11-09 14:51:33 +11:00
Campbell Barton 704985152e Refactor: initialize IMB after parsing settings
Avoid awkward kludges with IMB_init/exit & IMB_ffmpeg_init calls.

The animation player was responsible for calling IMB_exit, not IMB_init,
this complicated drag & drop which needed to re-internalize IMB before
returning.

Delay initializing IMB since none of the other argument handlers
depend on it, make wm_main_playanim_intern responsible for calling
both initialization & exit calls for IMB.

Also expand code comments for ARG_PASS_SETTINGS.
2023-11-09 13:58:00 +11:00
Campbell Barton 368b38be37 Merge branch 'blender-v4.0-release' 2023-11-09 13:07:44 +11:00
Campbell Barton 609ac5e378 Fix crash dragging images into the animation player (again)
This was fixed by [0] however that fix didn't account for IMB
sometimes freeing GPU resources created by color management
(resolved by [1] which effectively reverted [0]).

Resolve by re-initializing IMB in the case of drag & drop.

[0]: 51467b0611
[1]: 05c56603a9
2023-11-09 12:52:14 +11:00
Campbell Barton 58ea0e051f Cleanup: spelling in comments 2023-11-09 09:54:28 +11:00
Campbell Barton 6bba008325 Cleanup: format 2023-11-09 09:34:49 +11:00
Martijn Versteegh 596aab27bd Merge branch 'blender-v4.0-release' 2023-11-08 21:32:30 +01:00
Martijn Versteegh aaf6937631 Fix #112697: Skip non-existing UV maps on VBO upload
Fix #112697: Skip unavaliable UV maps on VBO upload

The list of available UV maps is generated for the evaluated object,
however if any modifier generates UV maps (for example Geometry
Nodes) it is possible the evaluated object contains UV maps which are
not present in the base mesh. So when only the base mesh is uploaded,
for example in the UV editor, UV maps present in the list are not
guaranteed to exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/114558
2023-11-08 21:31:22 +01:00
Miguel Pozo f2a7145a57 Fix #114404: EEVEE-Next: Render region enforced even when disabled 2023-11-08 19:13:26 +01:00
Brecht Van Lommel dccbc27eab Tests: add WIITH_TESTS_BATCHED option to execute Blender once per test
Some tests like cycles, sequencer and compositor batch together multiple
tests in a single Blender invocation. This makes them run faster, but
makes debugging harder. This is an option to disable that batching.

Pull Request: https://projects.blender.org/blender/blender/pulls/114603
2023-11-08 18:41:33 +01:00
Antonio Vazquez 8d0323e76e Cleanup: Remove compiler warning 2023-11-08 17:31:01 +01:00
Antonio Vazquez 405ad22429 GPv3: Set Uniform operator for Thickness and Opacity
This operator has the same functionality that GPv2 version of Stroke Normalize.

Note: The radius is set with the entry value * 0.5 and the param is named Thickness.

Related to #113991

Pull Request: https://projects.blender.org/blender/blender/pulls/114006
2023-11-08 16:19:00 +01:00
Matias Mendiola e5704d37de GPv3: Switch Direction operator
This Operator is similar to GPv2 GPENCIL_OT_stroke_flip to switch the stroke direction.

Related to: [113590](113590)

Pull Request: https://projects.blender.org/blender/blender/pulls/114007
2023-11-08 16:05:54 +01:00
Omar Emara 571bddb6c8 Cleanup: Fix warnings due to disabled OCIO 2023-11-08 16:33:46 +02:00
Antonio Vazquez a8cb0b0ca0 GPv3: Set selected curve material as active material
This operator assigns the material of the first selected curve as active material.

Related to #113569

Pull Request: https://projects.blender.org/blender/blender/pulls/114188
2023-11-08 15:00:48 +01:00
Falk David f6655ab06c Fix #114453: Grease Pencil shows up as "Grease Pencil (legacy)" in some places
In Blender 4.0 Grease Pencil was showing up as "Grease Pencil (legacy)" in the UI in some places.
Since the current Grease Pencil is not replaced yet, it shouldn't be named this way in 4.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/114531
2023-11-08 14:59:22 +01:00
Thomas Dinges 212a1cfb4c Merge branch 'blender-v4.0-release' 2023-11-08 14:59:16 +01:00
Thomas Dinges 176df4bead Release: Update licenses doc and freedesktop file for 4.0 2023-11-08 14:57:55 +01:00
Pratik Borhade 34874910b6 Merge branch 'blender-v4.0-release' 2023-11-08 17:33:26 +05:30
Pratik Borhade f7dd40afbf Fix #114583: Missing forward axis option in obj export
This was accidently removed in cfffd813c1

Pull Request: https://projects.blender.org/blender/blender/pulls/114615
2023-11-08 12:58:15 +01:00
Pratik Borhade 2a45027203 UI: Type to search for sequencer add menu
Sequencer add menu supports searching with spacebar but "type to search"
was missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114625
2023-11-08 12:56:58 +01:00