Commit Graph

6114 Commits

Author SHA1 Message Date
RedMser bf97bc634f Fix: remove leading space in window title
Remove leading space in window title for saved files.

Pull Request: https://projects.blender.org/blender/blender/pulls/114704
2023-11-24 18:57:09 +01:00
Ray Molenkamp ae25298774 Cleanup: CMake: Modernize bf_blenfont dependencies
Pretty straightforward

- Remove any bf_blenfont paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/115365
2023-11-24 18:29:09 +01:00
Ray Molenkamp b683bcc46c Cleanup: CMake: Modernize bf_intern_clog dependencies
Pretty straightforward

- Remove any bf_intern_clog paths from INC
- Add a dependency though LIB when missing

context: https://devtalk.blender.org/t/cmake-cleanup/30260

Pull Request: https://projects.blender.org/blender/blender/pulls/115323
2023-11-24 17:12:24 +01:00
Jason Fielder 18f7d158fe GPU: cleanup texture view usage flags
Texture usage flag `GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW`
was originally implemented and used too conservatively for many
cases in which the underlying API flags were not required.

Renaming to `GPU_TEXTURE_USAGE_FORMAT_VIEW` to reflect
the only essential use case for when a texture view is initialized with
a different texture format to the source texture. Texture views can
still be created without this flag when mip range or base level is
adjusted,

This flag is still required by stencil views and internally by the Metal
backend for certain feature support such as SRGB render toggling.

Patch also includes some small changes to the Metal backend to
adapt to this new compatibility and correctly capture all texture view
use-cases.

Related to #115269

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/115300
2023-11-24 15:21:00 +01:00
Hans Goudey 3d57bc4397 Cleanup: Move several blenkernel headers to C++
Mostly focus on areas where we're already using C++ features,
where combining C and C++ APIs is getting in the way.

Pull Request: https://projects.blender.org/blender/blender/pulls/114972
2023-11-16 11:41:55 +01:00
Pratik Borhade 920d9a9165 Fix #114758: keep text field empty for global search
Revert cea02c15f8. This will fix the issue
mentioned in #114758 and it will also allow user to see recent
searches in the list below the search box (F3).

Pull Request: https://projects.blender.org/blender/blender/pulls/114774
2023-11-14 12:31:55 +01:00
Miguel Pozo f32699369d Merge branch 'blender-v4.0-release' 2023-11-13 15:36:27 +01:00
Miguel Pozo aef7a17aa5 Fix #114189: Workbench: VR Session crashes on exit
Ensure there's a valid GPU context when freeing a wm_surface.

Pull Request: https://projects.blender.org/blender/blender/pulls/114795
2023-11-13 15:35:11 +01:00
Campbell Barton 7d99be77f7 Cleanup: rename data -> ghost_data in wm_playanim
Follow naming convention used elsewhere in wm_playanim.cc.
2023-11-11 19:52:30 +11:00
Campbell Barton 536e5323f5 Cleanup: suppress UBSAN undefined behavior warnings 2023-11-09 17:28:39 +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 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
Jesse Yurkovich c6b5bb3d89 Merge branch 'blender-v4.0-release' 2023-11-07 18:31:59 -08:00
Jesse Yurkovich 8178b12af4 Windows: Remove wait for key-press in --debug mode
This was initially added a long time ago[1] to help with certain exit
behavior while running under a debugger. However, this shouldn't be
necessary any longer.

More importantly, tests have started to use the `--debug` option[2].
Somehow the bots are fine, but anyone running the tests locally on
Windows will experience what looks like a hang; unless they press a key
to allow the tests to continue.

[1] 1cc19c6993
[2] The `blendfile_versioning` test

Pull Request: https://projects.blender.org/blender/blender/pulls/114605
2023-11-08 03:30:42 +01:00
Brecht Van Lommel 7618d4a0ac Merge branch 'blender-v4.0-release' into main 2023-11-07 20:32:33 +01:00
Jason Fielder 05c56603a9 Fix #114192: Resolve animation player greying out on resize in Metal
Standalone animation player has inconsistent GPU context activation
paradigm compared with standard rendering paths. The Metal backend
utilises the context activation step to refresh target window swapchains
from within the GHOST module.

This PR adds activation and deactivation calls, and also aims to clean up
GPU_render_begin/end setup to ensure all paths are covered.

Also resolves a bug upon shutdown wherein GPU resources which may
be tied to a GPU context are released during IMB_exit(), which is called
after GPU context destruction.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/114573
2023-11-07 15:35:42 +01:00
Campbell Barton 611930e5a8 Cleanup: use std::min/max instead of MIN2/MAX2 macros 2023-11-07 16:33:19 +11:00
Campbell Barton aaf05c2497 Cleanup: various C++ changes (use nullptr, function style casts) 2023-11-07 11:35:16 +11: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
Richard Antalik 4d37fb80b1 Cleanup: Convert VSE headers from .h to .hh 2023-11-03 01:33:54 +01:00
Brecht Van Lommel 39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Lukas Tönne 9c8daeb8c9 Fix WM_draw_region_free function declaration.
02fb605f removed the `hide` argument but did not update the WM_api.hh
header.
2023-10-30 13:48:22 +01:00
Julian Eisel 02fb605f8a Cleanup: Don't unset region visibility in unrelated WM function
`WM_draw_region_free()` should manage region-draw data, and not change
region state. This should be done by normal region state management
functions. Especially for a flag like `ARegion::visible` which is just
the cached result of the region's visibility evaluation, not the proper
way to actualy manage the region visibility.
2023-10-30 12:40:00 +01:00
Campbell Barton dffee8b323 Revert "Revert "Fix #112441: Restore Key Map Item does not restore the active property""
This reverts commit 0f36ac4e66.

This revert was only done for testing and wasn't ment to be pushed.
2023-10-29 20:08:39 +11:00
Brecht Van Lommel d7c2ef16fe Merge branch 'blender-v4.0-release' 2023-10-26 15:51:19 +02:00
Douglas Paul c50b682858 Fix #114156: animation player assert on launch on macOS
Adds missing calls to GPU_render_begin and GPU_render_end,
required for Metal.

Pull Request: https://projects.blender.org/blender/blender/pulls/114157
2023-10-26 15:50:20 +02:00
Brecht Van Lommel 3832059c61 Merge branch 'blender-v4.0-release' into main 2023-10-25 16:21:13 +02:00
Brecht Van Lommel a5cf5a00fb Fix #113849: animation player crash on launch on macOS
GPU backend detection was missing, causing it to try using the
non-existent OpenGL backend.

Thanks to Douglas Paul for helping identify the problem.
2023-10-25 16:19:44 +02:00
Campbell Barton dbd7c5f35a WM: reduce noisy logging storing/loading operator properties
Don't log wm.operator operator properties when no properties
are stored/loaded, this was noisy, especially for the
INFO_OT_reports_display_update operator when runs from a timer.
2023-10-25 16:01:45 +11:00
Campbell Barton be9b604190 WM: use a fake clipboard when simulating input
Allow simulated interactions to run without clobbering the users
clipboard text.
2023-10-25 15:51:22 +11:00
Campbell Barton 15692501b2 Merge branch 'blender-v4.0-release' 2023-10-24 23:35:15 +11:00
Campbell Barton 0f36ac4e66 Revert "Fix #112441: Restore Key Map Item does not restore the active property"
This reverts commit bb39f4fa41.
2023-10-24 23:35:06 +11:00
Campbell Barton cdbde7d941 Fix #113603: User modified key-map preferences for add-ons don't load
Regression from [0] where the key-map was attempting to load preferences
for key-map items for add-on operators which were not yet defined.
Resolve by postponing keymap updating until after loading add-ons.

[0]: 6de294a191
2023-10-24 23:32:16 +11:00
Bastien Montagne 65a6350250 Merge branch 'blender-v4.0-release' 2023-10-23 12:13:57 +02:00
Damien Picard c7a6ede996 Fix #113981: ID plural names using spaces instead of underscores
Translation markers `N_()` were added to IDs' plural names in !113912.
I also renamed some of those because I thought there were only display
names.

This commit reverts the renaming, leaving only the addition of the
markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114030
2023-10-23 12:05:28 +02:00
Campbell Barton cdac2b813e Merge branch 'blender-v4.0-release' 2023-10-23 12:31:14 +11:00
Campbell Barton d2b86610f0 Fix animation player continuing to playback audio when paused
Using arrow keys for frame stepping would keep playing back audio.
Also move play/pause to utility functions.
2023-10-23 12:20:44 +11:00
Campbell Barton 25ec651018 Cleanup: clarify naming for the animation player
The animation player used abbreviations in confusing ways:
`wait2` with no `wait1`, `indicator` without noting what was indicated,
`fstep` & `sstep` terms also weren't all that obvious.
Use clearer & more verbose names.
2023-10-23 11:49:17 +11:00
Campbell Barton fd212e3f6c Merge branch 'blender-v4.0-release' 2023-10-23 11:28:04 +11:00
Campbell Barton 4b1d185887 Fix crash when the animation player fails to create a texture (take 2)
Alternate fix for [0], a crash when a texture fails to load since this
seems to cause animation playback to fail on WIN32, see #113849.

While I can't redo the error, the main change was setting up
`immVertexFormat` before calling `ocio_transform_ibuf`.

[0]: 34899ec13d.
2023-10-23 11:26:55 +11:00
Campbell Barton a65f806658 Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.

This causes issues on WIN32 which I'm unable to reproduce.
Resolving the error with textures failing to load can be done with
fewer changes.
2023-10-23 11:25:13 +11:00
Campbell Barton dcc6a9d73b Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.
2023-10-23 10:58:56 +11:00
Harley Acheson fd63c01c4f Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-21 18:06:50 -07:00