diff options
Diffstat (limited to 'blenderkit/ui.py')
-rw-r--r-- | blenderkit/ui.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/blenderkit/ui.py b/blenderkit/ui.py index 295ded3b..68c19cf0 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -483,12 +483,14 @@ def draw_callback_2d_progress(self, context): loc = view3d_utils.location_3d_to_region_2d(bpy.context.region, bpy.context.space_data.region_3d, d['location']) + # print('drawing downloader') if loc is not None: if asset_data['assetType'] == 'model': # models now draw with star trek mode, no need to draw percent for the image. draw_downloader(loc[0], loc[1], percent=tcom.progress, img=img, text=tcom.report) else: draw_downloader(loc[0], loc[1], percent=tcom.progress, img=img, text=tcom.report) + # utils.p('end drawing downlaoders downloader') else: draw_progress(x, y - index * 30, text='downloading %s' % asset_data['name'], percent=tcom.progress) @@ -1192,8 +1194,8 @@ class AssetBarOperator(bpy.types.Operator): # timers testing - seems timers might be causing crashes. testing it this way now. if not user_preferences.use_timers: - search.timer_update() - download.timer_update() + search.search_timer() + download.download_timer() tasks_queue.queue_worker() bg_blender.bg_update() @@ -1451,7 +1453,7 @@ class AssetBarOperator(bpy.types.Operator): if not asset_data.get('canDownload'): message = "Let's support asset creators and Open source." link_text = 'Unlock the asset.' - url = paths.get_bkit_url() + '/get-blenderkit/' + asset_data['id'] + '/?from_addon' + url = paths.get_bkit_url() + '/get-blenderkit/' + asset_data['id'] + '/?from_addon=True' bpy.ops.wm.blenderkit_url_dialog('INVOKE_REGION_WIN', url=url, message=message, link_text=link_text) return {'RUNNING_MODAL'} @@ -1626,6 +1628,14 @@ class AssetBarOperator(bpy.types.Operator): invoke_resolution=True, max_resolution=asset_data.get('max_resolution', 0) ) + elif ui_props.asset_type == 'SCENE': + bpy.ops.scene.blenderkit_download('INVOKE_DEFAULT', + asset_index=asset_search_index, + # replace_resolution=True, + invoke_resolution=False, + invoke_scene_settings=True, + max_resolution=asset_data.get('max_resolution', 0) + ) else: bpy.ops.scene.blenderkit_download( # asset_type=ui_props.asset_type, asset_index=asset_search_index, |