Code: Select all
local offset = moho:PixelToDoc((mouseEvent.pt.x - mouseEvent.startPt.x) / 16)
local maxWidth = moho:PixelToDoc(64)
if (self.numSel == 1) then
local pt = mesh:Point(self.selID)
pt.fWidth.value = pt.fTempWidth + offset
pt.fWidth.value = LM.Clamp(pt.fWidth.value, 0, maxWidth)
pt.fWidth:StoreValue()
else
for i, pt in self.selList do
pt.fWidth.value = pt.fTempWidth + offset
pt.fWidth.value = LM.Clamp(pt.fWidth.value, 0, maxWidth)
pt.fWidth:StoreValue()
end
end
Code: Select all
if (pt.fWidth.value < 0) then
pt.fWidth:SetValue(moho.frame, 0)
end
I assume Moho's rendering engine uses the negative value to indicate that no outline is selected. But would it be possible to change this into -64 and make it possible that line widths between -64 (not inclusive) and 0 are not rendered, but still be considered outlines?
It would certainly solve this little artistic problem.
Added: Err, of course, if anyone drags the offset beyond -64, the same problem occurs as when you drag too far to the right with your mouse and make all points 64 pixels wide. So the method is not foolproof, but it would be an improvement.