Skip to content

Conversation

@nickvanluyk
Copy link

Fixes #1004

Problem

Blender 5.0 removed IDProperties support from AddonPreferences, causing:
TypeError: this type doesn't support IDProperties

Solution

  • Removed custom get/set methods (getCacheFolder, setCacheFolder)
  • Replaced with standard StringProperty storage
  • Added validateCacheFolder() method for validation and folder creation
  • Updated register() to validate cache folder on startup

Testing

✅ Tested on Blender 5.0
✅ Maintains backward compatibility
✅ Cache folder setting now works correctly

Files Changed

  • prefs.py - Core fix for AddonPreferences compatibility

…nces

Blender 5.0 removed IDProperties support from AddonPreferences.
   - Removed custom get/set methods for cacheFolder
   - Added validateCacheFolder() method
   - Updated register() to validate folder on startup
   
   Fixes domlysz#1004 (comment)
@domlysz
Copy link
Owner

domlysz commented Dec 5, 2025

Hi thank you ! Reviewed quickly the PR this morning, I dont think it completly replace the originals get/set methods because the new validateCacheFolder method you introduce is called only once (when reading prefs.py) and not every time the cache folder property is reading or writing. Nevertheless, the PR does the job, and the code inside the get/set methods is not crucial, so if will merge it this weekend if I can't find an equivalent with the new API.

@nickvanluyk
Copy link
Author

nickvanluyk commented Dec 5, 2025

Hi, please do not Merge it yet as i have found a couple issues with this version including what you said and ill try and fix them later today.

@domlysz
Copy link
Owner

domlysz commented Dec 5, 2025

ok I think I found a simple fix 8e5dd39

@nickvanluyk
Copy link
Author

This is indeed a way better way of fixing it!
Great work!

@nickvanluyk nickvanluyk closed this Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIXED] Blender 5.0 Cache Folder Issue - Working Solution Attached

2 participants