this question reached us via mail, and I thought the answer might be interesting for everyone. The question was:
How can I implement a
TreeViewFunctions with which a user can drag (texture) files into a tree view to add them to the items in the tree view?
The general logic is to implement
TreeViewFunctions.AcceptDragObject to sort out invalid drag data sources and then
TreeViewFunctions.InsertObject to carry out the valid ones. There is also a bug in the drag handling of image file drag events in Cinema 4D 2023.2 which causes the Picture Viewer to open when it should not. But I thought the general task of also unpacking asset drag events might be interesting for others too.