SOLVED TreeView Add Data

Hello.
Is it possible to add Data on a TreeView using Layout files. If it is can you help me with an example please?
Thank you.

Hi Ogers, unfortunately, it's not possible to fill data of a TreeView using Layout File.

A Layout File does not have purpose to define value, but only information about how your object will be represented. So you can only state there is a CUSTOMGUI_TREEVIEW.
Then if you are in:

  1. NodeData, override GetDDescription method. See GetDDescription() Manual.
  2. GeDialog, override CreateLayout method. See GeDialog Resources Manual

If you have any questions, please let me know.
Cheers,
Maxime.

Hey @m_adam
But how can I add my own parameters on a TreeView.
I have created a CUSTOMGUI_TREEVIEW and have attached TreeViewFunctions and I know that we should modify functions overridden from the TreeViewFunctions but I do not know how to put my own parameters on the TreeView.
I have seen the example on the sdk too, with the activeobject but it seems a bit complicated.
Can you help me with this one please?
Thank you.

Hi @Ogers, first of all I did forget to mention in my first post, but could you read How to post questions and especially tagging, in order to know at least if it's a python or C++ question.

With that's said regarding your issue.
What do you mean by your own parameter?
I suggest you to read this topic, where I did a quick presentation about what to override, why and how.
https://plugincafe.maxon.net/topic/10654/14102_using-customgui-listview/2

If you have any question left please do not hesitate to come back with some code! 🙂
Cheers,
Maxime

May I ask you if your initial question is solved by now? Then please mark this post as solved.

I passed on the listview for now. I still have to look in more details for the TreeView.
Thank you.