Files
DataBeam/DisableFeatures.lua
T
Dario Sassi 6eaba8a577 DataBeam :
- primo rilascio.
2019-04-01 15:18:51 +00:00

32 lines
948 B
Lua

-- DisableFeatures.lua by Egaltech s.r.l. 2018/04/25
-- Gestione disabilitazione delle feature selezionate
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
if EgtGetSelectedObjCount() == 0 then
EgtOutBox( 'Nessuna lavorazione selezionata', 'Disabilita lavorazioni', 'ERROR')
end
local nId = EgtGetFirstSelectedObj()
while nId do
-- verifico sia una feature
local nParentId = EgtGetParent( nId)
if EgtIsLayer( nParentId) and EgtGetName( nParentId) == 'Processings' and
EgtGetInfo( nId, 'GRP', 'i') and EgtGetInfo( nId, 'PRC', 'i') then
EgtSetInfo( nId, 'DO', 0)
EgtSetColor( nId, Color3d( 160, 160, 160))
local nAuxId = EgtGetInfo( nId, 'AUXID', 'i')
if nAuxId then
EgtSetColor( nId + nAuxId, Color3d( 160, 160, 160))
end
end
nId = EgtGetNextSelectedObj()
end
EgtDeselectAll()
EgtZoom( SCE_ZM.ALL)
-- end