could not do a full uninstall of your add on by deleting the install folder in scripts add-ons

Issue #1705 resolved
Joe Morris @ FAST Animation Studio Toolz created an issue

I tried and tried until I realized you had that extra folder hidden somewhere in program files or app data I don't even remember I had to do a full blender uninstall and delete my app down a roaming directory to get this text to stop showing up in the console I just wanted confirmation of a full clean uninstall of your add on

Writing userprefs: "C:\Users\W\AppData\Roaming\Blender Foundation\Blender\3.6\config\userpref.blend" ok
Info: Preferences saved
Reloading external rigs...
Reloading external metarigs...

If you don't inform people of that it's not really intuitive because all other blender add-ons pretty much can be uninstalled cleanly by just deleting the folder in scripts add-ons so essentially you're not really able to uninstall and this is the latest development version you're not really able to fully uninstall your add on you know like if there was some sort of error or something… I just wanted you to know you know I'm committed to the development of your add-on you know probably as much as you guys are because it's like the best thing in the world… It might freak some people out though if they're trying to get a clean blender console window I think I tried to delete a startup and user preferences files twice and it didn't work

Comments (43)

  1. Thomas Larsson repo owner

    Hm. Some configuration files are stored in the user’s home directory. The reason is that I figured that the user always has read-write access to his home directory. I suppose the files could be stored in a directory inside the addon, but are we sure that the user always has writing rights there?

  2. Thomas Larsson repo owner

    Also, I don’t think that you want to delete you configurations when you update the addon. E.g. you don’t really want to reset the root paths to your daz installation.

  3. Noel Lang

    Some Blender addons save in ./datafiles/{ADDON} (in Windows that would be %USERPROFILE%\AppData\Roaming\Blender Foundation\Blender\{BLENDER_VERSION}\datafiles\{ADDON}), Make Human saves some of its data (not sure what) in ./{ADDON} . When upgrading Blender versions, the user always gets a notice to ask if they want to take all the configs/settings from the previous version, so that shouldn't be an issue. Plus, it has the benefit of being able to have multiple Blender + diffeomorphic installs with different configs.

    By default %APPDATA% will always be available to read/write on a home computer for that user. This would only be locked down on public/work computers. In Linux, the equivalent for Blender is $HOME/.config/blender which is in the user’s home directory already. This would be more in line with where Blender and other addons already store their configs.

    And as you say, saving it directly in the addon’s folder would be annoying when installing a new version.

  4. Alessandro Padovani

    I don’t know where other addons save preferences or if there’s a standard in blender for this.

    I see diffeomorphic already creates a “presets” folder under scripts. If we’re going to use “datafiles” then bringing there all the files together in a “import_daz” folder would make sense. So datafiles and addons will refer to the same name.

    p.s. The roaming folder is under user and intended for application data and preferences. So yes the user always has full access.

  5. Thomas Larsson repo owner

    But it is not me who decided that the presets have to live in the presets folder. Blender only looks for presets in that folder, and if you create a preset yourself with the + button the folder is created automatically.

  6. Joe Morris @ FAST Animation Studio Toolz reporter

    I concur with Noel Lang because you know if you're on a work computer a public computer then that's just that's just your situation…you're on a public computer there's nothing anybody could really do about that ………It would be more intuitive to have everything located in add-ons but the real home run swing would be to coat it so it works successfully in both situations… you should throw this on GPT 4 and see what it says I get awesome advice all the time

  7. Joe Morris @ FAST Animation Studio Toolz reporter

    Got another one for you in the latest development build I just noticed an issue it's not public \ documents it's public \ public documents I'm changing my code as well I just noticed thatC:/Users/Public/Documents/My DAZ 3D Library

  8. Joe Morris @ FAST Animation Studio Toolz reporter

    And that public documents thing is a real issue let me know………. if I need to write a separate issue for it but I'm trying to figure out now how to pass that to your code otherwise I just keep on getting no such path…. But it would give that error anyways in the latest development version even if you put documents in there instead of public documents so you know I'm just gonna update my code With public documents and wait to you guys fix that part

  9. Joe Morris @ FAST Animation Studio Toolz reporter

    OK and also just one more arbitrary question I was wondering what’s the best console output to grab if a person didn't add the right content libraries and you know the Genesis model is going to come in like with just part of her clothes and it's not going to look right I want to grab the right console output is this the right one “acnnot scan database because no Genesis mesh was found

  10. Alessandro Padovani

    From the blender manual it doesn’t seem “datafiles” is good, I mean if that’s for runtime files then preferences are not good there. May be “config“ ?

  11. Joe Morris @ FAST Animation Studio Toolz reporter

    I don't really think you should split it off. I haven't seen that many other add-ons. But I think all settings files should be located locally. In the Addons Install folder seems more intuitive as the developer you know. I like when I click a folder and delete and know it's gone… I think of the end user, the unknowing end user that has some sort of issue with your previous implementation…All the files not being centrally located in scripts addons…it would have been really hard and what if he was a professional… I think you want to treat your end. User like he is a professional and his professional life is dependent on your code…

  12. Alessandro Padovani

    As I see it, if you have a collection of addons you may zip and bring them with you in another blender installation. That’s essentially what roaming is for. Then yes if you delete the addon folder the config files are to be deleted by hand, but this is common for every application in windows. When you uninstall an application the preferences are usually left there, should you install again they’re back. Windows works this way, both blender and daz studio work this way, other addons may too.

    Then I understand if you personally can’t handle or don’t like it, but it's of little interest here.

  13. Thomas Larsson repo owner

    I think it is convenient to have the config files somewhere under the home directory, where writing rights are guaranteed and different users can have different settings. Nor is in unusual for apps to put their data there; on my computer I have folders called DAZ 3D, Visual Studio 2019 and 2021 in my Documents directory. However, it would be better if the addon put all config and data files under a single directy, e.g. called DAZ Importer, instead of spreading them out in several places. Will see to that later.

    I don’t like the idea of using Blender’s preferred paths, since they depend on the Blender version. If you want different settings you can always save and load settings files with the buttons in the global settings dialog. In that way you can choose different combinations of settings, even without changing Blender version.

    Hm. Maybe one could use presets for that instead.

  14. Noel Lang

    Any of these suggestions are fine, except for directly within the addon. Code and config/preferences should always be separated. Presets would be nice too.

    Personally, I modify my version of diffeomorphic to use Blender’s paths, as I’m probably in the minority of users who use multiple versions of diffeomorphic.

  15. Joe Morris @ FAST Animation Studio Toolz reporter

    The only thing is when you delete the import DAZ file those config files still allow for console output that was the initial thing …

    that's going to freak people out if you delete an add-on and there's still console output from it

    We're developers it's like everything's gotta be 100 percent you know you gotta be able to 100% remove something to test or you'll never know where the error is…easily

  16. Joe Morris @ FAST Animation Studio Toolz reporter

    It doesn't matter where you put the config files I forgot to say…I like documents for mine personally as long….as there's no console output after the add on folder itself has been deleted… Yeah and I agree with Noel Lang presets would be nice you know specific to the type of Genesis model…. or specific situatons…. And really explanatory tool tips 'cause people come in brand new to diffeomorphic Aren't really gonna know what most of that stuff means I usually use like at least 3 or 4 lines for my tool tips and really explain …pretty soon I'm gonna use a button to turn on verbose tool tips if I can figure that out….and if that's off it'll just be the standard blender one line tool tip….

    I forgot to say I'm currently in talks with Daz Studio to have my add on be the only blender add-on in the world listed on daz3d.com… besides their own... So if somebody wants to get in on the action as far as helping me develop my add-on or if I'm successful if there's some way I could use a placement on their website to further your guys interest let me know you know I'm all about supporting diffeomorphic in any way I can….. Here's my latest development version it's the one that I upload to DAZ Studio if anybody wants to try it out we got a new character backup system so once you import a character it's yours forever in a zipped file it really keeps things all secure than if you want to reload the character all you do is just it's one click in blender to have your character back any character you want unlimited

  17. Joe Morris @ FAST Animation Studio Toolz reporter

    https://drive.google.com/drive/folders/1fklvyXr6wt57l7G_lrvEEBVAYRVuzQxk?usp=sharing

    And I forgot to say as far as your interest you know advertise for you promote your other interests or whatever you know I'm all about supporting the community… Extreme PBR just came out with new price points As a result of my suggesting they do that……….so now as a result people can get 2000 2K textures with my discount coupon of 25% for $44 (2K is perfect for when you're working on 1GB scenes like I do ) and I advertise that in my add on so that's just an example but I'd be happy to advertise for you I'm saying the same thing to DAZ studio too… We also got a force close button for Daz Studio inside the add on so you don't have to wait 15 seconds or 30 seconds after closing to reopen it anymore…

  18. Thomas Larsson repo owner

    The code for the global settings dialog has been rewritten. This is something that I had wanted to do for a long time, but postponed because it is a bit disruptive. When you open Blender now, the daz root paths are retained but the other global settings are lost. Sorry for the inconvenience.

    The global settings dialog used to display scene properties with weird names, which were created when the window opened. Now the dialog contains its own properties, with the same names as the corresponding global settings, and the temporary properties disappear when the dialog is closed. One advantage of the new way, apart from cleaner code, is that the global settings window now has presets.

  19. Joe Morris @ FAST Animation Studio Toolz reporter

    Thank you so much did you get that public documents path I can't really pass that to your add-on it won't accept it

  20. Joe Morris @ FAST Animation Studio Toolz reporter

    and where is save global settings because that would be nice to be able to save your settings out… Like you could before.. are those API items still active to do that with the API

    bpy.ops.daz.save_settings_file

    bpy.ops.daz.load_settings_file

    Because that is an important part… Oh I see the operator presets at the top OK that's pretty awesome… Will the API change at all as far as the upper two operators I pasted….

    Also noticed when you click on load root path and add content libraries at the bottom a browser window opens up I select my library I just name it “PUBLIC DAZ LIBRARY” that's where I keep all my assets.. But I very carefully select that folder but what ends up printed in global settings is a subfolder of that….

    Sorry about it slightly crass nature but I wanted to give the exact results”V:/PUBLIC DAZ LIBRARY/RH00000002-01_ShePeesforGenesis8Female/Content” OK and I noticed when I click load root path….which I still don't know what that is or add content library at the bottom the global settings window closes abruptly and then of course this is brand new so I'm testing it and that's a little disconcerting

    it would be great if it just stayed open… Is there a documentation on this already…

    And I noticed that it's C user public ….public documents in explorer ….but in the blender window for some reason it's C user public documents… That's kinda strange… So is that still fine as far as how you have that set up it's supposed to just go whatever the blender window says? … Then if so why do I keep getting “no such path”… I call your DAZ easy import operator right i've been using it for a long time and it seems like all the accessing of the content library should be done inside that function….. my file layout matches yours my J S O N filing include with my add on… that are used to load temporary settings when my diffeomorphic import operator used

    It would be nice because I created an operator preset it would be nice if right after it was created that showed in the very top on the drop down box and stayed there permanently until the operator preset was changed then it's evident which preset your in

    OK and I just noticed a default blender addon stored views keeps a folder where you put your new operator folder so that's all good if blender says that's a hundred percent To put settings there

    I discovered the Genesis you know 1…3…8 and so on presets which are so awesome thank you for that but I don't think the end user just looking is gonna know they're even there I discovered it you know with all my knowledge but somebody knew to the diffeomorphic might not put two and two together …. like when you click the plus button on the pop up that opens up maybe have a button there that says browse presets and you click on it then you're amazed because it opens up a folder where you could select one of 6 presets for your specific type of character….

    I'm not sure if this is implemented yet but in the original JSON file with load settings I could send a paths To your add on

    how would I do that there is it just important to specifically go in global settings now and set your paths within diffeomorphic or can I do that in code I would like to be able to do that in code

    see I need to know how to do this now

            if os.path.exists(temp_settings_path):
                os.remove(temp_settings_path)
    
            # Save the current settings to a temporary file
            bpy.ops.daz.save_settings_file(filepath=temp_settings_path, check_existing=False)
            print("\nTemporary settings file saved:\n", temp_settings_path)
    
            # Load your desired settings file
            if os.path.exists(settings_path):
                bpy.ops.daz.load_settings_file(filepath=settings_path)
                print("\nDesired settings file loaded successfully:", settings_path)
            else:
                print("\nDesired settings file not found:\n", settings_path)
    

    Kinda just throwing out initial impressions i'm gonna go ahead and test with what operators I can find and wait to hear back from you

  21. Joe Morris @ FAST Animation Studio Toolz reporter

    ohh I did find when you savor preset it creates a global settings type file like your old JSON so that's where I'm on now testing that with save settings and load settings

  22. Joe Morris @ FAST Animation Studio Toolz reporter

    I did like it better how uh when the error and scan paths were populated already now I have to go and find directories and create them and paste them I don't even know what the original name of the files were…. still really cool though

  23. Joe Morris @ FAST Animation Studio Toolz reporter

    never mind I did something and clicked load factory settings and it brought him back so something I did erase those paths so that could be more verbose for the end user in case that happens they won't know what's going on…maybe….. and as part of using your api it would be nice to be able to right click any of the properties in global settings and copy python command and have you know setable property link right there where I could just throw it in my code and set that value

  24. Joe Morris @ FAST Animation Studio Toolz reporter

    now the presets are nice they appear to be for easy import dazz the Genesis 8 the Genesis 3 and so on but there doesn't seem to be any place to add them…

    And also for developer what would be better to do create the preset in global settings and use that in code or use the JSON Via the load settings and save settings operators since they contain the same data it does seem like it might be a better idea overall to merge and just use the PY file'cause that would be really easy to go in and search with the normal python read function and grab anything out of there ….and you don't have to mess with J S O N stuff/ j S O N coding mines already set up so not a big deal but I got a programmer writing some python code for me 'cause I'm busy for a J S O N merge function for example and it's been like three days.. but then once you know it you know it.

  25. Joe Morris @ FAST Animation Studio Toolz reporter

    OK no big deal the suggestions are still there and if you guys wanna use any of my suggestions but it's really awesome how it auto saves to your documents folder and the DAZ importer folder and I figured out you're using basically the same J S O N setup just a couple change names and that CONTENTDIRS list so I got my code all done and stuff but thanks for the update… Yeah this just seemed like a huge update but it was really easy to navigate yeah great job… But those Genesis 8 and Genesis 3 presets for example those are so awesome if you could just put like something in the API and something on the easy import DAZ dialog to where we could just add one of those out of drop down E N U M property that would be so cool you would take the guesswork out of this operation for so many people.….. i'm just gonna wait a week to see if you do so if you could let me know here I'd appreciate it else in a week i'll just go ahead and write some code to parse those and add my own preset ENUM property

  26. Joe Morris @ FAST Animation Studio Toolz reporter

    I just realized I told you about it but I don't know if it really clicked I created an awesome backup system in my add on for characters that automatically zips up every character that you import and saves it to a special backup directory it's on my panel it's under my reimport button i'm sure I gave you the link … But that is such an awesome secure system you should really really think about adding that for your end users of DIFFEOmorphic… I've also implemented an adD audio feature and many other items like disable high polyhair on import you should just go through that and like rip everything I've written everything I've written that you want that would be good for your end user like just rip it out of there and like use it because it's more important that you know the end user is happy and more people are gonna find DIFFEOMORPHIC before they find mine… Each of my tool tips is like a paragraph so even though I don't have documentation and my documentation video is kind of old you know you'll be able to figure out the angle of everything

  27. Joe Morris @ FAST Animation Studio Toolz reporter

    this is a genius idea um yeah just you guys should put a donation button in global settings and earmark some of that that comes in for doing every time you make an update get some guy off fiver you know that you can count on that you get to know to update the diffeomorphic documentation for you so it's always current with the latest development build because there's been a lot of new features you know and I've been testing diffiumorphic development like all the time and it's like really solid you know at the very least if that sounds stupid by any means then definitely should put a donation button in there'cause this is an epic creation… He could make a separate diphyomorphic documentation

  28. Joe Morris @ FAST Animation Studio Toolz reporter

    another idea you're always releasing like development builds like everyday or something you should take a look at my update system it's really secure i've been testing it all the time for like the last two months and you know then all you have to do really is copy a zip file over to a Google drive link it's easy to figure out and then write your update history and your version number Into a text file and then people could just instantly get the latest development build …. and if I notice any issues if you use it i'll just send you updates 'cause I'll be testing it all the time… and if you notice issues you can fix em and maybe send them back my way

  29. Thomas Larsson repo owner

    Sigh. Bony Joe etc, please understand that this is something that I do on my free time. If you have a bug or suggestion for improvement, please state it concisely, I neither have time nor interest in delving in long rants. You may or may not have a point, but unfortunately it is TL;DR. Sometimes less is more.

  30. Alessandro Padovani

    @Bony Joe, I understand you’re repackaging diffeomorphic and selling it as “your own“ version, that personally I’m not interested in. Then of course you can modify what you want as you wish. Here we are discussing improvements and bugs for the “official” version.

  31. Joe Morris @ FAST Animation Studio Toolz reporter

    I'm just bundling with it with my add on i'm not changing the code or anything

    I provide the documentation as well in my bundled add-on

    I always talk highly of you I don't ever say it's my own add-on

    and I'm definitely open to promoting your interests within my add-on

    or representing it in a better way as you see fit.

    I’ve bundled a lot of python libraries with my add-on probably over 15 and I’m just leverage your API like I do with any of those other ones.

    I'm in talks with Daz Studio to get it listed on Daz3D dot com as the only Blender add on on there(I'm pretty far into the process the developers are evaluating it)

    you know I'd be happy to raise my prices and cut you in on some of the profits if you want to.

    It would be the only Blender add on listed on DAZ 3D dot com so in your spare time if you wanted to get involved in the development of My add on and share in the profits that would be a way to go we could see how far we could push making the The process of getting DA Studio assets into blender in awesome and epic ways.

    For example your add-on isn't listed on DAZ 3D dot com but it should be…there might be some ways where we could help both our interests i'm open to discussing anything you know I support what you're doing and DAZ studio fully… I'm not totally in it for the money I mainly into supporting DAZ Studio interests in helping them grow even more because they give so much to the 3D community. I'm just making this add on as a tool for creating my sitcom and blender but also giving it to the world so they can experience the best workflow possible in Blender… Kind of long One but I just wanted you to know where my head was at.

    Yeah I know you guys are awesome programmers too so in closing just wanna say that I'm trying to support the official version because I only use the code that you provide so I could be testing it all the time..

  32. Joe Morris @ FAST Animation Studio Toolz reporter

    Also if you reread my suggestions they're just full of suggestions how to improve your add-on you guys are probably better programmers than me but I really excel at efficiency Logical processes … I could find ways to streamline any process….so if you check out my ideas you could take them or leave them but they could always help.

  33. Joe Morris @ FAST Animation Studio Toolz reporter

    Came up with one better way to explain my long post too i'll try and keep them short but you know I'm able to come at this from a different angle because I have a different background in you know computer repair and system automation you know I'm always making batch files to make windows stuff you know work better so you know I've added features like a restart blender function when you enable the add on it asks you if you want to restart when you install or update it ask you if you want to restart you know I'm trying to bring all that kind of thing with like informative message boxes like Adobe software might have to blender so it's just a different angle so if you're not interested in my angle you could skip over those but these angles do save button clicks and that's important for having fun in Blender…. And you have listened to a lot of my ideas so again in closing if I drone on too long it's because I think I might have a good idea and it might help if you read it but if you read it and you're not interested don't even respond… I'll just assume you're busy🙂👍

  34. Joe Morris @ FAST Animation Studio Toolz reporter

    OK last thing was an explanation but here are just concise sentences I'm still getting a reloading rigs when I manually delete the import DAZ folder and restart is that just something we need to deal with in DIFFEOMORPHIC I thought you were gonna change that with the latest update… Also when I do that I get a module not found error just saying because any other add on I've ever used I could just manually delete the folder and restart

  35. Joe Morris @ FAST Animation Studio Toolz reporter

    This is my work around it's really nice though you get that module error startup and I put this right at the start of my register function as an app timer the function call I mean and right when that module error is retrieved this just kinda wraps around it and informs that there was a module not found there because of that but you know that the add on was disabled like the console output below

    PLEASE RESTART BLENDER AFTER ENABLING OR UPDATING 'FAST'
    Reloading external rigs...
    Reloading external metarigs...
    Traceback (most recent call last):
    File "C:\Program Files\Blender Foundation\Blender 3.6\3.6\scripts\modules\addon_utils.py", line 333, in enable
    mod = import(module_name)
    ModuleNotFoundError: No module named 'import_daz'
    Writing userprefs: "C:\Users\W\AppData\Roaming\Blender Foundation\Blender\3.6\config\userpref.blend" ok
    addon_utils.disable: import_daz not disabled
    The 'import_daz' addon folder is missing. Disabling the addon.

    def disable_missing_daz_addon():
        try:
            daz_addon_key = "import_daz"  # The key or identifier for the DAZ addon
            daz_addon = bpy.context.preferences.addons.get(daz_addon_key)
    
            # Construct the path to the 'import_daz' folder based on Blender's user script directory
            daz_folder_path = os.path.join(bpy.utils.user_resource('SCRIPTS'), 'addons', daz_addon_key)
    
            # If the addon folder doesn't exist, but the addon is listed in preferences
            if not os.path.exists(daz_folder_path) and daz_addon:
                bpy.ops.preferences.addon_disable(module=daz_addon_key)
                # Optionally, print a message to inform the user
                print(f"The '{daz_addon_key}' addon folder is missing. Disabling the addon.")
        
        except ModuleNotFoundError:
            print("A module not found error occurred.")
        except Exception as e:
            print(f"An error occurred: {e}")
    
    Got lucky this is my first shot I've never seen a module not found air get handled so elegantly so it's visible to the end user what happened..
    Because then their programmers like me probably and they just were playing around and deleted their import DAZ folder
    

  36. Joe Morris @ FAST Animation Studio Toolz reporter

    And if you've had a chance to check out my add-on I fix errors in this every day i'm uploading the latest which had a couple of big ones

  37. Alessandro Padovani

    Some reorganization is done. Further modifications are not useful to anyone apart Bony Joe for "his own" version.

  38. Joe Morris @ FAST Animation Studio Toolz reporter

    The thing is when you delete the import DAZ folder there is still console output from DIFFEOMORPHIC or did you get rid of that…. And just to further say I don't change your code at all I just provide the add on in an automated installation the exact way thats suggested…I just thought that your add on would be stronger if it was manually uninstallable simply or there was some sort of message somewhere that told you how to manually uninstall it...

    could you tell me exactly what I have to delete for a complete manual uninstall

  39. Log in to comment