Blender Git Loki

Blender Git "uiTable" branch commits.

February 9, 2017, 12:51 (GMT)
Fix mistakes with background drawing
February 9, 2017, 04:09 (GMT)
Create and pass a uiLayout to cells

Played with a more complex and more efficient version, but that made
things pretty complicated. Now this is a simple, but less optimized, solution.
February 9, 2017, 01:56 (GMT)
Support drawing some background color alternating per row
February 7, 2017, 23:04 (GMT)
Draw tables row by row, not column by column
February 6, 2017, 23:45 (GMT)
Unit tests for uiTable API (and fix bugs found using it :)
February 5, 2017, 16:25 (GMT)
Cleanup: Add assert, remove unused variable
February 5, 2017, 15:43 (GMT)
Initial implementation of a uiTable API

This adds an initial (and already working), generic API for defining, handling and drawing of table UIs.

It supports two types of tables:
* Vertical flow: Rows are all in a vertical stack.
* Horizontal flow: Rows are stacked vertically, until some threshold height is reached. The table is then split into another vertical stack that is drawn next to the former one. Such drawing could be used for the file browser in non-thumbnail mode.

A table is built out of - guess what - rows and columns. The API allows defining new collumns (identified by an id-name) and inserting new rows at any point. When drawing, we draw a cell for each column/row combination, using a custom cell-drawing callback.
The uiTable API will probably get some support for drawing buttons (uiBut) into custom layouts (uiLayout).

The API is written with big data sets in mind. In future we may get a spreadsheet view where data like all vertices of a mesh is displayed. That would result in thousands of rows, the uiTable API should be ready for this.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021