#4603 Python: add case Id to exportSnapshots (#4604)

* #4603 Python: add case Id to exportSnapshots
* Fixup after review
This commit is contained in:
Gaute Lindkvist
2019-08-21 15:11:29 +02:00
committed by GitHub
parent a97066b2f2
commit 7bfe4f4bfe
7 changed files with 16 additions and 8 deletions

View File

@@ -68,9 +68,9 @@ void RicSnapshotAllViewsToFileFeature::saveAllViews()
}
//--------------------------------------------------------------------------------------------------
///
/// Export all snapshots of a given case (or caseId == -1 for all cases)
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix)
void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix /*= ""*/, int caseId /*= -1*/)
{
RimProject* project = RiaApplication::instance()->project();
@@ -94,6 +94,9 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(const
RimCase* cas = projectCases[i];
if (!cas) continue;
bool matchingCaseId = caseId == -1 || caseId == cas->caseId();
if (!matchingCaseId) continue;
std::vector<Rim3dView*> views = cas->views();
for (size_t j = 0; j < views.size(); j++)

View File

@@ -32,7 +32,7 @@ class RicSnapshotAllViewsToFileFeature : public caf::CmdFeature
public:
static void saveAllViews();
static void exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix = "");
static void exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix = "", int caseId = -1);
protected:
// Overrides