Skip to content

Commit

Permalink
Merge pull request #12 from sketchfab/login-and-290-update
Browse files Browse the repository at this point in the history
Fixes permission error and "selection only" filter in 2.79
  • Loading branch information
cedricpinson authored May 27, 2020
2 parents 85b363b + aeae646 commit 41d7ecf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/io_sketchfab_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
'author': 'Sketchfab',
'license': 'GPL',
'deps': '',
'version': (1, 2, 1),
'version': (1, 2, 2),
"blender": (2, 80, 0),
'location': 'View3D > Tools > Sketchfab',
'warning': '',
Expand Down
2 changes: 1 addition & 1 deletion addons/io_sketchfab_plugin/blender/blender_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def deselect(obj):
# Visibility
def get_visible(obj):
if bpy.app.version < (2, 80, 0):
return obj.hide
return (not obj.hide)
else:
return obj.visible_get()
def set_visible(obj, visible):
Expand Down
5 changes: 4 additions & 1 deletion addons/io_sketchfab_plugin/sketchfab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ def clean_node_hierarchy(objects):
root.select_set(True)

class Cache:
SKETCHFAB_CACHE_FILE = os.path.join(os.path.dirname(__file__), ".cache")
SKETCHFAB_CACHE_FILE = os.path.join(
bpy.utils.user_resource("SCRIPTS", "sketchfab_cache", create=True),
".cache"
) # Use a user path to avoid permission-related errors

def read():
if not os.path.exists(Cache.SKETCHFAB_CACHE_FILE):
Expand Down

0 comments on commit 41d7ecf

Please sign in to comment.