AttachNodeAdder
AttachNodeAdder adds new dynamic attach nodes, or updates an existing node with the same nodeID, for a single V-SwiFT variant.
Purpose
Use this transformer when a variant needs a different attachment point layout without replacing the whole part definition. It is especially useful for optional mounts, alternate top nodes, or B9-style geometry variants that expose extra stack nodes.
Type
Source-backed runtime type: VSwift.Modules.Transformers.AttachNodeAdder
Fields
Nodes:List<AttachNodeDefinition>Each node definition is expected to provide
nodeID,size,position, andorientation
Behavior
ApplyCommon: no effectApplyInOab: for each entry inNodes, V-SwiFT looks for an existing node with the same tag. If it finds one, it updates that node's local position and size. If it does not, it creates a new dynamic stack node.ApplyInFlight: no effect
State handling
Reverter: yes, via a dynamic attach-node reverter scoped to the added node IDs
Saves information: no
Visualizes information: no
Example
This is a minimal fragment with the real V-SwiFT field names. The exact vector/object literal form follows normal Patch Manager object syntax.
@use "VSwift:*"
@parts {
#my_adapter_part {
@include part-switch() {
VariantSets +: [{
VariantSetId: "mount",
VariantSetLocalizationKey: "MyMod/VSwift/Mount",
Variants: [{
VariantId: "radial",
VariantLocalizationKey: "MyMod/VSwift/Radial",
Transformers: [{
Name: "AttachNodeAdder",
Nodes: [{
nodeID: "radialMount",
size: 1,
position: { x: 0, y: 0.35, z: 0 },
orientation: { x: 0, y: 1, z: 0 }
}]
}]
}]
}];
}
}
}Caveats
This transformer only affects OAB-time part setup. It does not apply changes during flight.
Existing nodes are matched by
nodeID, so duplicate IDs will be treated as updates rather than separate nodes.For moving stock nodes without creating dynamic ones, use
AttachNodeMoverinstead.