------------------------------------------------------------------------------
| 261 | |
| 262 | //------------------------------------------------------------------------------ |
| 263 | void vtkPlot3DMetaReader::SetFileNames(Json::Value* val) |
| 264 | { |
| 265 | const Json::Value& filenames = *val; |
| 266 | for (size_t index = 0; index < filenames.size(); ++index) |
| 267 | { |
| 268 | const Json::Value& astep = filenames[(int)index]; |
| 269 | bool doAdd = true; |
| 270 | Plot3DTimeStep aTime; |
| 271 | if (!astep.isMember("time")) |
| 272 | { |
| 273 | vtkErrorMacro("Missing time value in timestep " << index); |
| 274 | doAdd = false; |
| 275 | } |
| 276 | else |
| 277 | { |
| 278 | aTime.Time = astep["time"].asDouble(); |
| 279 | } |
| 280 | |
| 281 | if (!astep.isMember("xyz")) |
| 282 | { |
| 283 | vtkErrorMacro("Missing xyz filename in timestep " << index); |
| 284 | doAdd = false; |
| 285 | } |
| 286 | else |
| 287 | { |
| 288 | std::string xyzfile = astep["xyz"].asString(); |
| 289 | aTime.XYZFile = this->Internal->ResolveFileName(this->FileName, xyzfile); |
| 290 | } |
| 291 | |
| 292 | if (astep.isMember("q")) |
| 293 | { |
| 294 | std::string qfile = astep["q"].asString(); |
| 295 | aTime.QFile = this->Internal->ResolveFileName(this->FileName, qfile); |
| 296 | } |
| 297 | |
| 298 | if (astep.isMember("function")) |
| 299 | { |
| 300 | std::string functionfile = astep["function"].asString(); |
| 301 | aTime.FunctionFile = this->Internal->ResolveFileName(this->FileName, functionfile); |
| 302 | } |
| 303 | |
| 304 | if (doAdd) |
| 305 | { |
| 306 | this->Internal->TimeSteps.push_back(aTime); |
| 307 | } |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | //------------------------------------------------------------------------------ |
| 312 | void vtkPlot3DMetaReader::SetFunctionNames(Json::Value* val) |