Added support for Lua 5.2 and osg::Object creation from within Lua scripts.
This commit is contained in:
@@ -474,6 +474,28 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
|
||||
osg::ref_ptr<osg::Object> obj = pi.createObject("osgVolume::VolumeTile");
|
||||
if (obj.valid()) { OSG_NOTICE<<"obj created "<<obj->getCompoundClassName()<<std::endl; }
|
||||
else { OSG_NOTICE<<"obj creation failed "<<std::endl; }
|
||||
osgDB::PropertyInterface::PropertyMap properties;
|
||||
|
||||
if (pi.getSupportedProperties(obj.get(), properties, true))
|
||||
{
|
||||
OSG_NOTICE<<"Have supported properites found."<<std::endl;
|
||||
for(osgDB::PropertyInterface::PropertyMap::iterator itr = properties.begin();
|
||||
itr != properties.end();
|
||||
++itr)
|
||||
{
|
||||
OSG_NOTICE<<" Property "<<itr->first<<", "<<pi.getTypeName(itr->second)<<std::endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_NOTICE<<"No supported properites found."<<std::endl;
|
||||
}
|
||||
|
||||
//return 0;
|
||||
|
||||
return viewer.run();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user