I'm writing a 3D modelling application using Gtk+ 2.24 on Windows and have everything worked out except one essential requirement. I need a way to link a 3d object in my scene to a corresponding item in the Treeview. Iter's, TreePath's and Tree References won't work because when I move a node in the tree, these values( and sometimes other items in the tree too) are changed.
I'm attaching a data pointer of my 3d model to the tree item, so I can always get the model from the TreeView node, but can't work out how to do it the other way round. The only solution I've thought of is to store a unique Id with the treeview item and in the 3d object, then when I click on the object I can get the id and loop through the whole tree to find that node. Before I implement this, does anyone know of another/better method I could try?
For those interested, here's a link to some screenshots of the app I posted on another forum:http://forums.nuclearglory.com/index.php?tid=4255