Hide some things in the UI except when bpy.app.debug=True

This commit is contained in:
Sybren A. Stüvel 2016-06-24 14:46:13 +02:00
parent a5df609d95
commit 4d2314e08f

View File

@ -116,7 +116,7 @@ class BlenderCloudPreferences(AddonPreferences):
icon = 'ERROR' icon = 'ERROR'
text = 'You are logged out.' text = 'You are logged out.'
help_text = 'To login, go to the Blender ID add-on preferences.' help_text = 'To login, go to the Blender ID add-on preferences.'
elif pillar.SUBCLIENT_ID not in blender_id_profile.subclients: elif bpy.app.debug and pillar.SUBCLIENT_ID not in blender_id_profile.subclients:
icon = 'QUESTION' icon = 'QUESTION'
text = 'No Blender Cloud credentials.' text = 'No Blender Cloud credentials.'
help_text = ('You are logged in on Blender ID, but your credentials have not ' help_text = ('You are logged in on Blender ID, but your credentials have not '
@ -135,7 +135,8 @@ class BlenderCloudPreferences(AddonPreferences):
help_lines = textwrap.wrap(help_text, 80) help_lines = textwrap.wrap(help_text, 80)
for line in help_lines: for line in help_lines:
auth_box.label(text=line) auth_box.label(text=line)
auth_box.operator("pillar.credentials_update") if bpy.app.debug:
auth_box.operator("pillar.credentials_update")
# Texture browser stuff # Texture browser stuff
texture_box = layout.box() texture_box = layout.box()