Hi Patrick,

Quoting "Patrick Keenan" <[email protected]>:
I have an osg::ProxyNode model that I change the material on then I try to update the file itself so that next time I run the program the changes persist. If I save it to my_model.osgb then the next time I go to open it osgDB::readNodeFile locks up trying to read the file, ...
Code:

void M_model::Set_material(void)
{
    osg::ref_ptr<osg::Material> mtl = new osg::Material;
        float alpha = 0.3f;
mtl->setAmbient(osg::Material::FRONT, osg::Vec4(0.75f, 0.53f, 0.19f, alpha));
...

        osg::StateSet* ss = _prox_node->getOrCreateStateSet();
ss->setAttributeAndModes(mtl.get(), osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
        ss->setMode(GL_DEPTH_TEST,osg::StateAttribute::ON);
...

This is just a hunch, but is '_prox_node' the ProxyNode or the node loaded from the file? Did you try to modify/save the child node of ProxyNode?

Cheers,
/ulrich

Attachment: pgpUbj2ZzC_Jo.pgp
Description: PGP Digital Signature

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to