Adding a treeview for my addon

It seems we finally have a better way to create UI lists or tree hierarchies: tree view
This means I hopefully won’t have to use again template lists in my addon again. There is still one small issue… there is no python api yet for it.

I really want to get into c++ and I thought to myself "Could I start by trying to implement a treeview in my addon? ", I really don’t know if that is the best way to get started but still I would like to know if its possible to do, maybe using Cython? or does the blender api understand direct c++? If possible, can someone explain me how it would be done? and if not possible… how long untill we have a api reference to treeview?

Thanks in advance

It’s very possible to expose this as a Python API, yes. AFAIK this is planned (@julianeisel correct me if I’m wrong). You might want to look at the implementation of UIList. The core implementation is here: blender/source/blender/editors/interface/ The python API endpoint layout.template_list(...) is defined here: blender/source/blender/makesrna/intern/
Note that this is not a beginner-friendly project.

1 Like