[osg-users] Object from LUA Script
Matus Gabriska
matus.gabriska at gmail.com
Wed May 11 14:37:50 PDT 2016
Hi,
I have problem with extracting value from osg::Object instance returned by LuaScriptEngine.
Here is example of C++ code of running script:
Code:
osg::Parameters input;
osg::Parameters output;
input.push_back(transformNode);
_luaScriptEngine->run(_script.get(), _entry, input, output);
osg::Parameters is vector of osg::Object. After script is done, it populates
output with osg::Object.
This is LUA Script
Code:
function test(node)
return 1254;
end
So in osg::Parameters output is now one osg::Object which contains integer value 1234. My question is how can i acces this value?Or somehow cast this osg::Object to integer.
I think its stored in UserData because I printed some nodes in lua script and they contained UserData,so I tried object->getUserData() but then i stuck.
Any ideas?
Thank you.
[/list]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67079#67079
More information about the osg-users
mailing list