floralQuaFloral Posted November 28, 2021 Share Posted November 28, 2021 Hello! I've been making an Effect plugin recently and I've hit a roadblock. It's designed to catch redundant colours in pixel art - so for instance if you have two very similar shades of pink in the same spritesheet, this would identify them and prompt the user on which they want to keep. Naturally, this means a dialogue prompt comes up when the effect runs. However I've noticed that when the effect's UI is up, it starts running the Render() function immediately - which means while you're trying to change the parameters, it starts spamming you with dialogue boxes... Basically, I need a way to prevent all that code in my Render() function from running during the preview, so it'll only render when the user clicks "Okay" after choosing the parameters. It'd be ideal if I can detect this - like with a simple check for "Is the parameters window still open" or something - but I'd still be satisfied with just making it not run at all. I'm using CodeLab to make this, if that's relevant. This is basically the last thing I need to figure out before I can get this working, so I'd really appreciate any help! Quote ukiki brick Link to comment Share on other sites More sharing options...
null54 Posted November 28, 2021 Share Posted November 28, 2021 23 minutes ago, floralQuaFloral said: Basically, I need a way to prevent all that code in my Render() function from running during the preview You would need to write your Effect in Visual Studio with a Windows Forms dialog to have control over when Render is executed. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint Shop Pro Filetype | RAW Filetype | WebP Filetype The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.