danomatika / swig-openframeworks

a SWIG interface for openFrameworks with included Makefile, submodule this in your language wrapper addons
Other
39 stars 11 forks source link

lua: polyline getVertices() vector not usable #24

Open danomatika opened 3 years ago

danomatika commented 3 years ago

Getting a polyline vertex vector works, but using the vector fails:

local polyVertices = polyline:getVertices()
print("polyline vertices "..swig_type(polyVertices))
print("polyline # vertices "..polyVertices:size())

yields:

polyline vertices std::vector< glm::vec3 > *
[notice ] got a script error: Error running setup(): ....2_osx_release/addons/ofxLua/luaTests/bin/data/tests.lua:64: attempt to index a userdata value (local 'polyVertices')

SWIG is apparently not wrapping the vector here to where loa can use it. Other classes which return default vertex type vectors do work.