From 5e790b567e460de29bea43ec5410822db58a6e57 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Fri, 1 Sep 2017 22:12:40 +0000 Subject: [PATCH] Fix node path issue Needs to be set so that the 'cullingActive' flag of the node path's end can be checked --- components/sceneutil/morphgeometry.cpp | 5 ++++- components/sceneutil/riggeometry.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/sceneutil/morphgeometry.cpp b/components/sceneutil/morphgeometry.cpp index 4c53b68a5..98e5a92bc 100644 --- a/components/sceneutil/morphgeometry.cpp +++ b/components/sceneutil/morphgeometry.cpp @@ -147,7 +147,10 @@ void MorphGeometry::cull(osg::NodeVisitor *nv) { if (mLastFrameNumber == nv->getTraversalNumber() || !mDirty) { - nv->apply(*getGeometry(mLastFrameNumber)); + osg::Geometry& geom = *getGeometry(mLastFrameNumber); + nv->pushOntoNodePath(&geom); + nv->apply(geom); + nv->popFromNodePath(); return; } diff --git a/components/sceneutil/riggeometry.cpp b/components/sceneutil/riggeometry.cpp index f3eea1bbd..f52bca80c 100644 --- a/components/sceneutil/riggeometry.cpp +++ b/components/sceneutil/riggeometry.cpp @@ -174,7 +174,10 @@ void RigGeometry::cull(osg::NodeVisitor* nv) if ((!mSkeleton->getActive() && mLastFrameNumber != 0) || mLastFrameNumber == nv->getTraversalNumber()) { - nv->apply(*getGeometry(mLastFrameNumber)); + osg::Geometry& geom = *getGeometry(mLastFrameNumber); + nv->pushOntoNodePath(&geom); + nv->apply(geom); + nv->popFromNodePath(); return; } mLastFrameNumber = nv->getTraversalNumber();