Page MenuHome

UI: Refactor path dropping so logic doesn't depend on icons
Changes PlannedPublic

Authored by Julian Eisel (Severin) on Nov 30 2021, 5:30 PM.

Details

Summary

Turns out that many file drag and drop handlers use the drag-icon for logic. This isn't great at all, since it ties the program behavior to the display, and this can easily break. See D13383.

The file-type should be used for the logic instead.

Also removed the /* rule might not work? */ added in multiple drop-polls. It's not helpful without further information, just confusing. And apparently it has worked good enough so far.

Diff Detail

Repository
rB Blender
Branch
temp-drag-path-no-icon-based-logic (branched from master)
Build Status
Buildable 19107
Build 19107: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Nov 30 2021, 5:30 PM
Julian Eisel (Severin) created this revision.
Julian Eisel (Severin) added inline comments.
source/blender/editors/screen/screen_ops.c
5782

Can expand this with FILE_TYPE_BLENDER_BACKUP, but as a separate commit.

  • Merge branch 'master' into temp-drag-path-no-icon-based-logic
Julian Eisel (Severin) planned changes to this revision.Jul 12 2022, 3:43 PM

Note that there currently is a crash when dragging IDs into the Sequencer. That's because dragging IDs there is currently rather broken, it just happens to not crash. D15333: Fix T99255: Strips inserting incorrectly fixes this, so this patch can be updated to not crash anymore afterwards.