Resolve merge conflicts

Allows to use regression tests again.

Based on reading changes done in the 3.0 branch.
Double-checking will not hurt.
This commit is contained in:
Sergey Sharybin 2021-11-12 10:19:59 +01:00
parent fccc9b04f2
commit ded03453be
4 changed files with 0 additions and 33 deletions

View File

@ -927,18 +927,11 @@ class BlenderKitAssetBarOperator(BL_UI_OT_draw_operator):
asset_button.red_alert.visible = False
elif utils.profile_is_validator():
asset_button.red_alert.visible = False
<<<<<<< HEAD
else:
asset_button.validation_icon.visible = False
if utils.profile_is_validator():
asset_button.red_alert.visible = False
=======
else:
asset_button.visible = False
asset_button.validation_icon.visible = False
if utils.profile_is_validator():
asset_button.red_alert.visible = False
>>>>>>> blender-v3.0-release
def scroll_update(self):
sr = bpy.context.window_manager.get('search results')
@ -952,10 +945,7 @@ class BlenderKitAssetBarOperator(BL_UI_OT_draw_operator):
self.scroll_offset = min(self.scroll_offset, len(sr) - (self.wcount * self.hcount))
self.scroll_offset = max(self.scroll_offset, 0)
self.update_images()
<<<<<<< HEAD
=======
>>>>>>> blender-v3.0-release
# print(sro)
if sro['count'] > len(sr) and len(sr) - self.scroll_offset < (self.wcount * self.hcount) + 15:
self.search_more()

View File

@ -101,11 +101,7 @@ def get_rating(asset_id, headers):
if r.status_code == 200:
rj = r.json()
ratings = {}
<<<<<<< HEAD
print(rj)
=======
# print(rj)
>>>>>>> blender-v3.0-release
# store ratings - send them to task queue
for r in rj['results']:
ratings[r['ratingType']] = r['score']

View File

@ -197,15 +197,9 @@ def scene_load(context):
categories.load_categories()
if not bpy.app.timers.is_registered(refresh_token_timer) and not bpy.app.background:
bpy.app.timers.register(refresh_token_timer, persistent=True, first_interval=36000)
<<<<<<< HEAD
if utils.experimental_enabled() and not bpy.app.timers.is_registered(
refresh_notifications_timer) and not bpy.app.background:
bpy.app.timers.register(refresh_notifications_timer, persistent=True, first_interval=5)
=======
# if utils.experimental_enabled() and not bpy.app.timers.is_registered(
# refresh_notifications_timer) and not bpy.app.background:
# bpy.app.timers.register(refresh_notifications_timer, persistent=True, first_interval=5)
>>>>>>> blender-v3.0-release
update_assets_data()
@ -224,13 +218,8 @@ def fetch_server_data():
get_profile()
if bpy.context.window_manager.get('bkit_categories') is None:
categories.fetch_categories_thread(api_key, force=False)
<<<<<<< HEAD
all_notifications_count = comments_utils.count_all_notifications()
comments_utils.get_notifications_thread(api_key, all_count = all_notifications_count)
=======
# all_notifications_count = comments_utils.count_all_notifications()
# comments_utils.get_notifications_thread(api_key, all_count = all_notifications_count)
>>>>>>> blender-v3.0-release
first_time = True
first_search_parsing = True
@ -511,11 +500,8 @@ def search_timer():
props.report = f"Found {wm['search results orig']['count']} results."
if len(wm['search results']) == 0:
tasks_queue.add_task((reports.add_report, ('No matching results found.',)))
<<<<<<< HEAD
=======
else:
tasks_queue.add_task((reports.add_report, (f"Found {wm['search results orig']['count']} results.",)))
>>>>>>> blender-v3.0-release
# undo push
# bpy.ops.wm.undo_push_context(message='Get BlenderKit search')
# show asset bar automatically, but only on first page - others are loaded also when asset bar is hidden.

View File

@ -2250,11 +2250,6 @@ class AssetPopupCard(bpy.types.Operator, ratings_utils.RatingsProperties):
def prefill_ratings(self):
# pre-fill ratings
ratings = ratings_utils.get_rating_local(self.asset_id)
<<<<<<< HEAD
print('prefill ratings')
print(ratings)
=======
>>>>>>> blender-v3.0-release
if ratings and ratings.get('quality'):
self.rating_quality = ratings['quality']
if ratings and ratings.get('working_hours'):