reroot to rigtransform::prepareData old path to rig::buildvertexinfluence
This commit is contained in:
parent
7659b23f38
commit
2aab28149f
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include <osgAnimation/Export>
|
#include <osgAnimation/Export>
|
||||||
#include <osgAnimation/Skeleton>
|
#include <osgAnimation/Skeleton>
|
||||||
#include <osgAnimation/RigTransform>
|
#include <osgAnimation/RigTransformSoftware>
|
||||||
#include <osgAnimation/VertexInfluence>
|
#include <osgAnimation/VertexInfluence>
|
||||||
#include <osg/Geometry>
|
#include <osg/Geometry>
|
||||||
|
|
||||||
@ -151,8 +151,13 @@ namespace osgAnimation
|
|||||||
osg::notify(osg::WARN) << "A RigGeometry did not find a parent skeleton for RigGeometry ( " << geom->getName() << " )" << std::endl;
|
osg::notify(osg::WARN) << "A RigGeometry did not find a parent skeleton for RigGeometry ( " << geom->getName() << " )" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
geom->buildVertexInfluenceSet();
|
|
||||||
geom->setSkeleton(finder._root.get());
|
geom->setSkeleton(finder._root.get());
|
||||||
|
|
||||||
|
if(!geom->getRigTransformImplementation())
|
||||||
|
{
|
||||||
|
geom->setRigTransformImplementation(new RigTransformSoftware);
|
||||||
|
}
|
||||||
|
geom->getRigTransformImplementation()->prepareData(*geom);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!geom->getSkeleton())
|
if(!geom->getSkeleton())
|
||||||
|
@ -118,11 +118,6 @@ void RigGeometry::computeMatrixFromRootSkeleton()
|
|||||||
|
|
||||||
void RigGeometry::update()
|
void RigGeometry::update()
|
||||||
{
|
{
|
||||||
if (!getRigTransformImplementation())
|
|
||||||
{
|
|
||||||
_rigTransformImplementation = new RigTransformSoftware;
|
|
||||||
}
|
|
||||||
|
|
||||||
RigTransform& implementation = *getRigTransformImplementation();
|
RigTransform& implementation = *getRigTransformImplementation();
|
||||||
(implementation)(*this);
|
(implementation)(*this);
|
||||||
}
|
}
|
||||||
|
@ -600,7 +600,7 @@ bool RigTransformHardware::init(RigGeometry& geom)
|
|||||||
void RigTransformHardware::operator()(RigGeometry& geom)
|
void RigTransformHardware::operator()(RigGeometry& geom)
|
||||||
{
|
{
|
||||||
if (_needInit)
|
if (_needInit)
|
||||||
if (!init(geom))
|
if (!prepareData(geom))
|
||||||
return;
|
return;
|
||||||
computeMatrixPaletteUniform(geom.getMatrixFromSkeletonToGeometry(), geom.getInvMatrixFromSkeletonToGeometry());
|
computeMatrixPaletteUniform(geom.getMatrixFromSkeletonToGeometry(), geom.getInvMatrixFromSkeletonToGeometry());
|
||||||
}
|
}
|
||||||
|
@ -256,7 +256,7 @@ bool RigTransformSoftware::prepareData(RigGeometry&rig) {
|
|||||||
void RigTransformSoftware::operator()(RigGeometry& geom)
|
void RigTransformSoftware::operator()(RigGeometry& geom)
|
||||||
{
|
{
|
||||||
if (_needInit)
|
if (_needInit)
|
||||||
if (!init(geom))
|
if (!prepareData(geom))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!geom.getSourceGeometry()) {
|
if (!geom.getSourceGeometry()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user