4 This addon allows you to authenticate your Blender with your
5 [Blender ID](https://www.blender.org/id/) account. This authentication
6 can then be used by other addons, such as the
7 [Blender Cloud addon](https://developer.blender.org/diffusion/BCA/)
12 Blender ID add-on version 1.2.0 removed some workarounds necessary for
13 Blender 2.77a. As such, versions 1.1.x are the last versions compatible with
14 Blender 2.77a, and 1.2.0 and newer require at least Blender 2.78.
16 Blender ID add-on version 2.0 is the first to support and require Blender 2.80+.
22 * To build the addon, run `python3 setup.py bdist`
23 * To bundle the addon with Blender, run `python3 setup.py bdist bundle --path
24 ../blender-git/blender/release/scripts/addons`.
25 * If you don't want to bundle, you can install the addon from Blender
26 (User Preferences → Addons → Install from file...) by pointing it to
27 `dist/blender_id*.addon.zip`.
33 * Install the addon as described above.
34 * Enable the addon in User Preferences → Addons → System.
35 * Sign up for an account at the
36 [Blender ID site](https://www.blender.org/id/) if you don't have an
38 * Log in with your Blender ID and password. You only have to do this
41 Your password is never saved on your machine, just an access token. It
42 is stored next to your Blender configuration files, in
44 * Linux and similar: `$HOME/.config/blender/{version}/config/blender_id`
45 * MacOS: `$HOME/Library/Application Support/Blender/{version}/config/blender_id`
46 * Windows: `%APPDATA%\Blender Foundation\Blender\{version}\config\blender_id`
48 where `{version}` is the Blender version.
51 Using the addon from another addon
52 ----------------------------------
54 The following functions can be used from other addons to use the Blender
57 **blender_id.get_active_profile()** returns the `BlenderIdProfile` that
58 represents the currently logged in user, or `None` when the user isn't
62 class BlenderIdProfile:
64 username = 'username@example.com'
65 token = '41344124-auth-token-434134'
68 **blender_id.get_active_user_id()** returns the user ID of the logged
69 in user, or `''` when the user isn't logged in.
71 **blender_id.is_logged_in()** returns `True` if the user is logged
72 in, and `False` otherwise.
75 Here is an example of a simple addon that shows your username in its
78 lang=python,name=demo_blender_id_addon.py
79 # Extend this with your info
81 'name': 'Demo addon using Blender ID',
82 'location': 'Add-on preferences',
90 class DemoPreferences(bpy.types.AddonPreferences):
93 def draw(self, context):
96 profile = blender_id.get_active_profile()
98 self.layout.label('You are logged in as %s' % profile.username)
100 self.layout.label('You are not logged in on Blender ID')
104 bpy.utils.register_module(__name__)
108 bpy.utils.unregister_module(__name__)
111 if __name__ == '__main__':