support -ma

This commit is contained in:
David Rose 2006-11-08 23:15:31 +00:00
parent 9879a47542
commit 545cb6d164
2 changed files with 15 additions and 4 deletions

View File

@ -77,6 +77,11 @@ MayaCopy() {
"This option omits the textures and references of the models to be re-mayacopied",
&CVSCopy::dispatch_none, &_omit_tex);
add_option
("ma", "", 0,
"Write a .ma file instead of a .mb file (regardless of input type)",
&CVSCopy::dispatch_none, &_maya_ascii);
add_path_replace_options();
}
@ -155,10 +160,15 @@ filter_filename(const string &source) {
underscore = string::npos;
string extension = source.substr(dot);
if (extension == ".ma") {
// By convention, we always write out Maya binary files (even if
// we receive a Maya ascii file for input).
extension = ".mb";
if (extension == ".ma" || extension == ".mb") {
// If we are reading a Maya file (as opposed to a texture image),
// then we always write ".mb" files out (unless -ma was specified
// on the command line).
if (_maya_ascii) {
extension = ".ma";
} else {
extension = ".mb";
}
}
if (underscore == string::npos) {

View File

@ -74,6 +74,7 @@ private:
bool _keep_ver;
bool _omit_tex;
int _curr_idx;
bool _maya_ascii;
/*
vector_string _replace_prefix;
*/