From 4cdca85699029a392da094660e26848a35f2e0af Mon Sep 17 00:00:00 2001 From: Andreas Ekstrand Date: Sun, 1 Apr 2018 10:18:45 +0100 Subject: [PATCH] Small fix (from the 3.6 branch) in the osgjs plugin, avoiding a double addition of the CullFace attribute when it has been turned off. This resulted in an empty json object in the osgjs file causing warnings in osgjs. --- src/osgPlugins/osgjs/WriteVisitor.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/osgPlugins/osgjs/WriteVisitor.cpp b/src/osgPlugins/osgjs/WriteVisitor.cpp index 27760a27b..91fb67f19 100644 --- a/src/osgPlugins/osgjs/WriteVisitor.cpp +++ b/src/osgPlugins/osgjs/WriteVisitor.cpp @@ -1034,8 +1034,6 @@ JSONObject* WriteVisitor::createJSONStateSet(osg::StateSet* stateset) osg::ref_ptr defaultCull = new osg::CullFace(); cf = createJSONCullFace(defaultCull.get()); cf->getMaps()["Mode"] = new JSONValue("DISABLE"); - obj->getMaps()["osg.CullFace"] = cf; - attributeList->getArray().push_back(obj); } else { if (!cullFace) { cullFace = new osg::CullFace();