Commit Graph

6036 Commits

Author SHA1 Message Date
Campbell Barton
91c5eca81f Fix crash dragging images into the animation player
Resolve issues with the animation player drag & drop.

- IMB_exit ran before attempting to load the dropped image,
  crashing when the image was loaded.
- The old event consumer wasn't removed from the system
  causing events to be processed that accessed freed stack memory.
2023-10-13 17:51:53 +11:00
Campbell Barton
08e5f94a70 Fix #113309: Broken key-map after "Reload Scripts"
Regression caused by [0]. Resolve by adding a 'keep_properties' argument
to KeyConfig.update so the key-map items can be restored after the
operators have been reloaded.

[0]: 88a875ec3a
2023-10-13 14:37:48 +11:00
Campbell Barton
604c0d8d5c Cleanup: add "_data" suffix to wm_keymap_item_free
Clarify that the wmKeyMapItem it's self isn't freed.
2023-10-13 14:37:48 +11:00
Campbell Barton
845f7f6d44 Cleanup: move AudaSpace members into their own struct
Avoid having common terms like 'source' as static variables.
2023-10-13 12:10:10 +11:00
Campbell Barton
432bef802f Cleanup: use early returns in wm_window_title
Also avoid unnecessary std::string creation.
2023-10-13 11:22:01 +11:00
Campbell Barton
3488533ac3 Merge branch 'blender-v4.0-release' 2023-10-13 10:31:50 +11:00
Campbell Barton
e86fbcd4f0 Merge branch 'blender-v4.0-release' 2023-10-13 10:31:44 +11:00
Campbell Barton
df108825c0 Fix subtle path handling bugs caused by recent changes to the title
Resolve issues with corner-cases introduced by [0].

- Comparing the filename & filepath was no longer a valid way to check
  for a directory component since the extension was stripped.
- Use BLI_path_extension_or_end which doesn't confuse extensions with
  the dot from hidden files.

The variable name include_directory was also misleading.

[0]: 1a648f5b22
2023-10-13 10:29:55 +11:00
Campbell Barton
fb58aa5900 Cleanup: typos, duplicate words 2023-10-13 10:21:06 +11:00
Julian Eisel
dab7ac1739 Refactor: Make drop-box callbacks more general, not drawing specific
These callbacks were named for the purpose of drawing (and that's probably
their main use case still), but nothing limits them to be used for that only.
They can be useful for non-drawing related things, essentially they act as
drop-box entering and exiting event handlers. Reflect that in the name, so also
more clear when they will be called, as opposed to what they are typically used
for. Drop-boxes already have such event handler callbacks, this makes their API
naming more consistent.
Also better differentiates between drawing and handling callbacks, the
difference matters (attempting to draw during handling won't work).
2023-10-12 18:39:24 +02:00
Harley Acheson
56aa7f58e9 Merge branch 'blender-v4.0-release' 2023-10-12 07:58:44 -07:00
Harley Acheson
1a648f5b22 UI: Window Title Blender Path Changes
Do not show extension of initial name, and include full file name
in the path section.

Pull Request: https://projects.blender.org/blender/blender/pulls/113560
2023-10-12 16:56:56 +02:00
Christoph Lendenfeld
3792c2720d Refactor: remove ED_ prefix from autokeying functions
No functional changes

Since the functions now live in a namespace,
they no longer need the prefix

as a result there are now 2 functions named
`autokeyframe_object`
which is fine because they take different parameters

If both are needed is for a future patch to investigate

Pull Request: https://projects.blender.org/blender/blender/pulls/113612
2023-10-12 16:32:29 +02:00
Christoph Lendenfeld
a3831fe7af Refactor: Move autokeyframing functions to animrig
No functional changes

The following functions have been moved
`autokeyframe_cfra_can_key`
`autokeyframe_object`
`ED_autokeyframe_object`
`ED_autokeyframe_pchan`
`ED_autokeyframe_property`

they are all in a new file
keyframing_auto.cc
while the declarations are in
ANIM_keyframing.cc

The autokeyframe makros also have been moved

Pull Request: https://projects.blender.org/blender/blender/pulls/113607
2023-10-12 15:44:58 +02:00
Campbell Barton
69f437c061 Cleanup: remove redundant call to BLI_freelistN 2023-10-13 00:05:47 +11:00
Campbell Barton
1c9eae982a Merge branch 'blender-v4.0-release' 2023-10-13 00:04:16 +11:00
Campbell Barton
59db44ad65 Fix animation player failing to play back JPEG 2000 image sequences 2023-10-13 00:02:02 +11:00
Campbell Barton
82105bc408 Merge branch 'blender-v4.0-release' 2023-10-12 23:42:30 +11:00
Campbell Barton
78d1e9f48c Merge branch 'blender-v4.0-release' 2023-10-12 23:42:27 +11:00
Campbell Barton
63e9de4992 Fix memory leak in the animation player when videos have no duration 2023-10-12 23:41:10 +11:00
Campbell Barton
d0507470c0 Fix crash in the animation player when a video file fails to load 2023-10-12 23:41:10 +11:00
Campbell Barton
2316b73a1d Merge branch 'blender-v4.0-release' 2023-10-12 17:23:57 +11:00
Campbell Barton
4ea76b8530 Fix #113273: Status bar not refreshed when canceling the operation
Resolve regression in [0].

[0]: 42f8b49581
2023-10-12 17:21:34 +11:00
Campbell Barton
b4504c7840 Cleanup: spelling in comments 2023-10-12 16:03:18 +11:00
Campbell Barton
1eabc2d4cd Merge branch 'blender-v4.0-release' 2023-10-12 16:00:26 +11:00
Campbell Barton
4e4fc8c276 Fix #107523: Cursor not cleared when panning stops 2023-10-12 15:59:22 +11:00
Harley Acheson
e00bd55576 Merge branch 'blender-v4.0-release' 2023-10-11 08:26:58 -07:00
Harley Acheson
1b28b79768 Revert: Fix #111666: Hide Mouse in Redo Panel Inputs #113428
Reverting this as Campbell would prefer a solution that does not
involve modal cursors.

Pull Request: https://projects.blender.org/blender/blender/pulls/113551
2023-10-11 17:25:38 +02:00
Brecht Van Lommel
46d32d8966 Merge branch 'blender-v4.0-release' into main 2023-10-10 15:36:39 +02:00
Brecht Van Lommel
478e1ab6d3 Fix build error on Windows after BLI_read changes
Don't use posix-only ssize_t in platform independent code.

Pull Request: https://projects.blender.org/blender/blender/pulls/113493
2023-10-10 15:36:15 +02:00
Campbell Barton
028c4b440c Merge branch 'blender-v4.0-release' 2023-10-10 22:28:53 +11:00
Campbell Barton
fa40724a72 BLI_fileops: Add 'BLI_read' wrapper to ensure the requested data is read
According to the documentation `read` isn't required to read all the
data requested. Although until recently I'd never encountered this and
none of Blender's code checks for read succeeding but not reading the
requested size.

Resolves #113473 where images over 2gb fail to load.

Ref !113474.
2023-10-10 22:27:40 +11:00
Campbell Barton
1a234805d0 Merge branch 'blender-v4.0-release' 2023-10-10 19:05:03 +11:00
Campbell Barton
bb9b60f13d Fix build error Windows with ssize_t not being defined 2023-10-10 19:03:31 +11:00
Campbell Barton
9ebe1c386f Merge branch 'blender-v4.0-release' 2023-10-10 18:02:48 +11:00
Campbell Barton
34899ec13d Fix crash when the animation player fails to create a texture 2023-10-10 18:00:05 +11:00
Campbell Barton
70e548a79f Merge branch 'blender-v4.0-release' 2023-10-10 14:14:58 +11:00
Campbell Barton
60f4f71733 Merge branch 'blender-v4.0-release' 2023-10-10 14:14:55 +11:00
Campbell Barton
8b5d271c5c Fix playing back image files over 2gb in the animation player
Use size_t to store the file size.
2023-10-10 14:01:23 +11:00
Campbell Barton
3307e0afe8 Fix crash on startup with large images in the animation player
The image size was used to set the window size, large values could
make the window fail to create it's GPU context.

Resolve by constraining window size by the main display dimensions.

Even in cases where the window would succeed to create its generally
not useful to have a window larger than the screen size.
2023-10-10 13:57:44 +11:00
Campbell Barton
53a27eba86 Merge branch 'blender-v4.0-release' 2023-10-10 11:06:35 +11:00
Campbell Barton
af737c3a57 Merge branch 'blender-v4.0-release' 2023-10-10 11:06:33 +11:00
Campbell Barton
e03fd667f2 Fix clipped text with the animation player
The text was drawn at the very bottom left of the window.
2023-10-10 11:04:36 +11:00
Campbell Barton
256ace4c57 Fix animation player scrubbing with multiple file arguments
While passing in multiple files is supported, scrubbing both images
an movies wasn't working properly when multiple files were passed in.

For images, arguments such as "*.png" expand to multiple image files
which were each assigned a frame index of 0, this would play but stopped
scrubbing from working completely.

For movies, passing in multiple files would play back all files but
only properly scrub the first file, if other videos were longer than
the first scrubbing would jump to those.

Resolve by starting the frame index where the previous files left off.

Also resolve divide by zero when showing the indiciator for a single
frame.
2023-10-10 11:04:36 +11:00
Campbell Barton
137f8dd7bc Cleanup: spelling in comments 2023-10-10 09:44:57 +11:00
Hans Goudey
8f27baf388 Merge branch 'blender-v4.0-release' 2023-10-09 23:54:43 +02:00
Hans Goudey
976eaae02f Cleanup: Move BKE_object.hh to C++
Simplifies the fix to #111120, where the object bounds functions
may return a C++ type instead of `BoundBox`.

Pull Request: https://projects.blender.org/blender/blender/pulls/113462
2023-10-09 23:41:53 +02:00
Harley Acheson
6e9be2ae2f Merge branch 'blender-v4.0-release' 2023-10-09 09:32:58 -07:00
Philipp Oeser
78489af86a Fix #113346: Append/Link fails if no name is specified
Removing one unnecessary check in wm_link_append_exec that caused us to
error out even though multiple files are selected. This removed check
is also done later on in the function so safety is still ensured.

Pull Request: https://projects.blender.org/blender/blender/pulls/113350
2023-10-09 18:29:49 +02:00
Bastien Montagne
df0d7c9c3d WM Jobs: Refactor all worker status variables into a single shared struct.
Move the three current 'status variables' (stop, update and progress)
into a single 'WorkerStatus' struct. This is cleaner and will allow for
future workin this area without having to edit tens of 'startjob'
callbacks signatures all the time.

No functional change expected here.

Note: jobs' specific internal code has been modified as little as
possible, in many cases the job's own data still just store pointers to
these three values. Ideally in the future more refactor will be using a
single pointer to the shared `wmJobWorkerStatus` data instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/113343
2023-10-09 12:12:22 +02:00