Page 1 of 1

Returning a Matrix from a plugin

Posted: 02 Dec 2016, 19:45
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

Re: Returning a Matrix from a plugin

Posted: 03 Dec 2016, 12:05
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