Skip to content

Allow drag & drop files on InitNode in the GraphEditor#3068

Open
Copilot wants to merge 2 commits intodevelopfrom
copilot/allow-drag-drop-files-initnode
Open

Allow drag & drop files on InitNode in the GraphEditor#3068
Copilot wants to merge 2 commits intodevelopfrom
copilot/allow-drag-drop-files-initnode

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

  • Understand why GraphEditor's DropArea intercepts all drop events (higher z-order than nodes inside draggable)
  • Remove the DropArea from Node.qml; add initNodeDragHover property and highlight rectangle
  • Add initNodeDelegateAt() helper function to GraphEditor.qml
  • Update GraphEditor's DropArea to detect InitNode under cursor and call initializeNode on drop
  • Add onPositionChanged/onExited to GraphEditor's DropArea for visual feedback

Agent-Logs-Url: https://github.com/alicevision/Meshroom/sessions/994421f1-d823-4916-9b75-b2361dae8e82

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Copilot AI requested a review from fabiencastan April 1, 2026 21:57
@fabiencastan fabiencastan marked this pull request as ready for review April 1, 2026 22:01
@fabiencastan fabiencastan added the feature new feature (proposed as PR or issue planned by dev) label Apr 1, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.39%. Comparing base (bde64b0) to head (67f1009).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/node.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3068      +/-   ##
===========================================
- Coverage    83.40%   83.39%   -0.01%     
===========================================
  Files           73       73              
  Lines         9870     9873       +3     
===========================================
+ Hits          8232     8234       +2     
- Misses        1638     1639       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@cbentejac cbentejac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation always re-initializes the InitNode when files/images are dropped through the initialize() method. Shouldn't we also want to be able to extend the current input with the files/images we are dropping?

We could assume that the current behaviour is the default one, but if files/images are dropped while pressing a specific key, then the behaviour changes to an extendAttributes() instead of an initalize().

Comment thread meshroom/ui/scene.py
node (Node): the InitNode to initialize
urls (list of QUrl): the list of dropped file/directory URLs
"""
if not isinstance(node.nodeDesc, meshroom.core.desc.InitNode):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not isinstance(node.nodeDesc, meshroom.core.desc.InitNode):
if not node.isInitNode:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new feature (proposed as PR or issue planned by dev)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants