Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVilém Duha <vilda.novak@gmail.com>2020-12-06 01:34:35 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-12-06 01:34:35 +0300
commit515d85d3faf2f88bbb7abee1d0b2d6d0fde0ba91 (patch)
tree81bc9284035140fbeacbfa665eadee314a3ff0ed /blenderkit/ui_panels.py
parent19f033560da7e93dfdde573a8e918cff4a2f7082 (diff)
BlenderKit: fast changing of categories for assets
this tool will probably evolve in fast metadata editing, for now it should help to fix category system.
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r--blenderkit/ui_panels.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index a1f990cb..b7c9884c 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -46,6 +46,7 @@ from bpy.props import (
import bpy
import os
import random
+import blenderkit
# this was moved to separate interface:
@@ -415,7 +416,7 @@ class NODE_PT_blenderkit_material_properties(Panel):
draw_panel_material_ratings(self, context)
layout.label(text='Asset tools:')
- draw_asset_context_menu(self, context, ad, from_panel = True)
+ draw_asset_context_menu(self, context, ad, from_panel=True)
# if 'rig' in ad['tags']:
# # layout.label(text = 'can make proxy')
# layout.operator('object.blenderkit_make_proxy', text = 'Make Armature proxy')
@@ -1147,7 +1148,6 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
if from_panel:
# Called from addon panel
-
if asset_data.get('resolution'):
op = col.operator('scene.blenderkit_download', text='Replace asset resolution')
op.asset_base_id = asset_data['assetBaseId']
@@ -1162,7 +1162,7 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
op.model_location = aob.location
op.model_rotation = aob.rotation_euler
op.target_object = aob.name
- op.material_target_slot = aob.active_material_index
+ op.material_target_slot = aob.active_material_index
op.replace_resolution = True
op.invoke_resolution = True
op.max_resolution = asset_data.get('max_resolution',
@@ -1182,8 +1182,8 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
op.model_location = o.location
op.model_rotation = o.rotation_euler
else:
- op.model_location = (0,0,0)
- op.model_rotation = (0,0,0)
+ op.model_location = (0, 0, 0)
+ op.model_rotation = (0, 0, 0)
op.max_resolution = asset_data.get('max_resolution',
0) # str(utils.get_param(asset_data, 'textureResolutionMax'))
@@ -1235,6 +1235,9 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
op.asset_id = asset_data['id']
+
+
+
# def draw_asset_resolution_replace(self, context, resolution):
# layout = self.layout
# ui_props = bpy.context.scene.blenderkitUI
@@ -1286,7 +1289,7 @@ class OBJECT_MT_blenderkit_asset_menu(bpy.types.Menu):
# sr = bpy.context.scene['search results']
sr = bpy.context.scene['search results']
asset_data = sr[ui_props.active_index]
- draw_asset_context_menu(self, context, asset_data, from_panel = False)
+ draw_asset_context_menu(self, context, asset_data, from_panel=False)
class OBJECT_MT_blenderkit_login_menu(bpy.types.Menu):