Give users the option to open a webbrowser after sharing an image.

The addon now also uses the home project URL from the project itself,
rather than hard-coding it.
This commit is contained in:
2016-07-07 11:43:01 +02:00
parent 4762f0292d
commit 3c9e4e2873
2 changed files with 33 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ import logging
import bpy
from bpy.types import AddonPreferences, Operator, WindowManager, Scene, PropertyGroup
from bpy.props import StringProperty, EnumProperty, PointerProperty
from bpy.props import StringProperty, EnumProperty, PointerProperty, BoolProperty
from . import pillar, gui
@@ -101,6 +101,12 @@ class BlenderCloudPreferences(AddonPreferences):
subtype='DIR_PATH',
default='//textures')
open_browser_after_share = BoolProperty(
name='Open browser after sharing file',
description='When enabled, Blender will open a webbrowser',
default=True
)
def draw(self, context):
import textwrap
@@ -177,6 +183,12 @@ class BlenderCloudPreferences(AddonPreferences):
else:
self.draw_sync_buttons(sub, bss)
# Image Share stuff
share_box = layout.box()
share_box.label('Image Sharing on Blender Cloud')
texture_box.enabled = icon != 'ERROR'
share_box.prop(self, 'open_browser_after_share')
def draw_subscribe_button(self, layout):
layout.operator('pillar.subscribe', icon='WORLD')