Commit 5d699035 authored by hrchilds's avatar hrchilds

Fix bug with SR + ray casting + multiple plots with multiple vars

where network manager/data network/netnodes are setting up avt filters
in weird ways.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@6022 18c085ea-50e0-402c-830e-de6fd14e8384
parent 9680334b
......@@ -68,7 +68,11 @@ using std::deque;
// Brad Whitlock, Wed Mar 21 23:03:25 PST 2007
// Initialize plotName.
//
// Hank Childs, Fri Jan 16 14:38:42 PST 2009
// Initialize time and var.
//
// ****************************************************************************
DataNetwork::DataNetwork(void)
{
nid = -1;
......@@ -79,6 +83,8 @@ DataNetwork::DataNetwork(void)
plotActor = NULL;
clone = false;
plotName = "";
time = -1;
var = "";
}
// ****************************************************************************
......@@ -104,6 +110,7 @@ DataNetwork::DataNetwork(void)
// Fix memory leak.
//
// ****************************************************************************
DataNetwork::~DataNetwork(void)
{
// The terminal node has already been freed by this point.
......
......@@ -108,6 +108,9 @@
// Kathleen Bonnell, Fri Sep 28 08:34:36 PDT 2007
// Added optional bool arg to GetActor to force rexecution.
//
// Hank Childs, Fri Jan 16 14:37:33 PST 2009
// Add a variable field.
//
// ****************************************************************************
class DataNetwork
{
......@@ -127,6 +130,7 @@ public:
avtDataObject_p GetOutput(void) { return terminalNode->GetOutput(); };
void SetDataSpec(avtDataRequest_p s) {dataRequest = s;};
void SetTime(int time_) {time = time_;};
void SetVariable(const std::string &v) {var = v;};
virtual void ReleaseData(void);
......@@ -144,6 +148,7 @@ public:
void SetNetDB(NetnodeDB *d) { netdb = d; };
NetnodeDB* GetNetDB(void) { return netdb; };
virtual int GetTime() {return time;};
const std::string &GetVariable() {return var;};
std::string &GetPlottype(void) { return plottype; };
std::string &GetPlotName(void) { return plotName; };
std::vector<Netnode*> &GetNodeList(void) { return nodeList; };
......@@ -163,6 +168,7 @@ protected:
avtPlot_p plot;
std::string plottype;
std::string plotName;
std::string var;
int time;
bool clone;
};
......
......@@ -130,6 +130,7 @@ NetnodeDB::SetDBInfo(std::string _filename, std::string _var, int _time)
// Returned the cached output if possible.
//
// ****************************************************************************
avtDataObject_p
NetnodeDB::GetOutput(void)
{
......@@ -180,7 +181,24 @@ NetnodeDB::ReleaseData(void)
// Get the final output of a network. This has the effect of walking up
// the line, hooking everything up.
//
// Programmer: Sean Ahern
// Creation: June 26, 2002
//
// Modifications:
//
// Hank Childs, Fri Jan 16 14:34:40 PST 2009
// If this method has already been called once, then don't set up the
// network again. We probably had it right the first time and subsequent
// "settings up" will just get things wrong. Case in point: ray-traced
// volume rendering. The first execution calculates a gradient. The
// second (if another plot has been created in between) can wipe out the
// data attributes. So the volume filter will complain that it doesn't
// have the gradient, even though it is actually there ... the problem
// was that the data atts were overwritten ... which is avoided by not
// overwriting them on subsequent times (i.e. this change).
//
// ****************************************************************************
avtDataObject_p
NetnodeFilter::GetOutput(void)
{
......@@ -196,7 +214,8 @@ NetnodeFilter::GetOutput(void)
}
#endif
filter->SetInput(inputNodes[0]->GetOutput());
if (*(filter->GetInput()) == NULL)
filter->SetInput(inputNodes[0]->GetOutput());
return filter->GetOutput();
}
......
......@@ -824,6 +824,10 @@ NetworkManager::GetDBFromCache(const string &filename, int time,
//
// Mark C. Miller, Tue Jun 10 22:36:25 PDT 2008
// Added support for ignoring bad extents from dbs.
//
// Hank Childs, Fri Jan 16 15:30:15 PST 2009
// Store the variable with the working network.
//
// ****************************************************************************
void
......@@ -854,6 +858,7 @@ NetworkManager::StartNetwork(const string &format,
fileMayHaveUnloadedPlugin,
ignoreExtents);
workingNet->SetNetDB(netDB);
workingNet->SetVariable(leaf);
netDB->SetDBInfo(filename, leaf, time);
// Put an ExpressionEvaluatorFilter right after the netDB to handle
......@@ -1377,7 +1382,11 @@ NetworkManager::CancelNetwork(void)
// Mark C. Miller, Tue Jan 4 10:23:19 PST 2005
// Changed workingNet->GetID to workingNet->GetNetID
//
// Hank Childs, Fri Jan 16 14:39:33 PST 2009
// Set the proper database info when calling UseNetwork.
//
// ****************************************************************************
void
NetworkManager::UseNetwork(int id)
{
......@@ -1405,6 +1414,11 @@ NetworkManager::UseNetwork(int id)
}
workingNet = networkCache[id];
NetnodeDB *db = workingNet->GetNetDB();
int time = workingNet->GetTime();
std::string filename = db->GetFilename();
std::string var = workingNet->GetVariable();
db->SetDBInfo(filename, var, time);
int pipelineIndex = workingNet->GetContract()->GetPipelineIndex();
loadBalancer->ResetPipeline(pipelineIndex);
......
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