-- ************************************************** -- Provide Moho with the name of this script object -- ************************************************** ScriptName = "DR_ListSourceImage" -- ************************************************** -- General information about this script -- ************************************************** DR_ListSourceImage = {} function DR_ListSourceImage:Name() return "List Source image..." end function DR_ListSourceImage:Version() return "1.0" end function DR_ListSourceImage:Description() return "List the source image of an image layer" end function DR_ListSourceImage:Creator() return "David Rylander, 2006" end function DR_ListSourceImage:UILabel() return("List Source Image...") end -- ************************************************** -- The guts of this script -- ************************************************** function DR_ListSourceImage:Run(moho) -- check if the layer is an switch layer if (moho.layer:LayerType() ~= MOHO.LT_IMAGE) then LM.GUI.Alert(LM.GUI.ALERT_INFO, "This Script only works with Image Layers.", nil, nil, "OK", nil, nil) return end moho:LayerAsImage(moho.layer) LM.GUI.Alert(LM.GUI.ALERT_INFO, "Source Image:", (moho.layer:SourceImage()), nil, "OK", nil, nil) end