| 299 | |
| 300 | template<typename Delegate> |
| 301 | void ForEachLayerOutput(LayerSelectionInfo::LayerInfoContainer& layerInfos, |
| 302 | LayerSelectionInfo& layerInfo, |
| 303 | Delegate function) |
| 304 | { |
| 305 | Layer& layer = *PolymorphicDowncast<Layer*>(layerInfo.m_Layer); |
| 306 | |
| 307 | for (auto& outputSlot : layer.GetOutputSlots()) |
| 308 | { |
| 309 | for (auto& output : outputSlot.GetConnections()) |
| 310 | { |
| 311 | Layer& childLayer = output->GetOwningLayer(); |
| 312 | |
| 313 | auto childInfo = layerInfos.find(&childLayer); |
| 314 | if (childInfo != layerInfos.end()) |
| 315 | { |
| 316 | function(childInfo->second); |
| 317 | } |
| 318 | } |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | void AssignSplitId(LayerSelectionInfo::LayerInfoContainer& layerInfos, LayerSelectionInfo& layerInfo) |
| 323 | { |