Using new Blender ID addon public API
This commit is contained in:
parent
364cc75548
commit
1bb32033b6
@ -33,14 +33,14 @@ class BlenderCloudPreferences(AddonPreferences):
|
|||||||
|
|
||||||
# Carefully try and import the Blender ID addon
|
# Carefully try and import the Blender ID addon
|
||||||
try:
|
try:
|
||||||
import blender_id.profiles as blender_id_profiles
|
import blender_id
|
||||||
except ImportError:
|
except ImportError:
|
||||||
blender_id_profiles = None
|
blender_id = None
|
||||||
blender_id_profile = None
|
blender_id_profile = None
|
||||||
else:
|
else:
|
||||||
blender_id_profile = blender_id_profiles.get_active_profile()
|
blender_id_profile = blender_id.get_active_profile()
|
||||||
|
|
||||||
if blender_id_profiles is None:
|
if blender_id is None:
|
||||||
blender_id_icon = 'ERROR'
|
blender_id_icon = 'ERROR'
|
||||||
blender_id_text = "This add-on requires Blender ID"
|
blender_id_text = "This add-on requires Blender ID"
|
||||||
blender_id_help = "Make sure that the Blender ID add-on is installed and activated"
|
blender_id_help = "Make sure that the Blender ID add-on is installed and activated"
|
||||||
|
@ -68,8 +68,8 @@ def blender_id_profile() -> dict:
|
|||||||
if not active_user_id:
|
if not active_user_id:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
import blender_id.profiles
|
import blender_id
|
||||||
return blender_id.profiles.get_active_profile()
|
return blender_id.get_active_profile()
|
||||||
|
|
||||||
|
|
||||||
def pillar_api(pillar_endpoint: str = None) -> pillarsdk.Api:
|
def pillar_api(pillar_endpoint: str = None) -> pillarsdk.Api:
|
||||||
|
Reference in New Issue
Block a user