exposed renderable type to gui, fixed path for milkyway items (#866)

* exposed renderable type to gui, fixed path for miklyway items
* Changes to session recording topic
* Update webgui
This commit is contained in:
Micah Acinapura
2019-05-18 11:00:31 -04:00
committed by Emil Axelsson
parent 915d57f6f0
commit 0eabffe752
17 changed files with 123 additions and 51 deletions
+16
View File
@@ -46,6 +46,14 @@ namespace {
"Transparency",
"This value determines the transparency of this object."
};
constexpr openspace::properties::Property::PropertyInfo RenderableTypeInfo = {
"Type",
"Renderable Type",
"This tells the type of the renderable.",
openspace::properties::Property::Visibility::Hidden
};
} // namespace
namespace openspace {
@@ -95,10 +103,12 @@ std::unique_ptr<Renderable> Renderable::createFromDictionary(
return result;
}
Renderable::Renderable(const ghoul::Dictionary& dictionary)
: properties::PropertyOwner({ "Renderable" })
, _enabled(EnabledInfo, true)
, _opacity(OpacityInfo, 1.f, 0.f, 1.f)
, _renderableType(RenderableTypeInfo, "Renderable")
{
// I can't come up with a good reason not to do this for all renderables
registerUpdateRenderBinFromOpacity();
@@ -128,6 +138,12 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary)
}
addProperty(_enabled);
//set type for UI
if (dictionary.hasKey(RenderableTypeInfo.identifier)) {
_renderableType = dictionary.value<std::string>(RenderableTypeInfo.identifier);
}
addProperty(_renderableType);
}
void Renderable::initialize() {}