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:
Robert Osfield
2014-02-24 10:19:48 +00:00
parent 6d68718fba
commit 4ef5d9eb5f
15 changed files with 1566 additions and 103 deletions

View File

@@ -12,7 +12,6 @@
*/
// Written by Wang Rui, (C) 2010
#include <osg/Version>
#include <osg/Notify>
#include <osgDB/FileUtils>
#include <osgDB/WriteFile>

View File

@@ -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