From 63b976cb44625d7b5ccfda706447d02a89e5f808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 6 Sep 2016 12:30:48 +0200 Subject: [PATCH] Allow texture browser usage when the blend file is dirty. Refuse to start if the file hasn't been saved. It's okay if it's dirty, we just need to know where '//' points to. Fixes T49203. --- blender_cloud/texture_browser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blender_cloud/texture_browser.py b/blender_cloud/texture_browser.py index 99fd60a..b99cd0c 100644 --- a/blender_cloud/texture_browser.py +++ b/blender_cloud/texture_browser.py @@ -258,8 +258,9 @@ class BlenderCloudBrowser(pillar.PillarOperatorMixin, scroll_offset_space_left = 0 def invoke(self, context, event): - # Refuse to start if the file hasn't been saved. - if context.blend_data.is_dirty: + # Refuse to start if the file hasn't been saved. It's okay if + # it's dirty, we just need to know where '//' points to. + if not os.path.exists(context.blend_data.filepath): self.report({'ERROR'}, 'Please save your Blend file before using ' 'the Blender Cloud addon.') return {'CANCELLED'}