replaced "if (apm || !apm->valid())"
This commit is contained in:
parent
a9590ab80b
commit
6a8f4ad818
@ -112,7 +112,7 @@ int main(int argc, char** argv)
|
|||||||
while (arguments.read("-p",pathfile))
|
while (arguments.read("-p",pathfile))
|
||||||
{
|
{
|
||||||
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
||||||
if (apm || !apm->valid())
|
if (apm && !apm->getAnimationPath()->empty())
|
||||||
{
|
{
|
||||||
apm->setTimeScale(animationSpeed);
|
apm->setTimeScale(animationSpeed);
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ int main( int argc, char **argv )
|
|||||||
while (arguments.read("-p",pathfile))
|
while (arguments.read("-p",pathfile))
|
||||||
{
|
{
|
||||||
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
||||||
if (apm || !apm->valid())
|
if (apm && !apm->getAnimationPath()->empty())
|
||||||
{
|
{
|
||||||
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
|
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
|
||||||
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
|
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
|
||||||
|
@ -113,7 +113,7 @@ int main(int argc, char** argv)
|
|||||||
while (arguments.read("-p",pathfile))
|
while (arguments.read("-p",pathfile))
|
||||||
{
|
{
|
||||||
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
||||||
if (apm || !apm->valid())
|
if (apm && !apm->getAnimationPath()->empty())
|
||||||
{
|
{
|
||||||
apm->setTimeScale(animationSpeed);
|
apm->setTimeScale(animationSpeed);
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ int main(int argc, char** argv)
|
|||||||
while (arguments.read("-p",pathfile))
|
while (arguments.read("-p",pathfile))
|
||||||
{
|
{
|
||||||
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
||||||
if (apm || !apm->valid())
|
if (apm && !apm->getAnimationPath()->empty())
|
||||||
{
|
{
|
||||||
apm->setTimeScale(animationSpeed);
|
apm->setTimeScale(animationSpeed);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user