forked from mirror/openmw-tes3mp
Add dummy serializer for CameraRelativeTransform to allow serializing content of Sky Root
This commit is contained in:
parent
c5f8ff6e0e
commit
53e4db8a8f
1 changed files with 13 additions and 1 deletions
|
@ -64,6 +64,15 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CameraRelativeTransformSerializer : public osgDB::ObjectWrapper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CameraRelativeTransformSerializer()
|
||||||
|
: osgDB::ObjectWrapper(createInstanceFunc<osg::Group>, "MWRender::CameraRelativeTransform", "osg::Object osg::Node osg::Group MWRender::CameraRelativeTransform")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
osgDB::ObjectWrapper* makeDummySerializer(const std::string& classname)
|
osgDB::ObjectWrapper* makeDummySerializer(const std::string& classname)
|
||||||
{
|
{
|
||||||
return new osgDB::ObjectWrapper(createInstanceFunc<osg::DummyObject>, classname, "osg::Object");
|
return new osgDB::ObjectWrapper(createInstanceFunc<osg::DummyObject>, classname, "osg::Object");
|
||||||
|
@ -80,17 +89,18 @@ void registerSerializers()
|
||||||
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new FrameSwitchSerializer);
|
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new FrameSwitchSerializer);
|
||||||
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new RigGeometrySerializer);
|
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new RigGeometrySerializer);
|
||||||
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new LightManagerSerializer);
|
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new LightManagerSerializer);
|
||||||
|
osgDB::Registry::instance()->getObjectWrapperManager()->addWrapper(new CameraRelativeTransformSerializer);
|
||||||
|
|
||||||
// ignore the below for now to avoid warning spam
|
// ignore the below for now to avoid warning spam
|
||||||
const char* ignore[] = {
|
const char* ignore[] = {
|
||||||
"MWRender::PtrHolder",
|
"MWRender::PtrHolder",
|
||||||
"MWRender::CameraRelativeTransform",
|
|
||||||
"Resource::TemplateRef",
|
"Resource::TemplateRef",
|
||||||
"SceneUtil::LightListCallback",
|
"SceneUtil::LightListCallback",
|
||||||
"SceneUtil::LightManagerUpdateCallback",
|
"SceneUtil::LightManagerUpdateCallback",
|
||||||
"SceneUtil::UpdateRigBounds",
|
"SceneUtil::UpdateRigBounds",
|
||||||
"SceneUtil::UpdateRigGeometry",
|
"SceneUtil::UpdateRigGeometry",
|
||||||
"SceneUtil::LightSource",
|
"SceneUtil::LightSource",
|
||||||
|
"SceneUtil::StateSetUpdater",
|
||||||
"NifOsg::NodeUserData",
|
"NifOsg::NodeUserData",
|
||||||
"NifOsg::FlipController",
|
"NifOsg::FlipController",
|
||||||
"NifOsg::KeyframeController",
|
"NifOsg::KeyframeController",
|
||||||
|
@ -104,6 +114,8 @@ void registerSerializers()
|
||||||
"NifOsg::UpdateMorphGeometry",
|
"NifOsg::UpdateMorphGeometry",
|
||||||
"osgMyGUI::Drawable",
|
"osgMyGUI::Drawable",
|
||||||
"osg::DrawCallback",
|
"osg::DrawCallback",
|
||||||
|
"osgOQ::ClearQueriesCallback",
|
||||||
|
"osgOQ::RetrieveQueriesCallback",
|
||||||
"osg::DummyObject"
|
"osg::DummyObject"
|
||||||
};
|
};
|
||||||
for (size_t i=0; i<sizeof(ignore)/sizeof(ignore[0]); ++i)
|
for (size_t i=0; i<sizeof(ignore)/sizeof(ignore[0]); ++i)
|
||||||
|
|
Loading…
Reference in a new issue