mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-26 14:09:05 -06:00
Issue/2174 - Show items with no GUI tag in asset in the GUI (#3133)
* Always add GUI properties, even if tag is not in the asset To make objects wihtout GUI tag be included in the UI * Hide the hover circle, to clean up scene menu list a little * set root node gui hidden property to true * Properly add the gui properties for all scene graph nodes (even root) * Update GUI hash
This commit is contained in:
@@ -116,6 +116,7 @@ Scene::Scene(std::unique_ptr<SceneInitializer> initializer)
|
||||
{
|
||||
_rootNode.setIdentifier(RootNodeIdentifier);
|
||||
_rootNode.setScene(this);
|
||||
_rootNode.setGuiHintHidden(true);
|
||||
|
||||
_camera->setParent(&_rootNode);
|
||||
}
|
||||
|
||||
@@ -350,18 +350,15 @@ ghoul::mm_unique_ptr<SceneGraphNode> SceneGraphNode::createFromDictionary(
|
||||
result->setGuiName(*p.gui->name);
|
||||
result->_guiDisplayName = result->guiName();
|
||||
}
|
||||
result->addProperty(result->_guiDisplayName);
|
||||
|
||||
if (p.gui->description.has_value()) {
|
||||
result->setDescription(*p.gui->description);
|
||||
result->_guiDescription = result->description();
|
||||
}
|
||||
result->addProperty(result->_guiDescription);
|
||||
|
||||
if (p.gui->hidden.has_value()) {
|
||||
result->_guiHidden = *p.gui->hidden;
|
||||
}
|
||||
result->addProperty(result->_guiHidden);
|
||||
|
||||
if (p.gui->path.has_value()) {
|
||||
if (!p.gui->path->starts_with('/')) {
|
||||
@@ -369,7 +366,6 @@ ghoul::mm_unique_ptr<SceneGraphNode> SceneGraphNode::createFromDictionary(
|
||||
}
|
||||
result->_guiPath = *p.gui->path;
|
||||
}
|
||||
result->addProperty(result->_guiPath);
|
||||
}
|
||||
|
||||
result->_boundingSphere = p.boundingSphere.value_or(result->_boundingSphere);
|
||||
@@ -596,6 +592,11 @@ SceneGraphNode::SceneGraphNode()
|
||||
addProperty(_showDebugSphere);
|
||||
|
||||
addProperty(_supportsDirectInteraction);
|
||||
|
||||
addProperty(_guiDisplayName);
|
||||
addProperty(_guiDescription);
|
||||
addProperty(_guiHidden);
|
||||
addProperty(_guiPath);
|
||||
}
|
||||
|
||||
SceneGraphNode::~SceneGraphNode() {}
|
||||
@@ -1123,6 +1124,10 @@ bool SceneGraphNode::hasGuiHintHidden() const {
|
||||
return _guiHidden;
|
||||
}
|
||||
|
||||
void SceneGraphNode::setGuiHintHidden(bool value) {
|
||||
_guiHidden = value;
|
||||
}
|
||||
|
||||
glm::dvec3 SceneGraphNode::calculateWorldPosition() const {
|
||||
// recursive up the hierarchy if there are parents available
|
||||
if (_parent) {
|
||||
|
||||
Reference in New Issue
Block a user