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-27 15:31:41 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-12-27 15:31:41 +0300
commit5a6b7e99c1297d60022117ad596d5614892340ed (patch)
treea097eca71225f24037762f89973b1d64873d0a2c /blenderkit/ui_panels.py
parentfdf5ef26f695fb535c54af78c7f50969b632ddfc (diff)
BlenderKit: HDR resolutions
also fix several issues with HDRs - categories upload (for all asset types was broken) - improve thumbnails color - tooltip drawing - resolution tag upload
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r--blenderkit/ui_panels.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py
index 6d89e110..9d8d6460 100644
--- a/blenderkit/ui_panels.py
+++ b/blenderkit/ui_panels.py
@@ -115,7 +115,6 @@ def draw_upload_common(layout, props, asset_type, context):
op.process_type = 'UPLOAD'
layout = layout.column()
layout.enabled = False
-
# if props.upload_state.find('Error') > -1:
# layout.label(text = props.upload_state)
@@ -887,7 +886,7 @@ class VIEW3D_PT_blenderkit_import_settings(Panel):
def poll(cls, context):
s = context.scene
ui_props = s.blenderkitUI
- return ui_props.down_up == 'SEARCH' and ui_props.asset_type in ['MATERIAL', 'MODEL']
+ return ui_props.down_up == 'SEARCH' and ui_props.asset_type in ['MATERIAL', 'MODEL', 'HDR']
def draw(self, context):
layout = self.layout
@@ -916,7 +915,8 @@ class VIEW3D_PT_blenderkit_import_settings(Panel):
row = layout.row()
row.prop(props, 'append_method', expand=True, icon_only=False)
-
+ if ui_props.asset_type == 'HDR':
+ props = s.blenderkit_HDR
layout.prop(props, 'resolution')
# layout.prop(props, 'unpack_files')
@@ -1188,7 +1188,7 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
op.asset_id = asset_data['id']
op.asset_type = asset_data['assetType']
- if ui_props.asset_type in ('MODEL', 'MATERIAL') and \
+ if ui_props.asset_type in ('MODEL', 'MATERIAL', 'HDR') and \
utils.get_param(asset_data, 'textureResolutionMax') is not None and \
utils.get_param(asset_data, 'textureResolutionMax') > 512:
@@ -1225,6 +1225,7 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
elif asset_data['assetBaseId'] in s['assets used'].keys():
# called from asset bar:
+ print('context menu')
op = col.operator('scene.blenderkit_download', text='Replace asset resolution')
op.asset_index = ui_props.active_index
@@ -1242,7 +1243,7 @@ def draw_asset_context_menu(self, context, asset_data, from_panel=False):
op.model_rotation = (0, 0, 0)
op.max_resolution = asset_data.get('max_resolution',
0) # str(utils.get_param(asset_data, 'textureResolutionMax'))
-
+ print('should be drawn!')
# print('operator res ', resolution)
# op.resolution = resolution