
Eraser Nub
Moderators: Víctor Paredes, Belgarath, slowtiger
- Víctor Paredes
- Site Admin
- Posts: 5870
- Joined: Tue Jan 25, 2005 3:18 pm
- Location: Barcelona/Chile
- Contact:
Re: Eraser Nub
I'm not sure I'm understanding your post correctly, but the Eraser in Moho is different to a bitmap eraser.
Instead of removing pixels, it removes sections of the vector and vector lines can end with flat or round caps, depending on the stroke's properties.
Instead of removing pixels, it removes sections of the vector and vector lines can end with flat or round caps, depending on the stroke's properties.
Moho co-owner
Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
Re: Eraser Nub
Re: Eraser Nub
Are you using Moho 14.4? If so, the current native Eraser doesn't support Trim. You can get this option back by installing SimplSam's Eraser+.
SS - Eraser+
Note that this tool replaces the existing eraser with a version that supports some additional features. It's a little weird because you will also see a custom icon for the tool in a lower section, and you might think you still have the native Eraser tool. (Well, anyway, I did.) By design, the tool is duplicated in both places.
(Personally, I don't think it should do this, because it could override a future version of the native Eraser that may sport new features. I would prefer to choose which version I wanted to use in the Tools window. If Eraser+ didn't override the native Eraser tool, I would simply re-assign the native keyboard shortcut to Eraser+.)
Here's a comparison, before and after installing Eraser+...
Native Eraser Options:

Eraser+ Options:

Once you have Eraser+ installed, make sure Trim is enabled, and it should remove the line cleanly.
Despite the duplication in the Tools window, I highly recommend this Tool! And while you're at it, check out Sam's Blob Brush+
SS - Eraser+
Note that this tool replaces the existing eraser with a version that supports some additional features. It's a little weird because you will also see a custom icon for the tool in a lower section, and you might think you still have the native Eraser tool. (Well, anyway, I did.) By design, the tool is duplicated in both places.
(Personally, I don't think it should do this, because it could override a future version of the native Eraser that may sport new features. I would prefer to choose which version I wanted to use in the Tools window. If Eraser+ didn't override the native Eraser tool, I would simply re-assign the native keyboard shortcut to Eraser+.)
Here's a comparison, before and after installing Eraser+...
Native Eraser Options:

Eraser+ Options:

Once you have Eraser+ installed, make sure Trim is enabled, and it should remove the line cleanly.
Despite the duplication in the Tools window, I highly recommend this Tool! And while you're at it, check out Sam's Blob Brush+
Animations, Tutorials, and Cats (Oh, My!) Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | My DreamWorks Animation Reels & Others
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | My DreamWorks Animation Reels & Others
Re: Eraser Nub
That's interesting. Thanks!
Yeah, I wish it didn't replace the original either. Oh and yes, using version 14.4.
Yeah, I wish it didn't replace the original either. Oh and yes, using version 14.4.
Re: Eraser Nub
Quick demo...

BTW, the tool in the bottom left corner in my Draw+ section is the duplicate tool.

BTW, the tool in the bottom left corner in my Draw+ section is the duplicate tool.
Animations, Tutorials, and Cats (Oh, My!) Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | My DreamWorks Animation Reels & Others
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | My DreamWorks Animation Reels & Others
Re: Eraser Nub
Wow! That's much faster. Moho needs to incorporate this. So that way you don't lose the original Eraser tool.
Re: Eraser Nub
The reason why it replaces the built-in tool is because that was/is the only way to also allow it to be integrated as the Erase function for Drawing Pens and the Freehand & Blob Brush tools.
However, bowing to significant political pressure - I have now uploaded an unintegrated / non-replacing version, which sits alongside the built in tool - without affecting it.
The unintegrated version has the same filename as the integrated version, so you can simply download and replace.
https://mohoscripts.com/script/ss_eraser/unintegrated
However, bowing to significant political pressure - I have now uploaded an unintegrated / non-replacing version, which sits alongside the built in tool - without affecting it.
The unintegrated version has the same filename as the integrated version, so you can simply download and replace.
https://mohoscripts.com/script/ss_eraser/unintegrated
Moho 14.4 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.4 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Moho 14.4 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
- synthsin75
- Posts: 10505
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Re: Eraser Nub
If you name the file the same as the LM tool, you won't get the extra tool in the toolbar and it will use your custom icon in the draw section.
So there's no confusion about replacement tools, I've added this at line 1174 in mine: layout:AddChild(LM.GUI.StaticText("<REPLACEMENT>"))
I think this the best of both worlds. LM-only functionality with a clear indication that it's a replacement tool.
So there's no confusion about replacement tools, I've added this at line 1174 in mine: layout:AddChild(LM.GUI.StaticText("<REPLACEMENT>"))
I think this the best of both worlds. LM-only functionality with a clear indication that it's a replacement tool.
- 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: Eraser Nub
Thanks for giving us these choices, SimplSam and Synthsin75! You guys are awesome!
Will give them both a try tonight.
Will give them both a try tonight.
Animations, Tutorials, and Cats (Oh, My!) Little Green Dog Channel on YouTube!
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | My DreamWorks Animation Reels & Others
D.R. Greenlaw
Artist/Partner - Little Green Dog
Little Green Dog Channel | My DreamWorks Animation Reels & Others
- synthsin75
- Posts: 10505
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Re: Eraser Nub
For any scripters interested, I've written the below code to help warn users if they have a third-party replacement tool installed when they update Moho.
It checks the Moho version and prompts the user to check if the new stock tool has new features.
EDIT:
I've figured out a more robust and universal way to mod stock tool replacements so they warn you when an update may have a new version of the tool.
This is one code block that can be pasted on the first line of the IsEnabled fucntion, completely as-is... no editing script names or anything. Just paste this right below:
function XX_ExampleTool:IsEnabled(moho)

It checks the Moho version and prompts the user to check if the new stock tool has new features.
EDIT:
I've figured out a more robust and universal way to mod stock tool replacements so they warn you when an update may have a new version of the tool.
This is one code block that can be pasted on the first line of the IsEnabled fucntion, completely as-is... no editing script names or anything. Just paste this right below:
function XX_ExampleTool:IsEnabled(moho)
Code: Select all
--syn\/
if (not self.initializedVersion) then
local name
for n, value in pairs(_G) do
if rawequal(value, self) then
name = n
break
end
end
-- inject save pref remotely
local origSavePrefs = self.SavePrefs
self.SavePrefs = function(self, prefs)
prefs:SetString(name..".MohoVer", self.MohoVer)
if origSavePrefs then return origSavePrefs(self, prefs) end
end
-- load pref manually
local path = moho:UserPrefsFile()
local key = "\""..name..".MohoVer".."\""
for line in io.lines(path) do
if (string.find(line, key, 1, true)) then
self.MohoVer = string.match(line, '"[^"]+"%s+"([^"]+)"')
break
end
end
self.initializedVersion = true
self.foundName = name
-- warn user of replacement tool when Moho updates
if (self.MohoVer == nil) or (self.MohoVer ~= moho:AppVersion()) then
local name = self.foundName
local button = LM.GUI.Alert(LM.GUI.ALERT_WARNING, name.."\n This installed tool is a third-party replacement of the stock tool.\n If you have recently updated Moho, please check if this stock tool has\n been updated, and decide if you want to remove this replacement tool.", "(If you have installed this replacement for the first time, you can ignore this message.)","", "OK", "Remind me later")
if (button == 0) then
self.MohoVer = moho:AppVersion()
end
else
self.initializedVersion = true
end
end
--syn/\
- 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/
