Eraser Nub

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
J. Baker
Posts: 1155
Joined: Wed Mar 23, 2005 10:22 am
Location: USA
Contact:

Eraser Nub

Post by J. Baker »

Using a stylus in Moho and the eraser always leaves a nub behind? Anyone know how to solve this?

Image
User avatar
Víctor Paredes
Site Admin
Posts: 5870
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Re: Eraser Nub

Post by Víctor Paredes »

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.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
J. Baker
Posts: 1155
Joined: Wed Mar 23, 2005 10:22 am
Location: USA
Contact:

Re: Eraser Nub

Post by J. Baker »

I erased the lines but it left these nubs behind. After I erase, they just pop into place. I circled the "nubs" that I talking about.

Image
User avatar
Greenlaw
Posts: 11013
Joined: Mon Jun 19, 2006 9:45 am
Location: Los Angeles
Contact:

Re: Eraser Nub

Post by Greenlaw »

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:
Image

Eraser+ Options:
Image

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
User avatar
J. Baker
Posts: 1155
Joined: Wed Mar 23, 2005 10:22 am
Location: USA
Contact:

Re: Eraser Nub

Post by J. Baker »

That's interesting. Thanks!

Yeah, I wish it didn't replace the original either. Oh and yes, using version 14.4. :D
User avatar
Greenlaw
Posts: 11013
Joined: Mon Jun 19, 2006 9:45 am
Location: Los Angeles
Contact:

Re: Eraser Nub

Post by Greenlaw »

Quick demo...

Image

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
User avatar
J. Baker
Posts: 1155
Joined: Wed Mar 23, 2005 10:22 am
Location: USA
Contact:

Re: Eraser Nub

Post by J. Baker »

Wow! That's much faster. Moho needs to incorporate this. So that way you don't lose the original Eraser tool.
User avatar
SimplSam
Posts: 1301
Joined: Thu Mar 13, 2014 9:09 am
Location: London, UK
Contact:

Re: Eraser Nub

Post by SimplSam »

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
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
User avatar
J. Baker
Posts: 1155
Joined: Wed Mar 23, 2005 10:22 am
Location: USA
Contact:

Re: Eraser Nub

Post by J. Baker »

Thank you very much, SimplSam! :D
User avatar
synthsin75
Posts: 10505
Joined: Mon Jan 14, 2008 2:20 pm
Location: Oklahoma
Contact:

Re: Eraser Nub

Post by synthsin75 »

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.
User avatar
Greenlaw
Posts: 11013
Joined: Mon Jun 19, 2006 9:45 am
Location: Los Angeles
Contact:

Re: Eraser Nub

Post by Greenlaw »

Thanks for giving us these choices, SimplSam and Synthsin75! You guys are awesome! :D

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
User avatar
synthsin75
Posts: 10505
Joined: Mon Jan 14, 2008 2:20 pm
Location: Oklahoma
Contact:

Re: Eraser Nub

Post by synthsin75 »

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)

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/\
:wink:
Post Reply