Removing Soft Edges

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Removing Soft Edges

Post by ggoblin »

Hi,

How do I remove a soft edge from a shapes style?

I tried setting it to 0:

Code: Select all

myshape.fMyStyle:SetSoftEdge(0)
but that just sets it to 0 but still keeps it.

Surprisingly I couldn't find one script on MohoScripts.com that has uses the command SetSoftEdge, so have no example of how to undo its effect.

I tried removing all the styles using

Code: Select all

myshape:RemoveStyles()
but that seems to ignore soft edges

Is there another command I should be using, or am I going about it the wrong way?


Thank you for your help.
User avatar
synthsin75
Posts: 9979
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Removing Soft Edges

Post by synthsin75 »

You need to use:

shape:MakePlain()

But like what you tried with RemoveStyles (which is for removing saved, "inherited" styles), this removes all shape effects.
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Removing Soft Edges

Post by ggoblin »

Thank you Wes for the swift response, will give it a go! :D

I wondered how I missed it.. but checking the documentation.. its very sparse

Image

Who needs documentation when we have Wes :D
User avatar
synthsin75
Posts: 9979
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Removing Soft Edges

Post by synthsin75 »

Just added a description to mohoscripting.com.
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Removing Soft Edges

Post by ggoblin »

Wow that was quick!

And it works brilliantly, thank you Wes! :D

BTW I didn't mean to critisise mohoscripting.com. It an invaluable, essential resource for all scripters. And considering that its created and maintained by volunteers as there is no official documentation of the Moho API, I can only admire and praise those that dedicate to this essential task for the community.
Post Reply