I’m making an “icon setup” script for my artist, and trying to automate some repetitive steps they need to do every time. I’m wondering, is there a way to set the effect style via code? I’ve tried grabbing the effectStyleId of my desired style, and then assigning it via code, however it appears to become unlinked when I do this. Any ideas?
Ah apologies, with my prior issue I was simply assigning the wrong style ID. I’ve gotten it working by basically duplicating both the effects and the effect style ID from an example icon onto my “target” icons. I’m still curious if there’s a way to load the effect in more dynamically, like how you can load in library components by their key… I suppose if nothing else, I could attach the style to a library component, and load that in dynamically.
Ah yes, I did see that, but I’m not sure how you actually get the key for the style? I see the EffectStyle type has a key parameter… but I’m not sure how to actually get my hands on the EffectStyle to extract that. The SceneNode has an effects field, and an effectStyleId, neither of which are an EffectStyle. Is there some lookup I’m overlooking, to get the EffectStyle by effectStyleId, so I can extract that key?