Possible to add to Quick Favorites menu from addon?

No one on BA or here seems to have asked about this yet and I didn’t spot anything in the beta API docs etiher.

I have a personal addon that takes a default blender install and customizes everything and I’d like to pre-fill the Quick Favorites menu with items so I don’t have to re-do it everytime. Will this eventually be possible?

The quick favorites options are saved in the user preferences file. Just copy over your userpref.blend file and you should be just fine.

You can edit user preferences through bpy.context.user_preferences: https://docs.blender.org/api/current/bpy.context.html#bpy.context.user_preferences

It’s safer and more transparent to have my addon do it; beta changes and later versions can shift things around and user prefs may drift over time without me remembering that I had changed/saved something. And I can put my addon in source control to track desired changes over time etc.

The new 2.80 docs are here btw: https://docs.blender.org/api/blender2.8 From there I didn’t spot anything in the UserPreferences type related to quick favs… I think they were hastily added and not fully exposed :-/

2 Likes

AFAICT, there is no bpy.context.user_prefetences. There is a bpy.context.prefetences but it is read only.

1 Like

It was read-only in 2.79 too, it’s been changed to bpy.context.preferences in 2.80 but I’ve never managed to access the Quick Favorites menu, I’m reviving this post hoping I’ll find a way to access it someday…