toe_head2001 1,786 Posted December 30, 2020 Report Share Posted December 30, 2020 I was curious about these errors, so I opened Brush Factory this morning, and I too see the error messages. Running Windows 10 20H2. I'm using IUserFilesService in a few of my plugins, and it's working fine in those. I'll take a look at what's going on in the Brush Factory source code later tonight when I get back from work. 1 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to post Share on other sites
Rick Brewster 1,749 Posted December 31, 2020 Report Share Posted December 31, 2020 13 hours ago, Joshua Lamusga said: Try this if you're having the settings problem ~~~ Try creating a folder exactly called paint.net User Files in your Documents folder at "C:\Users\your_name\Documents\" (where your_name is your current username... The name of this folder is localized (translated), so that suggestion will only work for English. I would have them click on Open Palettes Folder and see how well that works. It will automatically create all the folders if possible: 1 Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to post Share on other sites
ardneh 45 Posted December 31, 2020 Report Share Posted December 31, 2020 1 hour ago, Rick Brewster said: would have them click on Open Palettes Folder and see how well that works Made no difference. Quote Link to post Share on other sites
toe_head2001 1,786 Posted December 31, 2020 Report Share Posted December 31, 2020 (edited) @Joshua Lamusga, IUserFilesService is working correctly in this plugin; it returns the directory path without issue. The problem arises when checking if BrushFactorySettings.xml exists in that directory. If the XML file doesn't exist, then your code throws an exception. To make matters worse, the plugin won't ever create the XML file, because an instance of BrushFactorySettings never gets initialized. Edited December 31, 2020 by toe_head2001 2 3 Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to post Share on other sites
Allen Shau 2 Posted December 31, 2020 Report Share Posted December 31, 2020 Manually creating a file named C:\Users\(you)\Documents\paint.net User Files\BrushFactorySettings.xml works for me. ----- begin of BrushFactorySettings.xml ----- <BrushFactorySettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> </BrushFactorySettings> ----- end of BrushFactorySettings.xml ----- 1 1 Quote Link to post Share on other sites
Daralima 0 Posted January 1 Report Share Posted January 1 The above worked for me. However I have another issue, for me, when I add a custom (png if that matters) brush, when I turn colorize brush off, it only uses the same general texture, not the same colors? Quote Link to post Share on other sites
Joshua Lamusga 263 Posted January 1 Author Report Share Posted January 1 4 hours ago, Daralima said: when I add a custom (png if that matters) brush, when I turn colorize brush off, it only uses the same general texture, not the same colors? If you use a perfectly opaque image as a brush, Brush Factory will use the intensity of the image (V in HSV) as transparency. If you use an image with any pixel that isn't perfectly opaque, Brush Factory will use the transparency information of the image. Being PNG or not doesn't affect this behavior. I'm guessing you're using a perfectly opaque image. Hope that helps. If not, you'll need to clarify and provide an image. Quote Link to post Share on other sites
Daralima 0 Posted January 1 Report Share Posted January 1 Making the alpha 254 worked, thanks! Quote Link to post Share on other sites
n_n 0 Posted 3 hours ago Report Share Posted 3 hours ago On 12/31/2020 at 9:57 AM, Allen Shau said: Manually creating a file named C:\Users\(you)\Documents\paint.net User Files\BrushFactorySettings.xml works for me. ----- begin of BrushFactorySettings.xml ----- <BrushFactorySettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> </BrushFactorySettings> ----- end of BrushFactorySettings.xml ----- Yeah, that fixed it for me too but I'm still missing those: Quote Link to post Share on other sites
ardneh 45 Posted 1 hour ago Report Share Posted 1 hour ago Those are all pyrochild plugins. Probably should post the question there. Quote Link to post Share on other sites
n_n 0 Posted 1 hour ago Report Share Posted 1 hour ago Oh whoops. For some reason I thought those were part of brush factory. Well in that case i didn't mean to ask it here. Quote Link to post Share on other sites
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.