diff --git a/include/osgGA/Widget b/include/osgGA/Widget index 3ef2ebc9f..6d4ba0de9 100644 --- a/include/osgGA/Widget +++ b/include/osgGA/Widget @@ -29,7 +29,7 @@ class OSGUI_EXPORT Widget : public osg::Group public: Widget(); Widget(const Widget& tfw, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); - META_Node(osgUI, Widget); + META_Node(osgGA, Widget); virtual void traverse(osg::NodeVisitor& nv); virtual void traverseImplementation(osg::NodeVisitor& nv); diff --git a/src/osgWrappers/serializers/osg/Group.cpp b/src/osgWrappers/serializers/osg/Group.cpp index e3592ef14..2ce8640a2 100644 --- a/src/osgWrappers/serializers/osg/Group.cpp +++ b/src/osgWrappers/serializers/osg/Group.cpp @@ -51,7 +51,6 @@ struct GroupGetChild : public osgDB::MethodObject if (inputParameters.empty()) return false; osg::Object* indexObject = inputParameters[0].get(); - OSG_NOTICE<<"GroupGetChild "<className()<(indexObject); diff --git a/src/osgWrappers/serializers/osgGA/Widget.cpp b/src/osgWrappers/serializers/osgGA/Widget.cpp new file mode 100644 index 000000000..67140ff47 --- /dev/null +++ b/src/osgWrappers/serializers/osgGA/Widget.cpp @@ -0,0 +1,35 @@ +#include +#include +#include +#include +#include + +struct CreateGraphics : public osgDB::MethodObject +{ + virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const + { + osgGA::Widget* widget = reinterpret_cast(objectPtr); + widget->createGraphics(); + return true; + } +}; + +struct CreateGraphicsImplementation : public osgDB::MethodObject +{ + virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const + { + osgGA::Widget* widget = reinterpret_cast(objectPtr); + widget->createGraphicsImplementation(); + return true; + } +}; + + +REGISTER_OBJECT_WRAPPER( Widget, + new osgGA::Widget, + osgGA::Widget, + "osg::Object osg::Node osg::Group osgGA::Widget" ) +{ + ADD_METHOD_OBJECT( "createGraphics", CreateGraphics ); + ADD_METHOD_OBJECT( "createGraphicsImplementation", CreateGraphicsImplementation ); +}