In Moho 13 (R.I.P) PSD images were distinguished from other normal images with the PSD insignia. It would be great if we could have that feature back.
It also had a handy 'Duplicate as PNG' feature. It would be great to have that also but with some prompts about naming/location/prefix etc.
and in an ideal world the Type of layer would also be 'PSD Image' or 'Image PSD' as opposed to 'Image' - so that they are searchable/filterable.
and in an even more ideal world there would be access to a script function DuplicateLayerAsPng.
PSD insignia and Duplicate as PNG
Moderators: Víctor Paredes, Belgarath, slowtiger
PSD insignia and Duplicate as PNG
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
- synthsin75
- Posts: 10047
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: PSD insignia and Duplicate as PNG
If you want a hack in the meantime, drop this into your tool folder to silently prefix every PSD layer name with "(PSD) ", when selected.
Code: Select all
-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************
ScriptName = "Syn_PSDLabel"
-- **************************************************
-- General information about this script
-- **************************************************
Syn_PSDLabel = {}
function Syn_PSDLabel:Name()
return "PSD Label"
end
function Syn_PSDLabel:Version()
return "0.1"
end
function Syn_PSDLabel:Description()
return "Label PSD layers"
end
function Syn_PSDLabel:Creator()
return "©2021 J.Wesley Fowler (synthsin75)"
end
function Syn_PSDLabel:UILabel()
return "SYN: PSD Label"
end
-- **************************************************
-- The guts of this script
-- **************************************************
function Syn_PSDLabel:ColorizeIcon()
return true
end
function Syn_PSDLabel:IsRelevant(moho)
--label PSD layers
if (moho.layer:LayerType() == MOHO.LT_IMAGE) then
local prefix = "(PSD)"
local len = 5
local name = moho.layer:Name()
if (moho:LayerAsImage(moho.layer):IsPSDImage()) then
if (name:sub(1,len) ~= prefix) then
moho.layer:SetName(prefix .. " " .. name)
end
else
if (name:sub(1,len) == prefix) then
layer:SetName(name:sub(len+2))
end
end
moho:UpdateUI()
end
return false
end
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: PSD insignia and Duplicate as PNG
Thanks. I am playing with a variation of this and TAGS as I need to preserve the layer names.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam