Returning a Matrix from a plugin

Typically: "How do I... ", "How can I... " questions
Post Reply
Rodrigo
Posts: 29
Joined: 25 Aug 2014, 16:33

Returning a Matrix from a plugin

Post by Rodrigo »

Hi,

I have tried using the helper functions used in the PluginSkeleton and other plugin examples but they do not seem to have a method that supports returning something like std::vector<std::vector<float> >, a vector of vectors.

What would be the best way to return a vector of vectors from a c++ plugin to a Lua script?

Thanks,
Rodrigo

coppelia
Site Admin
Posts: 10504
Joined: 14 Dec 2012, 00:25

Re: Returning a Matrix from a plugin

Post by coppelia »

Hello Rodrigo,

you can do this if you use the stack functions. The plugin skeleton project also illustrates a callback function that uses the stack functions: LUA_GETDATA_CALLBACK
In pseudo code, you would do something like:
Cheers

Post Reply