mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-25 21:48:57 -05:00
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:
committed by
Emil Axelsson
parent
915d57f6f0
commit
0eabffe752
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user