Commit 232a5ab8 authored by Berk Geveci's avatar Berk Geveci
Browse files

Added helper class for animation. Animation now goes through domains

parent 3b5c0d25
......@@ -52,6 +52,7 @@ SET( ParaViewExtraWrapper_SRCS
)
SET( ParaViewClientNotWrapped_SRCS
vtkPVAnimationBatchHelper.cxx
vtkPVAxesActor.cxx
vtkPVAxesWidget.cxx
vtkPVInteractorStyle.cxx
......
......@@ -29,6 +29,7 @@
#include "vtkKWText.h"
#include "vtkKWView.h"
#include "vtkObjectFactory.h"
#include "vtkPVAnimationBatchHelper.h"
#include "vtkPVApplication.h"
#include "vtkPVData.h"
#include "vtkPVRenderModule.h"
......@@ -182,7 +183,7 @@ public:
//-----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVAnimationInterface);
vtkCxxRevisionMacro(vtkPVAnimationInterface, "1.135.2.1");
vtkCxxRevisionMacro(vtkPVAnimationInterface, "1.135.2.2");
vtkCxxSetObjectMacro(vtkPVAnimationInterface,ControlledWidget, vtkPVWidget);
......@@ -1659,6 +1660,8 @@ void vtkPVAnimationInterface::SaveInBatchScript(ofstream *file,
vtkPVApplication *pvApp = vtkPVApplication::SafeDownCast(this->GetApplication());
vtkPVAnimationBatchHelper *helper = vtkPVAnimationBatchHelper::New();
// Loop through all of the time steps.
t = this->GetGlobalStart();
timeIdx = 0;
......@@ -1679,12 +1682,15 @@ void vtkPVAnimationInterface::SaveInBatchScript(ofstream *file,
}
else
{
vtkPVWidgetProperty *prop = entry->GetCurrentProperty();
if (prop)
vtkSMDomain *dom = entry->GetCurrentSMDomain();
if (dom)
{
this->Script(entry->GetTimeEquation());
prop->SetAnimationTimeInBatch(
file, vtkKWObject::GetFloatResult(pvApp));
helper->SetAnimationValueInBatch(
file, entry->GetCurrentSMDomain(), entry->GetCurrentSMProperty(),
entry->GetPVSource()->GetVTKSourceID(0),
entry->GetAnimationElement(),
vtkKWObject::GetFloatResult(pvApp));
}
}
}
......@@ -1743,6 +1749,8 @@ void vtkPVAnimationInterface::SaveInBatchScript(ofstream *file,
++timeIdx;
++t;
}
helper->Delete();
}
......
......@@ -135,6 +135,7 @@ protected:
~vtkSMProperty();
//BTX
friend class vtkPVAnimationBatchHelper;
friend class vtkSMProxyManager;
friend class vtkSMProxy;
friend class vtkSMSubPropertyIterator;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment