Issue/453 (#556)

* Introduced guiName to PropertyOwner
  * Added requirement that PropertyOwner::identifier may not contain whitespaces
  * Changed Name to Identifier in asset and scene files
  * Added new PropertyOwner to RenderEngine that owns the ScreenSpaceRenderables
  * Moved Name and GuiPath into GUI group
  * Added user-facing names to layer groups
This commit is contained in:
Alexander Bock
2018-03-16 09:21:29 -04:00
committed by GitHub
parent 7a93a4fa37
commit db7ae7e384
234 changed files with 2921 additions and 1676 deletions
@@ -84,20 +84,25 @@ ScreenSpaceImageLocal::ScreenSpaceImageLocal(const ghoul::Dictionary& dictionary
"ScreenSpaceImageLocal"
);
if (dictionary.hasKey(KeyName)) {
setName(dictionary.value<std::string>(KeyName));
}
else {
int iIdentifier = 0;
if (_identifier.empty()) {
static int id = 0;
if (id == 0) {
setName("ScreenSpaceImageLocal");
iIdentifier = id;
if (iIdentifier == 0) {
setIdentifier("ScreenSpaceImageLocal");
}
else {
setName("ScreenSpaceImageLocal " + std::to_string(id));
setIdentifier("ScreenSpaceImageLocal" + std::to_string(iIdentifier));
}
++id;
}
if (_guiName.empty()) {
// Adding an extra space to the user-facing name as it looks nicer
setGuiName("ScreenSpaceImageLocal " + std::to_string(iIdentifier));
}
_texturePath.onChange([this]() { _textureIsDirty = true; });
addProperty(_texturePath);