Implement arrangement framework for node groups

- Introduced `frames.py` to manage field complex calculations and their arrangement within node groups.
- Added functionality to create and remove field frames based on node arrangements.
- Developed `passages.py` to find unobstructed paths for connections around calculation frames.
- Implemented `references.py` to route shared results on peripheral tracks, ensuring efficient distribution of outputs.
- Created `sections.py` to reserve space for field calculations adjacent to geometry consumers.
- Added `sources.py` to position shared calculation sources effectively beside their distribution channels.
- Enhanced outline smoothing with `outline_smoothing.py` to adapt camera depth along original outlines.
This commit is contained in:
2026-09-12 12:19:07 +08:00
parent dd32ccdc44
commit 5b2dc59f79
57 changed files with 2253 additions and 700 deletions

View File

@@ -3,6 +3,20 @@
from graphlib import TopologicalSorter
def repeat_regions(node_group, positions, sizes):
"""Bound repeat execution and calculations without peripheral routing corners."""
regions = []
for entry, end, members in node_zones(node_group):
if entry.bl_idname != "GeometryNodeRepeatInput":
continue
nodes = {node for node in members if node.bl_idname not in {"NodeReroute", "NodeFrame"}}
regions.append((members, (positions[entry][0] - 60,
positions[end][0] + sizes[end].width + 60,
max(positions[node][1] for node in nodes) + 60,
min(positions[node][1] - sizes[node].height for node in nodes) - 40)))
return regions
def node_zones(node_group):
"""Return each paired entry, exit, and its data-dependent node membership."""
parents = {node: set() for node in node_group.nodes}