Merge pull request #236 from mp3butcher/ScriptBranch

add ScriptNodeCallback serializer
This commit is contained in:
OpenSceneGraph git repository
2017-03-29 09:27:58 +01:00
committed by GitHub
3 changed files with 50 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
#include <osgDB/ObjectWrapper>
#include <osgDB/InputStream>
#include <osgDB/OutputStream>
#include <osg/ScriptEngine>
REGISTER_OBJECT_WRAPPER( Script,
new osg::Script,
osg::Script,
"osg::Object osg::Script" )
{
ADD_STRING_SERIALIZER( Script, "" ); // _script
ADD_STRING_SERIALIZER( Language, "" ); // _script
}

View File

@@ -0,0 +1,23 @@
#undef OBJECT_CAST
#define OBJECT_CAST dynamic_cast
#include <osgDB/ObjectWrapper>
#include <osgDB/InputStream>
#include <osgDB/OutputStream>
#include <osg/ScriptEngine>
REGISTER_OBJECT_WRAPPER( ScriptNodeCallback,
new osg::ScriptNodeCallback,
osg::ScriptNodeCallback,
"osg::Object osg::Callback osg::CallbackObject osg::ScriptNodeCallback" )
{
ADD_OBJECT_SERIALIZER( Script, osg::Script, NULL ); // _script
ADD_STRING_SERIALIZER( EntryPoint, "" ); // _entrypoint
}
#undef OBJECT_CAST
#define OBJECT_CAST static_cast