Commit 77404876 authored by hrchilds's avatar hrchilds

We haven't been doing a good job with plots that change the pipeline variable.

Do it better now for the vector plot.  This should fix some regression failures.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@13338 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2af0d5ae
......@@ -93,6 +93,10 @@ class avtFacelistFilter;
// Jeremy Meredith, Tue Oct 14 15:42:56 EDT 2008
// Changed interface to SetMustCreatePolyData to allow either t/f setting.
//
// Hank Childs, Wed Dec 22 01:27:33 PST 2010
// Implement virtual method to tell base class that we don't want to
// change the active variable.
//
// ****************************************************************************
class AVTFILTERS_API avtGhostZoneAndFacelistFilter :
......@@ -116,6 +120,8 @@ class AVTFILTERS_API avtGhostZoneAndFacelistFilter :
void SetMustCreatePolyData(bool val=true);
virtual void ReleaseData(void);
virtual bool AutomaticallyMakePipelineVariableActive(void)
{ return false; };
protected:
avtGhostZoneFilter *ghostFilter;
......
......@@ -124,6 +124,10 @@ avtDatasetToDatasetFilter::~avtDatasetToDatasetFilter()
// Jeremy Meredith, Thu Feb 15 11:55:03 EST 2007
// Call inherited PreExecute before everything else.
//
// Hank Childs, Wed Dec 22 01:25:47 PST 2010
// Allow for filters that don't want to automatically make the pipeline
// variable be active.
//
// ****************************************************************************
void
......@@ -140,7 +144,8 @@ avtDatasetToDatasetFilter::PreExecute(void)
else if (atts.ValidActiveVariable() &&
atts.GetVariableName() != pipelineVariable)
{
InputSetActiveVariable(pipelineVariable);
if (AutomaticallyMakePipelineVariableActive())
InputSetActiveVariable(pipelineVariable);
}
}
......
......@@ -58,6 +58,12 @@
// Programmer: Hank Childs
// Creation: May 31, 2001
//
// Modifications:
//
// Hank Childs, Wed Dec 22 00:57:47 PST 2010
// Add a method that controls whether the pipeline variable should be
// automatically set as the active variable.
//
// ****************************************************************************
class PIPELINE_API avtDatasetToDatasetFilter
......@@ -83,6 +89,8 @@ class PIPELINE_API avtDatasetToDatasetFilter
virtual void ExamineContract(avtContract_p);
void SetActiveVariable(const char *);
virtual bool AutomaticallyMakePipelineVariableActive(void)
{ return true; };
};
......
......@@ -235,6 +235,26 @@ avtVectorFilter::PreExecute()
}
}
// ****************************************************************************
// Method: avtVectorFilter::PostExecute
//
// Purpose:
// Sets the active variable to be the magnitude of the vector.
//
// Programmer: Hank Childs
// Creation: December 22, 2010
//
// ****************************************************************************
void
avtVectorFilter::PostExecute(void)
{
if (magVarName != "")
OutputSetActiveVariable(magVarName.c_str());
}
// ****************************************************************************
// Method: avtVectorFilter::Equivalent
//
......@@ -424,7 +444,6 @@ avtVectorFilter::SetMagVarName(const string &mname)
magVarName = mname;
}
// ****************************************************************************
// Method: avtVectorFilter::ModifyContract
//
......
......@@ -86,6 +86,9 @@ class vtkVertexFilter;
// This will let us calculate a much closer stride value if the
// user requests a particular number of vectors to be plotted.
//
// Hank Childs, Wed Dec 22 01:27:33 PST 2010
// Add PostExecute method.
//
// ****************************************************************************
class avtVectorFilter : public avtDataTreeIterator
......@@ -115,6 +118,7 @@ class avtVectorFilter : public avtDataTreeIterator
int approxDomains;
virtual void PreExecute(void);
virtual void PostExecute(void);
virtual vtkDataSet *ExecuteData(vtkDataSet *, int, std::string);
virtual void UpdateDataObjectInfo(void);
virtual avtContract_p
......
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