use names directly from document to set them in scene inspector

This commit is contained in:
wmayer
2017-01-30 22:29:26 +01:00
parent fc4a1c6081
commit 321ca984c9
5 changed files with 73 additions and 38 deletions

View File

@@ -275,21 +275,6 @@ SbMatrix ViewProvider::convert(const Base::Matrix4D &rcMatrix) const
void ViewProvider::addDisplayMaskMode(SoNode *node, const char* type)
{
if (type) {
std::string name = type;
for (std::string::iterator it = name.begin(); it != name.end(); ++it) {
if (it == name.begin()) {
if (!SbName::isBaseNameStartChar(*it))
*it = '_';
}
else {
if (!SbName::isBaseNameChar(*it))
*it = '_';
}
}
node->setName(name.c_str());
}
_sDisplayMaskModes[type] = pcModeSwitch->getNumChildren();
pcModeSwitch->addChild(node);
}