//************************************************************************
void VISU_TimeAnimation::addField (SALOMEDS::SObject_ptr theField)
{
- FieldData aNewData;
_PTR(SObject) aField = VISU::GetClientSObject(theField, myStudy);
- aNewData.myField = aField;
- aNewData.myNbFrames = 0;
- aNewData.myPrsType = VISU::TSCALARMAP;
- VISU::Storable::TRestoringMap aMap = getMapOfValue(aNewData.myField);
- aNewData.myNbTimes = VISU::Storable::FindValue(aMap,"myNbTimeStamps").toLong();
- myFieldsLst.append(aNewData);
-
- //find Min/Max timestamps
- if ((myTimeMin == 0) && (myTimeMax == 0)) {
- _PTR(ChildIterator) anIter = myStudy->NewChildIterator(aField);
- anIter->Next(); // First is reference on support
- myTimeMin = getTimeValue(anIter->Value());
- for(; anIter->More(); anIter->Next()) {
- myTimeMax = getTimeValue(anIter->Value());
- }
- }
+ addField(aField);
}