Returning a container from C++ to python using Interrogate

Alright, so I have a Vector of LVecBase3f in C++ and I would like to return that Vector to Python in some way that Python understands the collection/container.

Anyone have any ideas or has done anything similar?

Include pta_LVecBase3.h and use the PTA_LVecBase3(f/d) datatype instead of an ordinary vector; this is already exposed to Python. It is a typedef to PointerToArray, which is a reference counted type of vector. In fact, it indirectly inherits from the C++ vector type.

Thank you so much, I will soon post this part of my project for others to use.

It’s a standalone pathfinding based on the pandai pathfinding, where you just give a navmesh,source and a destination and receive a collection of nodes to follow.

Great, I’m sure many could make use of such a module. :slight_smile: