Page MenuHome

Add CACHE resource type to bpy.utils.user_resource
Confirmed, NormalPublicDESIGN

Description

The bpy.utils.user_resource function takes a resource parameter, which can be chosen from [‘DATAFILES’, ‘CONFIG’, ‘SCRIPTS’, ‘AUTOSAVE’]. It would be great to have a 'CACHE' choice here too. Use cases are local caches of Blender Cloud content, or BVH/simulation caches.

On Linux and similar platforms, a possible location to return would be $HOME/.cache/blender. On Windows this might be %APPDATA%\Roaming\Blender for a regular install, and something relative to Blender's path on portable "installs". I don't know enough about MacOS to suggest something there.

Event Timeline

Sybren A. Stüvel (sybren) raised the priority of this task from to 90.
Sybren A. Stüvel (sybren) updated the task description. (Show Details)
Sybren A. Stüvel (sybren) edited a custom field.

On windows we do not want Roaming for large binary objects. The default AD policy would have these files roam with the user and for multiple gigabytes of caches this might not be a cool thing to do.

For OS X it would be ~/Library/Application Support/Blender or something like it.

@Martijn Berger (juicyfruit) would %APPDATA%\Local\Blender be good then?

Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.Mar 4 2016, 1:13 PM
Bastien Montagne (mont29) edited a custom field.