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
654c538f
Commit
654c538f
authored
6 years ago
by
Vilem Duha
Browse files
Options
Downloads
Patches
Plain Diff
BlenderKit: fix Mb to MiB (mebibytes)
parent
4c3d0fc2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
blenderkit/search.py
+1
-1
1 addition, 1 deletion
blenderkit/search.py
blenderkit/ui_panels.py
+3
-3
3 additions, 3 deletions
blenderkit/ui_panels.py
with
4 additions
and
4 deletions
blenderkit/search.py
+
1
−
1
View file @
654c538f
...
@@ -573,7 +573,7 @@ def get_author(r):
...
@@ -573,7 +573,7 @@ def get_author(r):
def
write_profile
(
adata
):
def
write_profile
(
adata
):
utils
.
p
(
'
writing profile
'
)
utils
.
p
(
'
writing profile
'
)
user
=
adata
[
'
user
'
]
user
=
adata
[
'
user
'
]
# we have to convert to MB here, numbers too big for python int type
# we have to convert to M
i
B here, numbers too big for python int type
if
user
.
get
(
'
sumAssetFilesSize
'
)
is
not
None
:
if
user
.
get
(
'
sumAssetFilesSize
'
)
is
not
None
:
user
[
'
sumAssetFilesSize
'
]
/=
(
1024
*
1024
)
user
[
'
sumAssetFilesSize
'
]
/=
(
1024
*
1024
)
if
user
.
get
(
'
sumPrivateAssetFilesSize
'
)
is
not
None
:
if
user
.
get
(
'
sumPrivateAssetFilesSize
'
)
is
not
None
:
...
...
This diff is collapsed.
Click to expand it.
blenderkit/ui_panels.py
+
3
−
3
View file @
654c538f
...
@@ -420,11 +420,11 @@ class VIEW3D_PT_blenderkit_profile(Panel):
...
@@ -420,11 +420,11 @@ class VIEW3D_PT_blenderkit_profile(Panel):
layout
.
label
(
text
=
'
User: %s %s
'
%
(
me
[
'
firstName
'
],
me
[
'
lastName
'
]))
layout
.
label
(
text
=
'
User: %s %s
'
%
(
me
[
'
firstName
'
],
me
[
'
lastName
'
]))
layout
.
label
(
text
=
'
Email: %s
'
%
(
me
[
'
email
'
]))
layout
.
label
(
text
=
'
Email: %s
'
%
(
me
[
'
email
'
]))
if
me
.
get
(
'
sumAssetFilesSize
'
)
is
not
None
:
# TODO remove this when production server has these too.
if
me
.
get
(
'
sumAssetFilesSize
'
)
is
not
None
:
# TODO remove this when production server has these too.
layout
.
label
(
text
=
'
Public assets: %i M
b
'
%
(
me
[
'
sumAssetFilesSize
'
]))
layout
.
label
(
text
=
'
Public assets: %i M
iB
'
%
(
me
[
'
sumAssetFilesSize
'
]))
if
me
.
get
(
'
sumPrivateAssetFilesSize
'
)
is
not
None
:
if
me
.
get
(
'
sumPrivateAssetFilesSize
'
)
is
not
None
:
layout
.
label
(
text
=
'
Private assets: %i M
b
'
%
(
me
[
'
sumPrivateAssetFilesSize
'
]))
layout
.
label
(
text
=
'
Private assets: %i M
iB
'
%
(
me
[
'
sumPrivateAssetFilesSize
'
]))
if
me
.
get
(
'
remainingPrivateQuota
'
)
is
not
None
:
if
me
.
get
(
'
remainingPrivateQuota
'
)
is
not
None
:
layout
.
label
(
text
=
'
Remaining private storage: %i M
b
'
%
(
me
[
'
remainingPrivateQuota
'
]))
layout
.
label
(
text
=
'
Remaining private storage: %i M
iB
'
%
(
me
[
'
remainingPrivateQuota
'
]))
layout
.
operator
(
"
wm.url_open
"
,
text
=
"
See my uploads
"
,
layout
.
operator
(
"
wm.url_open
"
,
text
=
"
See my uploads
"
,
icon
=
'
URL
'
).
url
=
paths
.
BLENDERKIT_USER_ASSETS
icon
=
'
URL
'
).
url
=
paths
.
BLENDERKIT_USER_ASSETS
if
user_preferences
.
enable_oauth
:
if
user_preferences
.
enable_oauth
:
...
...
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