readd VertexInfluence whenever it's bad named and kinda useless
This commit is contained in:
@@ -804,16 +804,17 @@ bool RigGeometry_readLocalData(Object& obj, Input& fr)
|
||||
for (int i = 0; i < nbGroups; i++)
|
||||
{
|
||||
int nbVertexes = 0;
|
||||
std::string bonename;
|
||||
std::string name;
|
||||
if (fr.matchSequence("osgAnimation::VertexInfluence %s %i {"))
|
||||
{
|
||||
bonename = fr[1].getStr();
|
||||
name = fr[1].getStr();
|
||||
fr[2].getInt(nbVertexes);
|
||||
fr += 4;
|
||||
iteratorAdvanced = true;
|
||||
}
|
||||
|
||||
osgAnimation::IndexWeightList vi;
|
||||
osgAnimation::VertexInfluence vi;
|
||||
vi.setName(name);
|
||||
vi.reserve(nbVertexes);
|
||||
for (int j = 0; j < nbVertexes; j++)
|
||||
{
|
||||
@@ -832,7 +833,7 @@ bool RigGeometry_readLocalData(Object& obj, Input& fr)
|
||||
{
|
||||
fr+=1;
|
||||
}
|
||||
(*vmap)[bonename] = vi;
|
||||
(*vmap)[name] = vi;
|
||||
}
|
||||
if (!vmap->empty())
|
||||
geom.setInfluenceMap(vmap.get());
|
||||
@@ -862,8 +863,8 @@ bool RigGeometry_writeLocalData(const Object& obj, Output& fw)
|
||||
name = "Empty";
|
||||
fw.indent() << "osgAnimation::VertexInfluence \"" << name << "\" " << it->second.size() << " {" << std::endl;
|
||||
fw.moveIn();
|
||||
const osgAnimation::IndexWeightList& vi = it->second;
|
||||
for (osgAnimation::IndexWeightList::const_iterator itv = vi.begin(); itv != vi.end(); itv++)
|
||||
const osgAnimation::VertexInfluence& vi = it->second;
|
||||
for (osgAnimation::VertexInfluence::const_iterator itv = vi.begin(); itv != vi.end(); itv++)
|
||||
{
|
||||
fw.indent() << itv->first << " " << itv->second << std::endl;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ static bool readInfluenceMap( osgDB::InputStream& is, osgAnimation::RigGeometry&
|
||||
is >> is.PROPERTY("VertexInfluence");
|
||||
is.readWrappedString(bonename);
|
||||
viSize = is.readSize(); is >> is.BEGIN_BRACKET;
|
||||
|
||||
osgAnimation::IndexWeightList vi;
|
||||
osgAnimation::VertexInfluence vi;
|
||||
vi.setName( bonename );
|
||||
vi.reserve( viSize );
|
||||
for ( unsigned int j=0; j<viSize; ++j )
|
||||
{
|
||||
@@ -46,14 +46,14 @@ static bool writeInfluenceMap( osgDB::OutputStream& os, const osgAnimation::RigG
|
||||
itr!=map->end(); ++itr )
|
||||
{
|
||||
std::string name = itr->first;
|
||||
const osgAnimation::IndexWeightList& vi = itr->second;
|
||||
const osgAnimation::VertexInfluence& vi = itr->second;
|
||||
if ( name.empty() ) name = "Empty";
|
||||
|
||||
os << os.PROPERTY("VertexInfluence");
|
||||
os.writeWrappedString(name);
|
||||
os.writeSize(vi.size()) ; os << os.BEGIN_BRACKET << std::endl;
|
||||
|
||||
for ( osgAnimation::IndexWeightList::const_iterator vitr=vi.begin();
|
||||
for ( osgAnimation::VertexInfluence::const_iterator vitr=vi.begin();
|
||||
vitr != vi.end(); ++vitr )
|
||||
{
|
||||
os << vitr->first << vitr->second << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user