Extend Drag and Drop to Python #39625
Labels
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
Interest: X11
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#39625
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender Implements the ability to drag files onto the interface and have an operator called when the file is dropped on the interface. Depending on what is under the cursor one of these operators will be called:
The code for the available dropboxes can be found here:
source/blender/editors/space_view3d/space_view3d.c – view_3d_dropboxes(void) : void
Proposed Implementation:
Allow a python operator to define the functionality that is called when a file is dragged onto the interface. This exposes very intuitive functionality that can be used by Blender Add-on Developers. An example of this functionality can be found in the Fluid Designer project. In order to achieve this functionality in Fluid Designer we just forced a python operator to be called using this code:
Discussion Topics:
How would the user know if two add-ons are subscribed to the drag and drop operator?
Is there a better way for an operator to subscribe to a drag and drop event? Maybe using the ‘bl_options’ property of an operator.
Changed status to: 'Open'
Added subscriber: @AndrewPeel
Added subscriber: @JonathanWilliamson
Added subscriber: @ideasman42
I cannot speak to the code side, but from a functionality standpoint I think this is really important to increase the power of add ons. This would open a lot more possibilities and improvement for user-friendliness in add ons. Particularly those that deal with scene and/or object management in any way.
What do you think @ideasman42?
Yeah I still have a lot to learn when it comes to working with Blenders C/C++ Code, but it seems like it could be a simple implementation. Hopefully @ideasman42 can help determine if i am totally out of my mind or if this seems like a possible solution.
Added subscriber: @Sergey
I'm not really sure, seems it's not actually a patch but design discussion? We've got separate project for this actually.. Patch tracker is not the best place for such things.
Assigning to @ideasman42 to have a final decision here.
Yeah i kind of had a feeling that i posted this in the wrong place right after i hit the submit button, but I have implemented this functionality into the Fluid Designer Build so i can submit a diff showing exactly what i changed, but i have a feeling that it wouldn't be accepted since it is mostly a hack. So i guess i will wait to see what @ideasman42 has to say about what direction I should take. Thanks for the info sergey.
Removed subscriber: @ideasman42
Added subscriber: @thanhph111
Added subscriber: @apprenti90