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.
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
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
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).
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.
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.
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.
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
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