- aData->addAttribute(COLOR_ID(), ModelAPI_AttributeColor::type());
- // set the default value
- bool anIsRandomColor = Config_PropManager::boolean("Visualization", "random_result_color",
- "true");
- AttributeColorPtr aColorAttr = std::dynamic_pointer_cast<ModelAPI_AttributeColor>
- (aData->attribute(COLOR_ID()));
- if (anIsRandomColor)
- aColorAttr->setValuesRandom();
- else {
- std::vector<int> aRGB;
- aRGB = Config_PropManager::color("Visualization", "result_body_color", RESULT_BODY_COLOR);
- aColorAttr->setValues(aRGB[0], aRGB[1], aRGB[2]);
- }
+ aData->addAttribute(COLOR_ID(), ModelAPI_AttributeIntArray::typeId());
+}
+
+void Model_ResultBody::colorConfigInfo(std::string& theSection, std::string& theName,
+ std::string& theDefault)
+{
+ theSection = "Visualization";
+ theName = "result_body_color";
+ theDefault = DEFAULT_COLOR();