Skip to content
Snippets Groups Projects
Commit 2d77eb22 authored by Vilém Duha's avatar Vilém Duha
Browse files

BlenderKit: Fixes for ratings

Ratings don't get sent during clicking in the rating operator, but only after hitting OK
Ratings operator doesn't remember values so it doesn't encourage same ratings for more assets.
Bump version of the addon for the release
parent 2b1d58fe
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
bl_info = {
"name": "BlenderKit Online Asset Library",
"author": "Vilem Duha, Petr Dlouhy",
"version": (1, 0, 40),
"version": (2, 92, 0),
"blender": (2, 92, 0),
"location": "View3D > Properties > BlenderKit",
"description": "Online BlenderKit library (materials, models, brushes and more). Connects to the internet.",
......
This diff is collapsed.
......@@ -295,7 +295,7 @@ def update_ratings_work_hours_ui_1_5(self, context):
class FastRateMenu(Operator):
"""Fast rating of the assets directly in the asset bar - without need to download assets."""
"""Rating of the assets , also directly from the asset bar - without need to download assets."""
bl_idname = "wm.blenderkit_menu_rating_upload"
bl_label = "Rate asset"
bl_options = {'REGISTER', 'UNDO', 'INTERNAL'}
......@@ -303,28 +303,33 @@ class FastRateMenu(Operator):
message: StringProperty(
name="message",
description="message",
default="Rating asset")
default="Rating asset",
options={'SKIP_SAVE'})
asset_id: StringProperty(
name="Asset Base Id",
description="Unique id of the asset (hidden)",
default="")
default="",
options={'SKIP_SAVE'})
asset_name: StringProperty(
name="Asset Name",
description="Name of the asset (hidden)",
default="")
default="",
options={'SKIP_SAVE'})
asset_type: StringProperty(
name="Asset type",
description="asset type",
default="")
default="",
options={'SKIP_SAVE'})
rating_quality: IntProperty(name="Quality",
description="quality of the material",
default=0,
min=-1, max=10,
update=update_ratings_quality)
# update=update_ratings_quality,
options={'SKIP_SAVE'})
# the following enum is only to ease interaction - enums support 'drag over' and enable to draw the stars easily.
rating_quality_ui: EnumProperty(name='rating_quality_ui',
......@@ -332,12 +337,14 @@ class FastRateMenu(Operator):
description='Rating stars 0 - 10',
default=0,
update=update_quality_ui,
)
options={'SKIP_SAVE'})
rating_work_hours: FloatProperty(name="Work Hours",
description="How many hours did this work take?",
default=0.00,
min=0.0, max=300, update=update_ratings_work_hours
min=0.0, max=300,
# update=update_ratings_work_hours,
options={'SKIP_SAVE'}
)
high_rating_warning = "This is a high rating, please be sure to give such rating only to amazing assets"
......@@ -363,7 +370,8 @@ class FastRateMenu(Operator):
('200', '200', high_rating_warning),
('250', '250', high_rating_warning),
],
default='0', update=update_ratings_work_hours_ui
default='0', update=update_ratings_work_hours_ui,
options = {'SKIP_SAVE'}
)
rating_work_hours_ui_1_5: EnumProperty(name="Work Hours",
......@@ -377,7 +385,9 @@ class FastRateMenu(Operator):
('4', '4', ''),
('5', '5', '')
],
default='0', update=update_ratings_work_hours_ui_1_5
default='0',
update=update_ratings_work_hours_ui_1_5,
options = {'SKIP_SAVE'}
)
@classmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment