mark1bean / live-effect-functions-for-illustrator

Convenience functions for Adobe Illustrator's PageItem.applyEffect method.
MIT License
27 stars 4 forks source link

How to remove previously applied effect #2

Open igormatkovic opened 2 years ago

igormatkovic commented 2 years ago

I'm trying to apply a drop-shadow to an existing text object but the issue I'm facing is that the object already has a drop-shadow applied so I'm just duplicating the same shadow multiple times.

Is there a way to either check for an existing shadow and remove it or overwrite the previous one so it's not duplicated?

Thanks

mark1bean commented 2 years ago

@igormatkovic There's no straightforward way, because the scripting API has no access to the appearance, except for the base fill and stroke. I did look into making a helper function to "reset" the appearance, but it just wasn't easy or very successful for general usage.

Have a look at this answer for some ideas. Your best bet might be to set a graphic style and apply that to the object before applying the live effect.

If you come up with a useful general function, please post here and I might be able to include it.