I create a auto setup matcap texture addon and i'd like to know if it should be possible to "require" blender to update N panel. Got a template_preview and it should be great that it refresh automaticaly. If it really not possible, is it possible to get the texture list box or did i have to create my own texture list ?
Asked
Active
Viewed 959 times
1 Answers
11
Use Region.tag_redraw on the corresponding region. The region type of the T-Panel is 'TOOLS' and the type of the N-Panel is 'UI'.
I.e.
for region in context.area.regions:
if region.type == "UI":
region.tag_redraw()
pink vertex
- 9,896
- 1
- 25
- 44
for region in bpy.context.area.regions:instead offor region in context.area.regions:but it triggers an errorAttributeError: 'NoneType' object has no attribute 'regions'– Alexis.Rolland Sep 18 '21 at 05:26