Added supoort for osg::CullSettings/Camera::InheritanceMaskActionOnAttributeSetting and InheritanceMask properties.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14904 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -1452,9 +1452,12 @@ public:
|
||||
C& object = OBJECT_CAST<C&>(obj);
|
||||
if ( is.isBinary() )
|
||||
{
|
||||
bool ok = false; is >> ok; //code from user serialized ensuring backwards-compatibility
|
||||
if ( !ok ) return true;
|
||||
|
||||
if (is.getFileVersion()<123)
|
||||
{
|
||||
bool ok = false; is >> ok; //code from user serialized ensuring backwards-compatibility
|
||||
if ( !ok ) return true;
|
||||
}
|
||||
|
||||
P mask;
|
||||
is >> mask;
|
||||
(object.*_setter)( mask );
|
||||
@@ -1482,9 +1485,12 @@ public:
|
||||
bool ok = ParentType::_defaultValue!=static_cast<P>(mask);
|
||||
if ( os.isBinary() )
|
||||
{
|
||||
os << ok;
|
||||
if ( !ok )
|
||||
return true;
|
||||
if (os.getFileVersion()<123)
|
||||
{
|
||||
os << ok;
|
||||
if ( !ok )
|
||||
return true;
|
||||
}
|
||||
os << (int)mask; //just write int value in binary case
|
||||
}
|
||||
else
|
||||
@@ -1838,12 +1844,23 @@ protected:
|
||||
|
||||
#define END_ENUM_SERIALIZER() \
|
||||
wrapper->addSerializer(serializer.get(), osgDB::BaseSerializer::RW_ENUM); }
|
||||
|
||||
|
||||
/** defaults to uint bitfield type.*/
|
||||
#define BEGIN_BITFLAGS_SERIALIZER(PROP, DEF) \
|
||||
{ typedef osgDB::BitFlagsSerializer<MyClass> MySerializer; \
|
||||
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP)
|
||||
|
||||
#define BEGIN_UINT_BITFLAGS_SERIALIZER(PROP, DEF) \
|
||||
{ typedef osgDB::BitFlagsSerializer<MyClass, unsigned int> MySerializer; \
|
||||
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP)
|
||||
|
||||
#define BEGIN_INT_BITFLAGS_SERIALIZER(PROP, DEF) \
|
||||
{ typedef osgDB::BitFlagsSerializer<MyClass, int> MySerializer; \
|
||||
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
|
||||
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP)
|
||||
|
||||
#define ADD_BITFLAG_VALUE(VALUE_NAME, VALUE) \
|
||||
serializer->add(#VALUE_NAME, VALUE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user