Add ability to define a color for SolidColor layers at initialization.

This commit is contained in:
Kalle Bladin
2017-08-15 12:09:06 +02:00
parent 59694c8213
commit 0ac1f96ae8

View File

@@ -1,4 +1,4 @@
/*****************************************************************************************
/*****************************************************************************************
* *
* OpenSpace *
* *
@@ -337,8 +337,14 @@ void Layer::initializeBasedOnType(layergroupid::TypeID typeId, ghoul::Dictionary
);
break;
}
case layergroupid::TypeID::SolidColor:
case layergroupid::TypeID::SolidColor: {
if (initDict.hasKeyAndValue<glm::vec3>(ColorInfo.identifier)) {
glm::vec3 color;
initDict.getValue(ColorInfo.identifier, color);
_otherTypesProperties.color.setValue(color);
}
break;
}
default:
throw ghoul::RuntimeError("Unable to create layer. Unknown type.");
break;