Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
6f53879a
Commit
6f53879a
authored
5 years ago
by
Vilém Duha
Browse files
Options
Downloads
Patches
Plain Diff
BlenderKit: fix a problem with global dict
wasn't found if the path changed and this broke registration of addon.
parent
876acc1c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
blenderkit/paths.py
+13
-4
13 additions, 4 deletions
blenderkit/paths.py
with
13 additions
and
4 deletions
blenderkit/paths.py
+
13
−
4
View file @
6f53879a
...
...
@@ -84,12 +84,21 @@ def get_temp_dir(subdir=None):
tempdir
=
os
.
path
.
join
(
user_preferences
.
global_dir
,
'
temp
'
)
if
tempdir
.
startswith
(
'
//
'
):
tempdir
=
bpy
.
path
.
abspath
(
tempdir
)
if
not
os
.
path
.
exists
(
tempdir
):
os
.
makedirs
(
tempdir
)
if
subdir
is
not
None
:
tempdir
=
os
.
path
.
join
(
tempdir
,
subdir
)
try
:
if
not
os
.
path
.
exists
(
tempdir
):
os
.
makedirs
(
tempdir
)
if
subdir
is
not
None
:
tempdir
=
os
.
path
.
join
(
tempdir
,
subdir
)
if
not
os
.
path
.
exists
(
tempdir
):
os
.
makedirs
(
tempdir
)
except
:
print
(
'
Cache directory not found. Resetting Cache folder path.
'
)
p
=
default_global_dict
()
if
p
==
user_preferences
.
global_dir
:
print
(
'
Global dir was already default, plese set a global directory in addon preferences to a dir where you have write permissions.
'
)
return
None
user_preferences
.
global_dir
=
p
tempdir
=
get_temp_dir
(
subdir
=
subdir
)
return
tempdir
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment