UI Views: Support dragging before or after items #107742

Open
opened 2023-05-08 15:33:20 +02:00 by Julian Eisel · 2 comments
Member

Drag & drop is commonly used to reorganize trees and the order of items, like in the Outliner (see attached video).
This should become a general feature of drop targets and/or the tree view. It is needed for the light linking project.

  • Add a way to tell drop targets that they wish to use "insert into"/"insert before"/"insert after" support.
  • Determine which method to use on interaction (in region_views_find_drop_target_at()?)
  • Use this information in the DropTargetInterface functions somehow (can_drop(), drop_tooltip(), on_drop()).
  • Draw indicator on where the item will be inserted to (like in the Outliner).
  • (Not sure if needed initially) When dragging over children that don't support dropping, but the parent does, insert to the parent.
  • Avoid flickering while dragging between items - 427bdc8dcf

How can we support this for drop targets in an elegant way? E.g. without introducing a bunch of boilerplate for cases where only "insert into" is needed.

Drag & drop is commonly used to reorganize trees and the order of items, like in the Outliner (see attached video). This should become a general feature of drop targets and/or the tree view. It is needed for the light linking project. * [x] Add a way to tell drop targets that they wish to use "insert into"/"insert before"/"insert after" support. * [x] Determine which method to use on interaction (in `region_views_find_drop_target_at()`?) * [x] Use this information in the `DropTargetInterface` functions somehow (`can_drop()`, `drop_tooltip()`, `on_drop()`). * [ ] Draw indicator on where the item will be inserted to (like in the Outliner). * [ ] (Not sure if needed initially) When dragging over children that don't support dropping, but the parent does, insert to the parent. * [x] Avoid flickering while dragging between items - 427bdc8dcf How can we support this for drop targets in an elegant way? E.g. without introducing a bunch of boilerplate for cases where only "insert into" is needed.
Julian Eisel added the
Type
To Do
label 2023-05-08 15:33:20 +02:00
Julian Eisel added the
Module
User Interface
Interest
Render & Cycles
labels 2023-05-08 15:38:22 +02:00
Member

PR: #109283

PR: https://projects.blender.org/blender/blender/pulls/109283
Author
Member

New PR: #109825

New PR: #109825
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107742
No description provided.