Hi Anders, If you want to protect an child's state from being override from above you use the PROTECTED mode.
Robert. On Mon, May 9, 2011 at 3:12 AM, Anders Backman <[email protected]> wrote: > Hi. > Guess I been away from OSG a bit too long. > I have a pretty simple question. > Assume I have a renderstate which I set to a group (lets call it PARENT) far > up in the tree close to the root, this state set some default look, with > shadows, texture and diffuse color. > It has on|override|protected to make everything in the scene to get this > look. > Now assume I want to read in a file (in this case an obj file) into the same > tree (child PARENT). The material in the obj file SHOULD now be used. So I > want to override an overridden material. > What is the best way of achieving that, assuming I want everything from the > parent (shadows, lights) to be used, EXCEPT for any material stuff in the > obj file. > Do I have to load the file, traverse down until I find a state, see if it > has a material attribute, set it to on|protected|override? > Or is there any other way of saying, ok, down to this node, we have been > using the material set from the root (PARENT), but it will stop here. > From this node down, anything specified (even without OVERRIDE,PROTECTED), > will be used. > > > Cheers, > Anders > -- > __________________________________________ > Anders Backman, HPC2N > 90187 UmeƄ University, Sweden > [email protected] http://www.hpc2n.umu.se > Cell: +46-70-392 64 67 > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

