hi, itry to make a uilist that will show me all the imgs in the file, i can do his part and its work.
but now i want to use filter that will show me all the images with “PNG” format and its not filter it for me, this is how i try to filter and i get error that my index is out of range. i think the problem is on the part that call for to the uilist, i dont sure what to write in the index part (“rmt_list_index”)
Panel:
row.template_list("List_View", "", bpy.data, "images", scene, "rmt_list_index")
Filter:
class List_View(UIList):
def filter_items(self, context, data, propname):
"""Filter and order items in the list."""
filtered = []
ordered = []
items = getattr(data, propname)
for i, item in enumerate(items):
if item.file_format == "PNG":
filtered[i] &= ~self.bitflag_filter_item
return filtered, ordered