< Previous | Contents | Next >

Example

This simple example additively merges the FG over the BG and provides no further options.


FuRegisterClass("SimpleMerge", CT_Tool, { REGS_Category = "Fuses\\Samples", REGS_OpIconString = "SMrg", REGS_OpDescription = "Simple Merge",

})


function Create()


InBackground = self:AddInput("Background", "Background", { LINKID_DataType = "Image",

LINK_Main = 1,

})


InForeground = self:AddInput("Foreground", "Foreground", { LINKID_DataType = "Image",

LINK_Main = 2,

})


OutImage = self:AddOutput("Output", "Output", { LINKID_DataType = "Image",

LINK_Main = 1,

})

end


function Process(req)

local bg = InBackground:GetValue(req) local fg = InForeground:GetValue(req)


local out = bg:Copy()

out = bg:MergeOf(fg, {MO_ApplyMode = "Merge"})


OutImage:Set(req, out)

end