Merge pull request #428 from mp3butcher/serializerfixbis

add Node associate on Drawable serializers
This commit is contained in:
OpenSceneGraph git repository 2018-01-05 11:26:06 +00:00 committed by GitHub
commit 741db16916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 78 additions and 15 deletions

View File

@ -4,7 +4,7 @@
SET(OPENSCENEGRAPH_MAJOR_VERSION 3)
SET(OPENSCENEGRAPH_MINOR_VERSION 5)
SET(OPENSCENEGRAPH_PATCH_VERSION 10)
SET(OPENSCENEGRAPH_SOVERSION 153)
SET(OPENSCENEGRAPH_SOVERSION 154)
# set to 0 when not a release candidate, non zero means that any generated

View File

@ -27,8 +27,13 @@ static bool writeArea( osgDB::OutputStream& os, const osg::DrawPixels& drawable
REGISTER_OBJECT_WRAPPER( DrawPixels,
new osg::DrawPixels,
osg::DrawPixels,
"osg::Object osg::Drawable osg::DrawPixels" )
"osg::Object osg::Node osg::Drawable osg::DrawPixels" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_VEC3_SERIALIZER( Position, osg::Vec3() ); // _position
ADD_IMAGE_SERIALIZER( Image, osg::Image, NULL ); // _image
ADD_BOOL_SERIALIZER( UseSubImage, false ); // _useSubImage

View File

@ -33,8 +33,12 @@ static bool writeInitialBound( osgDB::OutputStream& os, const osg::Drawable& dra
REGISTER_OBJECT_WRAPPER( Drawable,
/*new osg::Drawable*/NULL,
osg::Drawable,
"osg::Object osg::Drawable" )
"osg::Object osg::Node osg::Drawable" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_OBJECT_SERIALIZER( StateSet, osg::StateSet, NULL ); // _stateset
ADD_USER_SERIALIZER( InitialBound ); // _initialBound
ADD_OBJECT_SERIALIZER( ComputeBoundingBoxCallback,
@ -57,4 +61,5 @@ REGISTER_OBJECT_WRAPPER( Drawable,
UPDATE_TO_VERSION_SCOPED( 145 )
ADD_BOOL_SERIALIZER( CullingActive, true ); // _cullingActive
}
}

View File

@ -144,8 +144,12 @@ static bool writeFastPathHint( osgDB::OutputStream& os, const osg::Geometry& geo
REGISTER_OBJECT_WRAPPER( Geometry,
new osg::Geometry,
osg::Geometry,
"osg::Object osg::Drawable osg::Geometry" )
"osg::Object osg::Node osg::Drawable osg::Geometry" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
//ADD_LIST_SERIALIZER( PrimitiveSetList, osg::Geometry::PrimitiveSetList ); // _primitives
ADD_VECTOR_SERIALIZER( PrimitiveSetList, osg::Geometry::PrimitiveSetList, osgDB::BaseSerializer::RW_OBJECT, 0 );
@ -180,6 +184,5 @@ REGISTER_OBJECT_WRAPPER( Geometry,
ADD_VECTOR_SERIALIZER( VertexAttribArrayList, osg::Geometry::ArrayList, osgDB::BaseSerializer::RW_OBJECT, 0 );
}
wrapper->addFinishedObjectReadCallback( new GeometryFinishedObjectReadCallback() );
}

View File

@ -6,8 +6,13 @@
REGISTER_OBJECT_WRAPPER( Image,
new osg::Image,
osg::Image,
"osg::Object osg::Image" )
"osg::Object osg::BufferData osg::Image" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::BufferData")
}
{
UPDATE_TO_VERSION_SCOPED( 112 )

View File

@ -72,8 +72,12 @@ static bool writeImages( osgDB::OutputStream& os, const osg::ImageSequence& imag
REGISTER_OBJECT_WRAPPER( ImageSequence,
new osg::ImageSequence,
osg::ImageSequence,
"osg::Object osg::Image osg::ImageStream osg::ImageSequence" )
"osg::Object osg::BufferData osg::Image osg::ImageStream osg::ImageSequence" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::BufferData")
}
ADD_DOUBLE_SERIALIZER( ReferenceTime, DBL_MAX ); // _referenceTime
ADD_DOUBLE_SERIALIZER( TimeMultiplier, 1.0 ); // _timeMultiplier

View File

@ -6,8 +6,12 @@
REGISTER_OBJECT_WRAPPER( ImageStream,
new osg::ImageStream,
osg::ImageStream,
"osg::Object osg::Image osg::ImageStream" )
"osg::Object osg::BufferData osg::Image osg::ImageStream" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::BufferData")
}
BEGIN_ENUM_SERIALIZER( LoopingMode, NO_LOOPING );
ADD_ENUM_VALUE( NO_LOOPING );
ADD_ENUM_VALUE( LOOPING );

View File

@ -6,8 +6,13 @@
REGISTER_OBJECT_WRAPPER( ShapeDrawable,
new osg::ShapeDrawable,
osg::ShapeDrawable,
"osg::Object osg::Drawable osg::ShapeDrawable" )
"osg::Object osg::Node osg::Drawable osg::ShapeDrawable" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_VEC4_SERIALIZER( Color, osg::Vec4() ); // _color
ADD_OBJECT_SERIALIZER( TessellationHints, osg::TessellationHints, NULL ); // _tessellationHints
}

View File

@ -68,8 +68,13 @@ static bool writeInfluenceMap( osgDB::OutputStream& os, const osgAnimation::RigG
REGISTER_OBJECT_WRAPPER( osgAnimation_RigGeometry,
new osgAnimation::RigGeometry,
osgAnimation::RigGeometry,
"osg::Object osg::Drawable osg::Geometry osgAnimation::RigGeometry" )
"osg::Object osg::Node osg::Drawable osg::Geometry osgAnimation::RigGeometry" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_USER_SERIALIZER( InfluenceMap ); // _vertexInfluenceMap
ADD_OBJECT_SERIALIZER( SourceGeometry, osg::Geometry, NULL ); // _geometry
@ -77,5 +82,6 @@ REGISTER_OBJECT_WRAPPER( osgAnimation_RigGeometry,
UPDATE_TO_VERSION_SCOPED( 145 )
ADD_OBJECT_SERIALIZER( RigTransformImplementation, osgAnimation::RigTransform, NULL ); // _geometry
}
}
}

View File

@ -6,6 +6,11 @@
REGISTER_OBJECT_WRAPPER( osgParticleConnectedParticleSystem,
new osgParticle::ConnectedParticleSystem,
osgParticle::ConnectedParticleSystem,
"osg::Object osg::Drawable osgParticle::ParticleSystem osgParticle::ConnectedParticleSystem" )
"osg::Object osg::Node osg::Drawable osgParticle::ParticleSystem osgParticle::ConnectedParticleSystem" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
}

View File

@ -6,7 +6,12 @@
REGISTER_OBJECT_WRAPPER( osgText_FadeText,
new osgText::FadeText,
osgText::FadeText,
"osg::Object osg::Drawable osgText::TextBase osgText::Text osgText::FadeText" )
"osg::Object osg::Node osg::Drawable osgText::TextBase osgText::Text osgText::FadeText" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_FLOAT_SERIALIZER( FadeSpeed, 0.0f ); // _fadeSpeed
}

View File

@ -56,8 +56,13 @@ static bool writeColorGradientCorners( osgDB::OutputStream& os, const osgText::T
REGISTER_OBJECT_WRAPPER( osgText_Text,
new osgText::Text,
osgText::Text,
"osg::Object osg::Drawable osgText::TextBase osgText::Text" )
"osg::Object osg::Node osg::Drawable osgText::TextBase osgText::Text" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_VEC4_SERIALIZER( Color, osg::Vec4() ); // _color
BEGIN_ENUM_SERIALIZER( BackdropType, NONE );

View File

@ -6,8 +6,12 @@
REGISTER_OBJECT_WRAPPER( osgText_Text3D,
new osgText::Text3D,
osgText::Text3D,
"osg::Object osg::Drawable osgText::TextBase osgText::Text3D" )
"osg::Object osg::Node osg::Drawable osgText::TextBase osgText::Text3D" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_FLOAT_SERIALIZER( CharacterDepth, 1.0f ); // _characterDepth
BEGIN_ENUM_SERIALIZER( RenderMode, PER_GLYPH );
@ -19,4 +23,6 @@ REGISTER_OBJECT_WRAPPER( osgText_Text3D,
UPDATE_TO_VERSION_SCOPED( 68 )
ADD_VEC4_SERIALIZER( Color, osg::Vec4(1.0,1.0,1.0,1.0) ); // _color
}
}

View File

@ -128,8 +128,13 @@ static bool writeText( osgDB::OutputStream& os, const osgText::TextBase& text )
REGISTER_OBJECT_WRAPPER( osgText_TextBase,
/*new osgText::TextBase*/NULL,
osgText::TextBase,
"osg::Object osg::Drawable osgText::TextBase" )
"osg::Object osg::Node osg::Drawable osgText::TextBase" )
{
{
UPDATE_TO_VERSION_SCOPED( 154 )
ADDED_ASSOCIATE("osg::Node")
}
ADD_USER_SERIALIZER( Font ); // _font
ADD_USER_SERIALIZER( FontSize ); // _fontSize
ADD_USER_SERIALIZER( CharacterSize ); // _characterHeight, _characterAspectRatio