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
2d689e6b
Commit
2d689e6b
authored
4 years ago
by
Vilém Duha
Browse files
Options
Downloads
Patches
Plain Diff
BlenderKit: Fix replace active model button
Dowload operator invoke had no return in some cases
parent
bc704993
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
blenderkit/autothumb.py
+0
-2
0 additions, 2 deletions
blenderkit/autothumb.py
blenderkit/download.py
+15
-0
15 additions, 0 deletions
blenderkit/download.py
blenderkit/search.py
+12
-0
12 additions, 0 deletions
blenderkit/search.py
with
27 additions
and
2 deletions
blenderkit/autothumb.py
+
0
−
2
View file @
2d689e6b
...
@@ -426,8 +426,6 @@ class ReGenerateThumbnailOperator(bpy.types.Operator):
...
@@ -426,8 +426,6 @@ class ReGenerateThumbnailOperator(bpy.types.Operator):
json_args
=
args_dict
,
json_args
=
args_dict
,
wait
=
False
)
wait
=
False
)
return
{
'
FINISHED
'
}
return
{
'
FINISHED
'
}
start_thumbnailer
(
self
,
context
)
return
{
'
FINISHED
'
}
def
invoke
(
self
,
context
,
event
):
def
invoke
(
self
,
context
,
event
):
wm
=
context
.
window_manager
wm
=
context
.
window_manager
...
...
This diff is collapsed.
Click to expand it.
blenderkit/download.py
+
15
−
0
View file @
2d689e6b
...
@@ -1278,6 +1278,9 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
...
@@ -1278,6 +1278,9 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
description
=
""
,
description
=
""
,
default
=
""
)
default
=
""
)
# close_window: BoolProperty(name='Close window',
# description='Try to close the window below mouse before download',
# default=False)
# @classmethod
# @classmethod
# def poll(cls, context):
# def poll(cls, context):
# return bpy.context.window_manager.BlenderKitModelThumbnails is not ''
# return bpy.context.window_manager.BlenderKitModelThumbnails is not ''
...
@@ -1376,6 +1379,9 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
...
@@ -1376,6 +1379,9 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
layout
.
prop
(
self
,
'
resolution
'
,
expand
=
True
,
icon_only
=
False
)
layout
.
prop
(
self
,
'
resolution
'
,
expand
=
True
,
icon_only
=
False
)
def
invoke
(
self
,
context
,
event
):
def
invoke
(
self
,
context
,
event
):
# if self.close_window:
# context.window.cursor_warp(event.mouse_x-1000, event.mouse_y - 1000);
print
(
self
.
asset_base_id
)
print
(
self
.
asset_base_id
)
wm
=
context
.
window_manager
wm
=
context
.
window_manager
# only make a pop up in case of switching resolutions
# only make a pop up in case of switching resolutions
...
@@ -1393,6 +1399,15 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
...
@@ -1393,6 +1399,15 @@ class BlenderkitDownloadOperator(bpy.types.Operator):
self
.
resolution
=
'
ORIGINAL
'
self
.
resolution
=
'
ORIGINAL
'
return
wm
.
invoke_props_dialog
(
self
)
return
wm
.
invoke_props_dialog
(
self
)
# if self.close_window:
# time.sleep(0.1)
# context.area.tag_redraw()
# time.sleep(0.1)
#
# context.window.cursor_warp(event.mouse_x, event.mouse_y);
return
self
.
execute
(
context
)
def
register_download
():
def
register_download
():
bpy
.
utils
.
register_class
(
BlenderkitDownloadOperator
)
bpy
.
utils
.
register_class
(
BlenderkitDownloadOperator
)
...
...
This diff is collapsed.
Click to expand it.
blenderkit/search.py
+
12
−
0
View file @
2d689e6b
...
@@ -1406,6 +1406,11 @@ class SearchOperator(Operator):
...
@@ -1406,6 +1406,11 @@ class SearchOperator(Operator):
options
=
{
'
SKIP_SAVE
'
}
options
=
{
'
SKIP_SAVE
'
}
)
)
# close_window: BoolProperty(name='Close window',
# description='Try to close the window below mouse before download',
# default=False)
tooltip
:
bpy
.
props
.
StringProperty
(
default
=
'
Runs search and displays the asset bar at the same time
'
)
tooltip
:
bpy
.
props
.
StringProperty
(
default
=
'
Runs search and displays the asset bar at the same time
'
)
@classmethod
@classmethod
...
@@ -1429,6 +1434,13 @@ class SearchOperator(Operator):
...
@@ -1429,6 +1434,13 @@ class SearchOperator(Operator):
return
{
'
FINISHED
'
}
return
{
'
FINISHED
'
}
# def invoke(self, context, event):
# if self.close_window:
# context.window.cursor_warp(event.mouse_x, event.mouse_y - 100);
# context.area.tag_redraw()
#
# context.window.cursor_warp(event.mouse_x, event.mouse_y);
# return self. execute(context)
class
UrlOperator
(
Operator
):
class
UrlOperator
(
Operator
):
""""""
""""""
...
...
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