mapped fn doubleChannel node type:3 targetChannel:1 sourceChannel:2 collapse:off geometryOnly:on = if isvalidnode node do
(
if (not geometryOnly or iskindof node GeometryClass) do
(
local count = node.modifiers.count
ChannelInfo.CopyChannel node type targetChannel
ChannelInfo.PasteChannel node type sourceChannel
if node.modifiers.count > count do
(
node.modifiers[1].name = "CH" + targetChannel as string + "->" + "CH" + sourceChannel as string
)
if collapse do collapseStack node
ok
)
)
/*
(
mode = getCommandPanelTaskMode()
if mode != #create do setCommandPanelTaskMode mode:#create
doubleChannel (selection as array)
if mode != #create do setCommandPanelTaskMode mode:mode
)
*/