if(theAnimator->getNbFields() == 0)
return;
+ int aRefFieldId = ( theAnimator->getAnimationMode() == VISU::Animation::PARALLEL ) ? theFieldId : 0;
+
+ VISU::ColoredPrs3d_i* aInitialPrs3d = 0;
+ if (theAnimator->getFieldData(aRefFieldId).myPrs.size() > 0)
+ aInitialPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(theAnimator->getFieldData(aRefFieldId).myPrs[0]);
+
theAnimator->generatePresentations(theFieldId);
- FieldData& aFieldData = theAnimator->getFieldData(theFieldId);
+ if (!aInitialPrs3d)
+ aInitialPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(theAnimator->getFieldData(aRefFieldId).myPrs[0]);
- int aRefFieldId = ( theAnimator->getAnimationMode() == VISU::Animation::PARALLEL ) ? theFieldId : 0;
- if(VISU::ColoredPrs3d_i* aInitialPrs3d = dynamic_cast<VISU::ColoredPrs3d_i*>(theAnimator->getFieldData(aRefFieldId).myPrs[0])){
+ if (aInitialPrs3d) {
+ FieldData& aFieldData = theAnimator->getFieldData(theFieldId);
for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
VISU::ColoredPrs3d_i* aColoredPrs3d = aFieldData.myPrs[aFrameId];