-- ************************************************** -- Provide Moho with the name of this script object -- ************************************************** ScriptName = "GE_Select_Released_Points" -- ************************************************** -- General information about this script -- ************************************************** GE_Select_Released_Points = {} function GE_Select_Released_Points:Name() return "Select Released Points" end function GE_Select_Released_Points:Version() return "1.0" end function GE_Select_Released_Points:Description() return "Select all the released points and unselect the others." end function GE_Select_Released_Points:Creator() return "Genete" end function GE_Select_Released_Points:UILabel() return("Select Released Points") end function GE_Select_Released_Points:IsEnabled(moho) if(moho:ParentSkeleton() ~= nil and moho:Mesh() ~= nil) then return true else return false end end function GE_Select_Released_Points:Run(moho) local mesh = moho:Mesh() if (mesh == nil) then return end local skel = moho:ParentSkeleton() if (skel == nil) then return end moho.document:PrepUndo(moho.layer) moho.document:SetDirty() for i=0, mesh:CountPoints()-1 do local p = mesh:Point(i) if (p.fParent == -1 ) then p.fSelected = true else p.fSelected = false end end end -- function