Commit 0d53df17 authored by hrchilds's avatar hrchilds
Browse files

Update from June 27, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@489 18c085ea-50e0-402c-830e-de6fd14e8384
parent 62219df0
......@@ -256,6 +256,8 @@ def MovieClassSaveWindow():
# Programmer: Brad Whitlock
# Date: Tue Aug 3 16:11:01 PST 2004
#
# Modifications:
#
###############################################################################
class EngineAttributesParser(XMLParser):
......@@ -336,6 +338,83 @@ class EngineAttributesParser(XMLParser):
return
self.engineProperties[name] = value
###############################################################################
# Class: WindowSizeParser
#
# Purpose: This class parses session files for the windowSize field in
# the ViewerWindow and builds a list of [width,height] values.
#
# Programmer: Brad Whitlock
# Date: Fri Jun 24 10:03:23 PDT 2005
#
# Modifications:
#
###############################################################################
class WindowSizeParser(XMLParser):
def __init__(self):
XMLParser.__init__(self)
self.elements = {"Object" : ("<Object>", "</Object>"), "Field" : ("<Field>", "</Field>")}
self.attributes = {"name" : "", "type" : None, "length" : 0}
self.readAtts = 0
self.readingField = 0
self.windowSizes = []
self.activeWindow = 0
self.objectNames = []
self.dataAtts = None
def handle_starttag(self, tag, method, attributes):
if tag == "Object":
if "name" in attributes.keys():
name = attributes["name"]
self.objectNames = self.objectNames + [name]
if name == "ViewerWindowManager":
self.readAtts = 1
else:
self.readingField = 1
self.dataAtts = attributes
def handle_endtag(self, tag, method):
if tag == "Object":
name = self.objectNames[-1]
if name == "ViewerWindowManager":
self.readAtts = 0
self.objectNames = self.objectNames[:-1]
elif tag == "Field":
self.readingField = 0
def handle_data(self, data):
def not_all_spaces(s):
space = ""
for i in range(len(s)):
space = space + " "
return s != space
if self.readAtts and self.readingField and len(data) > 0:
name = self.dataAtts["name"]
type = self.dataAtts["type"]
value = []
if name == "activeWindow" and type == "int":
try:
self.activeWindow = int(data)
if self.activeWindow < 0:
self.activeWindow = 0
except ValueError:
return
elif name == "windowSize" and type == "intArray":
length = self.dataAtts["length"]
if length == "2":
fragments = string.split(data, " ")
value = []
for s in fragments:
if len(s) > 0:
if not_all_spaces(s):
try:
val = int(s)
value = value + [val]
except ValueError:
continue
self.windowSizes = self.windowSizes + [value[:2]]
###############################################################################
# Class: MakeMovie
......@@ -501,10 +580,13 @@ class MakeMovie:
# Brad Whitlock, Wed Jun 1 10:13:56 PDT 2005
# Added -stereo and support for multiple formats and geometries.
#
# Brad Whitlock, Fri Jun 24 10:25:36 PDT 2005
# Added a note about omitting the -geometry flag.
#
###########################################################################
def PrintUsage(self):
print "Usage: visit -movie [-format fmt] [-geometry size] -sessionfile name"
print "Usage: visit -movie [-format fmt] [-geometry size]"
print " -sessionfile name | -scriptfile name "
print " [-output moviename] [-framestep step]"
print " [PARALLEL OPTIONS]"
......@@ -553,6 +635,11 @@ class MakeMovie:
print " more than one WxH using commas. Example:"
print " -geometry 320x320,1024x768."
print ""
print " If you omit the -geometry argument then the"
print " window sizes stored in your session file will be"
print " used. If you are not using a session file then"
print " the default size will be 512x512."
print ""
print " -sessionfile name The sessionfile option lets you pick the name"
print " of the VisIt session to use as input for your"
print " movie. The VisIt session is a file that describes"
......@@ -757,6 +844,9 @@ class MakeMovie:
# Brad Whitlock, Wed Jun 1 13:51:27 PST 2005
# Added support for multiple formats and geometries and for stereo.
#
# Brad Whitlock, Fri Jun 24 10:11:31 PDT 2005
# Added support for reading the window sizes out of the session file.
#
###########################################################################
def ProcessArguments(self):
......@@ -1016,7 +1106,21 @@ class MakeMovie:
if len(formatList) == 0:
formatList = ["mpeg"]
if len(sizeList) == 0:
sizeList = [(512, 512)]
if self.stateFile != "":
# No -geometry flag was specified but we're using a session file
# so let's parse the sizes out of the session file.
windowInfo = self.ReadWindowSizes(self.stateFile)
activeWindow = windowInfo[0]
windowSizes = windowInfo[1]
if len(windowSizes) > 0:
if activeWindow >= len(windowSizes):
activeWindow = 0
sizeList = [tuple(windowSizes[activeWindow])]
else:
sizeList = [(512, 512)]
else:
sizeList = [(512, 512)]
# If the formatList and sizeList are not the same size, make them
# be the same size by repeating the last value in the shorter of the
# lists until the lists are the same length.
......@@ -1318,6 +1422,36 @@ class MakeMovie:
except:
return {}
###########################################################################
# Method: ReadWindowSizes
#
# Purpose: This method reads the ViewerWindow sizes out of a session
# file and returns the list of sizes.
#
# Programmer: Brad Whitlock
# Date: Fri Jun 24 10:06:24 PDT 2005
#
###########################################################################
def ReadWindowSizes(self, sessionFile):
try:
# Read the file.
f = open(sessionFile, "r")
lines = f.readlines()
f.close()
# Parse the file
p = WindowSizeParser()
for line in lines:
p.feed(line)
p.close()
return (p.activeWindow, p.windowSizes)
except VisItInterrupt:
raise
except:
return (0, [])
###########################################################################
# Method: CreateEngineArguments
#
......
......@@ -203,6 +203,9 @@
# Brad Whitlock, Thu May 12 11:30:24 PDT 2005
# Added code to copy MacOS X address computation script and address file.
#
# Brad Whitlock, Thu Jun 23 17:11:21 PST 2005
# Made it copy makemoviemain.py
#
#------------------------------------------------------------------------------
set DataFiles = "TRUE"
......@@ -649,6 +652,7 @@ endif
# Copy the MPEG encoder and the makemovie script.
cp $VisItDir/exe/mpeg_encode $bindir
cp $VisItDir/bin/makemovie.py $bindir
cp $VisItDir/bin/makemoviemain.py $bindir
# copy surfcomp
cp $VisItDir/exe/surfcomp $bindir
# Copy MacOS X address computation script and address file.
......
......@@ -42,6 +42,9 @@
# Brad Whitlock, Thu Aug 12 12:26:57 PDT 2004
# I added support for the MSVC7.Net compiler suite.
#
# Brad Whitlock, Thu Jun 23 17:12:02 PST 2005
# I made it copy makemoviemain.py
#
#------------------------------------------------------------------------------
if(`pwd` != "/data_vobs/VisIt") then
......@@ -178,8 +181,9 @@ cd $VisItDev
echo "Creating bin directory..."
cp -R $TOPDIR/windowsbuild/bin .
foreach configdir (Debug Release MSVC7.Net/Debug MSVC7.Net/Release)
# Copy the makemovie script to the right bin dir.
# Copy the makemovie scripts to the right bin dir.
cp $VISITSRC/bin/makemovie.py bin/$configdir
cp $VISITSRC/bin/makemoviemain.py bin/$configdir
# Copy the host config files to the right bin dir.
$SCRIPTDIR/converttextfile $SCRIPTDIR/visit-config-open.ini bin/$configdir/visit-config-open.ini
$SCRIPTDIR/converttextfile $SCRIPTDIR/visit-config-closed.ini bin/$configdir/visit-config-closed.ini
......
......@@ -1179,3 +1179,56 @@ GetVisItInstallationDirectory(const char *version)
return installDir;
#endif
}
// ****************************************************************************
// Method: GetVisItArchitectureDirectory
//
// Purpose:
// Gets the name of the directory where VisIt's current binary is installed.
// This directory typically contains the bin, lib, plugin, etc directories
// on UNIX installations.
//
// Arguments:
// version : The version number for which we want the archtecture dir.
//
// Returns: The architecture dir.
//
// Note: On Windows, this function returns the same as
// GetVisItInstallationDirectory.
//
// Programmer: Brad Whitlock
// Creation: Fri Jun 24 11:33:07 PDT 2005
//
// Modifications:
//
// ****************************************************************************
std::string
GetVisItArchitectureDirectory()
{
return GetVisItArchitectureDirectory(VERSION);
}
std::string
GetVisItArchitectureDirectory(const char *version)
{
#if defined(_WIN32)
// Get the installation dir for the specified from the registry.
char *visitHome = 0;
std::string archDir("C:\\");
if(ReadKey(version, "VISITHOME", &visitHome) == 1)
{
archDir = visitHome;
delete [] visitHome;
}
return archDir;
#else
// Get the installation dir for the version that's running. They all use
// the same "visit" script so it's okay to do this.
std::string archDir(std::string("/usr/local/visit/") + std::string(VERSION));
const char *adir = getenv("VISITARCHHOME");
if(adir != 0)
archDir = adir;
return archDir;
#endif
}
......@@ -39,6 +39,8 @@ std::vector<std::string> UTILITY_API SplitValues(const std::string &buff,
std::string UTILITY_API GetVisItInstallationDirectory();
std::string UTILITY_API GetVisItInstallationDirectory(const char *version);
std::string UTILITY_API GetVisItArchitectureDirectory();
std::string UTILITY_API GetVisItArchitectureDirectory(const char *version);
std::string UTILITY_API GetUserVisItDirectory();
UTILITY_API char * GetDefaultConfigFile(const char *filename = 0, const char *home = 0);
......
......@@ -72,6 +72,10 @@ QvisExportDBWindow::~QvisExportDBWindow()
// Programmer: Hank Childs
// Creation: May 25, 2005
//
// Modifications:
// Brad Whitlock, Mon Jun 27 13:52:24 PST 2005
// I added a directory selection button.
//
// ****************************************************************************
void
......@@ -93,11 +97,24 @@ QvisExportDBWindow::CreateWindowContents()
infoLayout->addWidget(filenameLabel, 1, 0);
infoLayout->addWidget(filenameLineEdit, 1, 1);
directoryNameLineEdit = new QLineEdit(infoBox, "directoryNameLineEdit");
connect(directoryNameLineEdit, SIGNAL(returnPressed()), this, SLOT(processDirectoryNameText()));
QLabel *directoryNameLabel = new QLabel(directoryNameLineEdit, "Directory name", infoBox, "directoryNameLabel");
QHBox *directoryParent = new QHBox(infoBox, "directoryParent");
directoryNameLineEdit = new QLineEdit(directoryParent, "directoryNameLineEdit");
connect(directoryNameLineEdit, SIGNAL(returnPressed()),
this, SLOT(processDirectoryNameText()));
QLabel *directoryNameLabel = new QLabel(directoryNameLineEdit,
"Directory name", infoBox, "directoryNameLabel");
QPushButton *directorySelectButton = new QPushButton("...",
directoryParent, "directorySelectButton");
directorySelectButton->setMaximumWidth(
fontMetrics().boundingRect("...").width() + 6);
directorySelectButton->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
QSizePolicy::Minimum));
connect(directorySelectButton, SIGNAL(clicked()),
this, SLOT(selectOutputDirectory()));
directoryParent->setSpacing(0);
directoryParent->setStretchFactor(directoryNameLineEdit, 100);
infoLayout->addWidget(directoryNameLabel, 2, 0);
infoLayout->addWidget(directoryNameLineEdit, 2, 1);
infoLayout->addWidget(directoryParent, 2, 1);
fileFormatComboBox = new QComboBox(false, infoBox, "fileFormatComboBox");
......@@ -509,3 +526,37 @@ QvisExportDBWindow::variableProcessText()
Apply();
}
// ****************************************************************************
// Method: QvisExportDBWindow::selectOutputDirectory
//
// Purpose:
// This is a Qt slot function that is called when we want to interactively
// select a new output directory.
//
// Programmer: Brad Whitlock
// Creation: Mon Jun 27 13:52:55 PST 2005
//
// Modifications:
//
// ****************************************************************************
void
QvisExportDBWindow::selectOutputDirectory()
{
//
// Try and get a directory using a file dialog.
//
QString initialDir(exportDBAtts->GetDirname().c_str());
QString dirName = QFileDialog::getExistingDirectory(initialDir, this,
"getDirectoryDialog", "Select output directory");
//
// If a directory was chosen, use it as the output directory.
//
if(!dirName.isEmpty())
{
directoryNameLineEdit->setText(dirName);
GetCurrentValues(1);
Apply();
}
}
......@@ -26,6 +26,10 @@ class ExportDBAttributes;
// Programmer: Hank Childs
// Creation: May 25, 2005
//
// Modifications:
// Brad Whitlock, Mon Jun 27 13:51:01 PST 2005
// Added a directory selection button.
//
// ****************************************************************************
class GUI_API QvisExportDBWindow : public QvisPostableWindowObserver
......@@ -51,6 +55,7 @@ protected slots:
void exportDB();
void exportButtonClicked();
void addVariable(const QString &);
void selectOutputDirectory();
private:
QLineEdit *filenameLineEdit;
QLineEdit *directoryNameLineEdit;
......
......@@ -2433,6 +2433,32 @@ QvisFilePanel::GetAllowFileSelectionChange() const
return allowFileSelectionChange;
}
// ****************************************************************************
// Method: QvisFilePanel::UpdateOpenButtonState
//
// Purpose:
// Updates the text and enabled state of the Open button based on what
// file is currently selected in the list view.
//
// Programmer: Brad Whitlock
// Creation: Mon Jun 27 14:53:26 PST 2005
//
// Modifications:
//
// ****************************************************************************
void
QvisFilePanel::UpdateOpenButtonState()
{
QListViewItem *item = fileListView->selectedItem();
if(item != 0)
{
// Cast to a derived type.
QvisListViewFileItem *fileItem = (QvisListViewFileItem *)item;
UpdateOpenButtonState(fileItem);
}
}
//
// Qt slot functions.
//
......@@ -2733,6 +2759,10 @@ QvisFilePanel::fileExpanded(QListViewItem *item)
// I moved the code to update the enabled state of the replace button into
// its own method.
//
// Brad Whitlock, Mon Jun 27 14:49:43 PST 2005
// I moved the code that updates the text and enabled state for the Open
// button into its own method.
//
// ****************************************************************************
void
......@@ -2743,7 +2773,35 @@ QvisFilePanel::highlightFile(QListViewItem *item)
// Cast to a derived type.
QvisListViewFileItem *fileItem = (QvisListViewFileItem *)item;
UpdateOpenButtonState(fileItem);
//
// If the highlighted file is not the active file, then
// enable the open, replace, overlay buttons.
//
bool enable = UpdateReplaceButtonEnabledState();
overlayButton->setEnabled(enable);
}
// ****************************************************************************
// Method: QvisFilePanel::UpdateOpenButtonState
//
// Purpose:
// Updates the state of the Open button based on what item is highlighted.
//
// Arguments:
// fileItem : The highlighted item in the list view.
//
// Programmer: Brad Whitlock
// Creation: Mon Jun 27 14:57:22 PST 2005
//
// Modifications:
//
// ****************************************************************************
void
QvisFilePanel::UpdateOpenButtonState(QvisListViewFileItem *fileItem)
{
// If the filename is not a file. Disable the open files button.
if(!fileItem->isFile())
{
......@@ -2763,13 +2821,6 @@ QvisFilePanel::highlightFile(QListViewItem *item)
else
openButton->setText("Open");
openButton->setEnabled(true);
//
// If the highlighted file is not the active file, then
// enable the open, replace, overlay buttons.
//
bool enable = UpdateReplaceButtonEnabledState();
overlayButton->setEnabled(enable);
}
// ****************************************************************************
......
......@@ -102,6 +102,8 @@ class ViewerProxy;
// Brad Whitlock, Mon Dec 20 12:18:36 PDT 2004
// I added UpdateReplaceButtonEnabledState
//
// Brad Whitlock, Mon Jun 27 14:54:27 PST 2005
// Added updateOpenButtonState and
// ****************************************************************************
class GUI_API QvisFilePanel : public QWidget, public SimpleObserver, public GUIBase
......@@ -150,6 +152,8 @@ public:
void SetShowSelectedFiles(bool);
bool GetAllowFileSelectionChange() const;
void SetAllowFileSelectionChange(bool);
void UpdateOpenButtonState();
signals:
void reopenOnNextFrame();
private:
......@@ -160,6 +164,7 @@ private:
void UpdateTimeFieldText(int timeState);
void UpdateAnimationControlsEnabledState();
bool UpdateReplaceButtonEnabledState();
void UpdateOpenButtonState(QvisListViewFileItem *fileItem);
bool OpenFile(const QualifiedFilename &filename, int timeState,
bool reOpen);
......
......@@ -5794,9 +5794,9 @@ QvisGUIApplication::SaveMovie()
{
// Determine the location of the makemovie script.
#if defined(_WIN32)
std::string makemovie(GetVisItInstallationDirectory() + "\\makemovie.py");
std::string makemovie(GetVisItArchitectureDirectory() + "\\makemovie.py");
#else
std::string makemovie(GetVisItInstallationDirectory() + "/bin/makemovie.py");
std::string makemovie(GetVisItArchitectureDirectory() + "/bin/makemovie.py");
#endif
// Assemble a string of code to execute.
......
......@@ -1538,7 +1538,9 @@ QvisMainWindow::reopenFile(int fileIndex)
// Creation: Fri Feb 27 11:51:59 PDT 2004
//
// Modifications:
//
// Brad Whitlock, Mon Jun 27 14:53:14 PST 2005
// Added a little code to update the file panel.
//
// ****************************************************************************
void
......@@ -1559,6 +1561,9 @@ QvisMainWindow::closeFile(int fileIndex)
// the viewer will issue a warning message.
//
viewer->CloseDatabase(sources[fileIndex]);
// Update the file panel based on what's selected.
filePanel->UpdateOpenButtonState();
}
}
......
......@@ -1056,7 +1056,7 @@ QvisSaveMovieWizard::UpdatePage()
outDir += SLASH_STRING;
movieAtts->SetOutputDirectory(outDir);
}
qDebug("Update the filename, output dir page.");
//qDebug("Update the filename, output dir page.");
page11_outputDirectoryLineEdit->blockSignals(true);
page11_outputDirectoryLineEdit->setText(movieAtts->
GetOutputDirectory().c_str());
......
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>VisIt home page</title>
</head>
<body>
<p align="center"><b><font size="6">VisIt home page</font></b></p>
<p>Welcome to VisIt's main help page.
VisIt is a distributed, parallel, visualization tool for visualizing data defined on two- and three-dimensional structured and unstructured meshes. VisIt's
distributed architecture allows it to leverage both the compute power of a large
parallel computer and the graphics acceleration hardware of a local workstation.
Another benefit of the distributed architecture is that VisIt can visualize the
data where it is generated, eliminating the need to move the data. VisIt can be
controlled by a Graphical User Interface (GUI) or through the Python or Java
programming languages.</p>
<p><b><font size="4">Database Features:</font></b></p>
<ul>
<li>2D and 3D database support</li>
<li>Silo database support</li>
<li>Exodus database support</li>
<li>VTK database support</li>
<li>Alias Wavefront Obj database support</li>
</ul>
<p><b><font size="4">Plotting Features:</font></b></p>
<ul>
<li>Contour (with optional transparency)</li>
<li>Curve</li>
<li>Mesh</li>
<li>Pseudocolor (with optional transparency)</li>
<li>Streamlines</li>
<li>Subset (with optional transparency)</li>
<li>Surface</li>
<li>Vector</li>
<li>Volume-rendering (software and hardware)</li>
</ul>
<p><font size="4"><b>Operators:</b></font></p>
<ul>
<li>Box clip</li>
<li>Cone slice</li>
<li>Index select</li>
<li>Isosurface</li>
<li>Onion peel</li>
<li>Planar slice</li>
<li>Sphere slice</li>
<li>Threshold</li>
<li>Transform</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>VisIt home page</title>
</head>
<body>
<p align="center"><b><font size="6">VisIt home page</font></b></p>