Read-only Pillar server URL and project_uuid.

These properties have also been removed from the UI. This is to limit the
scope of the addon for the first release, allowing us to test properly.
This commit is contained in:
Sybren A. Stüvel 2016-04-19 11:37:46 +02:00
parent 090a9bc5c6
commit 6be1e4ced9
2 changed files with 22 additions and 15 deletions

View File

@ -19,17 +19,17 @@
# <pep8 compliant>
bl_info = {
"name": "Blender Cloud Texture Browser",
"author": "Sybren A. Stüvel and Francesco Siddi",
"version": (0, 2, 0),
"blender": (2, 77, 0),
"location": "Ctrl+Shift+Alt+A anywhere",
"description": "Allows downloading of textures from the Blender Cloud. Requires "
"the Blender ID addon.",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/System/BlenderCloud",
"category": "System",
"support": "TESTING"
'name': 'Blender Cloud Texture Browser',
'author': 'Sybren A. Stüvel and Francesco Siddi',
'version': (0, 2, 0),
'blender': (2, 77, 0),
'location': 'Ctrl+Shift+Alt+A anywhere',
'description': 'Allows downloading of textures from the Blender Cloud. Requires '
'the Blender ID addon and Blender 2.77a or newer.',
'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/'
'Scripts/System/BlenderCloud',
'category': 'System',
'support': 'TESTING'
}
import logging

View File

@ -18,17 +18,21 @@ log = logging.getLogger(__name__)
class BlenderCloudPreferences(AddonPreferences):
bl_idname = ADDON_NAME
# The following two properties are read-only to limit the scope of the
# addon and allow for proper testing within this scope.
pillar_server = bpy.props.StringProperty(
name='Blender Cloud Server',
description='URL of the Blender Cloud backend server',
default='https://cloudapi.blender.org/'
default='https://cloudapi.blender.org/',
get=lambda self: 'https://cloudapi.blender.org/'
)
# TODO: Move to the Scene properties?
project_uuid = bpy.props.StringProperty(
name='Project UUID',
description='UUID of the current Blender Cloud project',
default='5703957698377322577be77d' # TODO: change default to something more generic
default='5672beecc0261b2005ed1a33',
get=lambda self: '5672beecc0261b2005ed1a33'
)
local_texture_dir = StringProperty(
@ -80,8 +84,11 @@ class BlenderCloudPreferences(AddonPreferences):
# options for Pillar
sub = layout.column()
sub.enabled = blender_id_icon != 'ERROR'
sub.prop(self, "pillar_server")
sub.prop(self, "project_uuid")
# TODO: let users easily pick a project. For now, we just use the
# hard-coded server URL and UUID of the textures project.
# sub.prop(self, "pillar_server")
# sub.prop(self, "project_uuid")
sub.operator("pillar.credentials_update")