Skip to content

Fix: Load backdrop overlaps nodes#129

Open
Tilix4 wants to merge 3 commits into
ynput:developfrom
Tilix4:bugfix/load_backdrop_overlap_nodes
Open

Fix: Load backdrop overlaps nodes#129
Tilix4 wants to merge 3 commits into
ynput:developfrom
Tilix4:bugfix/load_backdrop_overlap_nodes

Conversation

@Tilix4
Copy link
Copy Markdown
Contributor

@Tilix4 Tilix4 commented May 8, 2026

Changelog Description

Fixing template with backdrops only in a scene containing only nodes overlap at loading. Also reducing the distance between the original content and the loaded one.

Testing notes:

  1. Open a scene with few nodes and no backdrops
  2. Load a template containing only backdrops

@BigRoy BigRoy requested review from Copilot, iLLiCiTiT and kalisp May 8, 2026 10:15
@BigRoy BigRoy added type: enhancement Improvement of existing functionality or minor addition community Issues and PRs coming from the community members labels May 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes template-loading placement so that backdrops-only templates don’t overlap existing nodes in scenes without backdrops, and reduces the horizontal offset applied when resolving overlaps.

Changes:

  • Treat existing nodes in Top as occupied space during overlap prevention (in addition to existing backdrops).
  • Adjust overlap resolution step to place new content immediately after the overlapping rect plus the configured gap (instead of advancing by a full “slot width”).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/ayon_harmony/js/AyonHarmony.js Outdated
occupiedRects.push(rect);
});


Comment on lines +463 to +467
// Also treat existing top-level nodes as occupied space so that new
// content is not placed on top of them even when no backdrops are present.
var newNodeSet = {};
newNodes.forEach(function(n) { newNodeSet[n] = true; });
node.subNodes("Top").forEach(function(nodePath) {
Copy link
Copy Markdown
Contributor Author

@Tilix4 Tilix4 May 11, 2026

Choose a reason for hiding this comment

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

This is wrong. node.subNodes("Top") returns the list of nodes at the level string given as argument.

Comment on lines 581 to 585
if (!overlapRect) {
break;
}
candidateLeft += slotWidth;
candidateLeft = overlapRect.right + PARENT_BACKDROP_GRID_GAP;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants