[Bf-extensions-cvs] [bb62f107] blender-v3.1-release: Fix T95323: Icon-Viewer Type Error in invoke_props_dialog()
Paul Golter
noreply at git.blender.org
Tue Feb 22 01:57:47 CET 2022
Commit: bb62f10715a871d7069d2b2c74b2efc97c3c350c
Author: Paul Golter
Date: Tue Feb 22 11:51:20 2022 +1100
Branches: blender-v3.1-release
https://developer.blender.org/rBAbb62f10715a871d7069d2b2c74b2efc97c3c350c
Fix T95323: Icon-Viewer Type Error in invoke_props_dialog()
Latest builds of Blender require WindowManager.invoke_props_dialog() to
use int explicitly in width= argument. Otherwise a TypeError will be
thrown.
Ref D14031
===================================================================
M development_icon_get.py
===================================================================
diff --git a/development_icon_get.py b/development_icon_get.py
index e8901eca..cf214fa2 100644
--- a/development_icon_get.py
+++ b/development_icon_get.py
@@ -469,9 +469,9 @@ class IV_OT_icons_show(bpy.types.Operator):
self.auto_focusable = True
num_cols = self.get_num_cols(len(pr.popup_icons.filtered_icons))
- self.width = min(
+ self.width = int(min(
ui_scale() * (num_cols * ICON_SIZE + POPUP_PADDING),
- context.window.width - WIN_PADDING)
+ context.window.width - WIN_PADDING))
return context.window_manager.invoke_props_dialog(
self, width=self.width)
More information about the Bf-extensions-cvs
mailing list