Added Vector serialization and support in lua plugin top enable script users to set/get vector properties such as osg::Array, osg::PrimitiveSet and children lists.
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
*/
|
||||
// Written by Wang Rui, (C) 2010
|
||||
|
||||
#include <osg/Version>
|
||||
#include <osg/Notify>
|
||||
#include <osgDB/FileUtils>
|
||||
#include <osgDB/WriteFile>
|
||||
|
||||
@@ -239,6 +239,9 @@ PropertyInterface::PropertyInterface():
|
||||
TYPENAME(VEC4US)
|
||||
TYPENAME(VEC4I)
|
||||
TYPENAME(VEC4UI)
|
||||
|
||||
TYPENAME(LIST)
|
||||
TYPENAME(VECTOR)
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +374,7 @@ bool PropertyInterface::copyPropertyDataToObject(osg::Object* object, const std:
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_NOTICE<<"PropertyInterface::copyPropertyDataToObject() Types are not compatible, valueType = "<<valueType<<", destinationType="<<destinationType<<std::endl;
|
||||
OSG_NOTICE<<"PropertyInterface::copyPropertyDataToObject() Types are not compatible, valueType = "<<valueType<<" ["<<getTypeName(valueType)<<"] , destinationType="<<destinationType<<" ["<<getTypeName(destinationType)<<"]"<<std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -394,7 +397,7 @@ bool PropertyInterface::copyPropertyObjectFromObject(const osg::Object* object,
|
||||
}
|
||||
else
|
||||
{
|
||||
OSG_NOTICE<<"PropertyInterface::copyPropertyObjectFromObject() Types are not compatible, valueType = "<<valueType<<", destinationType="<<sourceType<<std::endl;
|
||||
OSG_NOTICE<<"PropertyInterface::copyPropertyObjectFromObject() Types are not compatible, valueType = "<<valueType<<" ["<<getTypeName(valueType)<<"] , sourceType="<<sourceType<<" ["<<getTypeName(sourceType)<<"]"<<std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -636,6 +639,7 @@ bool PropertyInterface::hasMethod(const osg::Object* object, const std::string&
|
||||
return hasMethod(object->getCompoundClassName(), methodName);
|
||||
}
|
||||
|
||||
|
||||
} // end of osgDB namespace
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user