<div dir="ltr">Hi Paul,<br><div class="gmail_extra"><br><div class="gmail_quote">On 17 August 2017 at 15:59, Paul Bigeon <span dir="ltr"><<a href="mailto:osgforum@tevs.eu" target="_blank">osgforum@tevs.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">node_stateset->setAttribute(<wbr>new osg::ref_ptr< osg::Material >(), osg::StateAttribute::ON);<br></blockquote><div><br></div><div>You can remove a Material attribute by doing:<br><br></div><div> stateset->removeAttribute(osg::StateAttribute::MATERIAL);<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Or do I have to check for setcolorArray and setsecondaryColorArray of all my nodes ?<br></blockquote><div><br></div><div>SecondaryColor is lesser used extension to the old OpenGL fixed function pipeline, it's almost never used these days so should be safe to ignore.<br><br></div><div>The normal and color arrays are of interest. You could write a NodeVisitor to traverse the scene graph for all osg::Geometry and check this arrays, or just write the subgraphs out to a .osgt file and then open them up in an editor. Having a look at the scene graph's .osgt file can be a really useful step to help understand how things are put together.<br></div><div><br></div><div>Cheers,<br></div>Robert.<br></div></div></div>