"Fossies" - the Fresh Open Source Software Archive

Member "blender-2.78-windows32/2.78/scripts/addons/blender_id/README.md" (2 Sep 2016, 3419 Bytes) of archive /windows/misc/blender-2.78-windows32.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Blender ID addon

This addon allows you to authenticate your Blender with your Blender ID account. This authentication can then be used by other addons, such as the Blender Cloud addon

Blender compatibility

Blender ID add-on version 1.2.0 removed some workarounds necessary for Blender 2.77a. As such, versions 1.1.x are the last versions compatible with Blender 2.77a, and 1.2.0 and newer require at least Blender 2.78.

Building & Bundling

Using the addon

Your password is never saved on your machine, just an access token. It is stored next to your Blender configuration files, in

where {version} is the Blender version.

Using the addon from another addon

The following functions can be used from other addons to use the Blender ID functionality:

blender_id.get_active_profile() returns the BlenderIdProfile that represents the currently logged in user, or None when the user isn’t logged in:

class BlenderIdProfile:
    user_id = '41234'
    username = 'username@example.com'
    token = '41344124-auth-token-434134'

blender_id.get_active_user_id() returns the user ID of the logged in user, or '' when the user isn’t logged in.

blender_id.is_logged_in() returns True if the user is logged in, and False otherwise.

Here is an example of a simple addon that shows your username in its preferences panel:

# Extend this with your info
bl_info = {
    'name': 'Demo addon using Blender ID',
    'location': 'Add-on preferences',
    'category': 'System',
    'support': 'TESTING',

import bpy

class DemoPreferences(bpy.types.AddonPreferences):
    bl_idname = __name__

    def draw(self, context):
        import blender_id

        profile = blender_id.get_active_profile()
        if profile:
            self.layout.label('You are logged in as %s' % profile.username)
            self.layout.label('You are not logged in on Blender ID')

def register():

def unregister():

if __name__ == '__main__':