+ vector<SGPropertyNode_ptr> texturesets = props->getChildren("texture-set");
+ for (unsigned int i = 0; i < texturesets.size(); i++)
+ {
+ _internal_state st( NULL, false, options );
+ vector<SGPropertyNode_ptr> textures = texturesets[i]->getChildren("texture");
+ for (unsigned int j = 0; j < textures.size(); j++)
+ {
+ string tname = textures[j]->getStringValue();
+ if (tname.empty()) {
+ tname = "unknown.rgb";
+ }
+ SGPath tpath("Textures.high");
+ tpath.append(tname);
+ string fullTexPath = osgDB::findDataFile(tpath.str(), options);
+ if (fullTexPath.empty()) {
+ tpath = SGPath("Textures");
+ tpath.append(tname);
+ fullTexPath = osgDB::findDataFile(tpath.str(), options);
+ }
+ st.add_texture(fullTexPath, textures[j]->getIndex());
+ }
+
+ if (!st.texture_paths.empty() ) {
+ _status.push_back( st );
+ }
+ }
+
+ if (textures.size() == 0 && texturesets.size() == 0) {