Point cloud display mode enumeration
After point cloud is imported and saved to a file, opening such file introduces issue with point cloud feature display mode property. Forum discussion: https://forum.freecadweb.org/viewtopic.php?f=3&t=32808
This commit is contained in:
@@ -242,21 +242,23 @@ std::vector<std::string> ViewProviderPoints::getDisplayModes(void) const
|
||||
{
|
||||
std::vector<std::string> StrList;
|
||||
StrList.push_back("Points");
|
||||
StrList.push_back("Color");
|
||||
StrList.push_back("Shaded");
|
||||
|
||||
if (pcObject) {
|
||||
std::map<std::string,App::Property*> Map;
|
||||
pcObject->getPropertyMap(Map);
|
||||
// if (pcObject) {
|
||||
// std::map<std::string,App::Property*> Map;
|
||||
// pcObject->getPropertyMap(Map);
|
||||
|
||||
for (std::map<std::string,App::Property*>::iterator it = Map.begin(); it != Map.end(); ++it) {
|
||||
Base::Type type = it->second->getTypeId();
|
||||
if (type == Points::PropertyNormalList::getClassTypeId())
|
||||
StrList.push_back("Shaded");
|
||||
else if (type == Points::PropertyGreyValueList::getClassTypeId())
|
||||
StrList.push_back("Intensity");
|
||||
else if (type == App::PropertyColorList::getClassTypeId())
|
||||
StrList.push_back("Color");
|
||||
}
|
||||
}
|
||||
// for (std::map<std::string,App::Property*>::iterator it = Map.begin(); it != Map.end(); ++it) {
|
||||
// Base::Type type = it->second->getTypeId();
|
||||
// if (type == Points::PropertyNormalList::getClassTypeId())
|
||||
//~ StrList.push_back("Shaded");
|
||||
// else if (type == Points::PropertyGreyValueList::getClassTypeId())
|
||||
//~ StrList.push_back("Intensity");
|
||||
// else if (type == App::PropertyColorList::getClassTypeId())
|
||||
//~ StrList.push_back("Color");
|
||||
// }
|
||||
// }
|
||||
|
||||
return StrList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user