On 12/10/2017 at 01:19, xxxxxxxx wrote:
The folded state is define by the IsOpen function.
Simply make return to false for the first time, then after get the obj.GetBit(c4d.BIT_OFOLD)
And in your Open function which is trigger when something is open/closed
make something like
if onoff:
obj.SetBit(c4d.BIT_OFOLD)
else:
obj.DelBit(c4d.BIT_OFOLD)
Of course this method work for any BaseList2D but for any customDataType simply make a Bool member variable who gonna store the state of the folding.
Additionnaly I really suggest you to read thoses following blog post about tree view
TreeView made simple - Part 1
Treeview made simple – Part 2