-
Notifications
You must be signed in to change notification settings - Fork 128
/
SingleCommand.cpp
36 lines (27 loc) · 1.12 KB
/
SingleCommand.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright Epic Games, Inc. All Rights Reserved.
#include "dnacalib/DNACalib.h"
#include <iostream>
#include <vector>
static const char* usage = "Usage: singlecommand.exe <path-to-dna-file-to-edit>\n";
int main(int argc, char** argv) {
if (argc < 2) {
std::cout << "Provide input dna file!" << std::endl;
std::cout << usage << std::endl;
return -1;
}
const char* inputDNA = argv[1];
auto inStream = dnac::makeScoped<dnac::FileStream>(inputDNA,
dnac::FileStream::AccessMode::Read,
dnac::FileStream::OpenMode::Binary);
auto reader = dnac::makeScoped<dnac::BinaryStreamReader>(inStream.get());
reader->read();
if (!dnac::Status::isOk()) {
std::cout << "Could not read input DNA file!\n";
return -1;
}
auto dnaReader = dnac::makeScoped<dnac::DNACalibDNAReader>(reader.get());
// Execute a one-off single command
dnac::RenameBlendShapeCommand renameBlendShapeA("brow_lateral_L", "wow");
renameBlendShapeA.run(dnaReader.get());
return 0;
}