Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonz4_6staff.h"
Toshihiro Shimizu 890ddd
#include "trop.h"
Toshihiro Shimizu 890ddd
#include "tconvert.h"
Toshihiro Shimizu 890ddd
#include "toonz4.6/toonz.h"
Toshihiro Shimizu 890ddd
Shinya Kitaoka 9f5a1b
#ifdef _WIN32
Toshihiro Shimizu 890ddd
#pragma warning(disable : 4996)
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
int isTTT(const char *fn) {
Shinya Kitaoka 120a6e
  int ln, i;
Shinya Kitaoka 120a6e
  char lfn[1024];
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  strcpy(lfn, fn);
Shinya Kitaoka 120a6e
  ln = strlen(lfn);
Shinya Kitaoka 120a6e
  for (i = ln - 1; i >= 0; i--)
Shinya Kitaoka 120a6e
    if (lfn[i] == ' ') {
Shinya Kitaoka 120a6e
      lfn[i] = '\0';
Shinya Kitaoka 120a6e
    } else
Shinya Kitaoka 120a6e
      break;
Shinya Kitaoka 120a6e
  ln = strlen(lfn);
Shinya Kitaoka 120a6e
  if (toupper(lfn[ln - 1]) == (int)'T' && toupper(lfn[ln - 2]) == (int)'T' &&
Shinya Kitaoka 120a6e
      toupper(lfn[ln - 3]) == (int)'T')
Shinya Kitaoka 120a6e
    return 1;
Shinya Kitaoka 120a6e
  return 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
const char *strsave(const char *t) {
Shinya Kitaoka 120a6e
  char *s;
Shinya Kitaoka 120a6e
  s = (char *)malloc(strlen(t) + 1);
Shinya Kitaoka 120a6e
  strcpy(s, t);
Shinya Kitaoka 120a6e
  return s;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Shinya Kitaoka 120a6e
void convertParam(double param[], const char *cParam[], int cParamLen) {
Shinya Kitaoka 120a6e
  std::string app;
Shinya Kitaoka 120a6e
  for (int i = 1; i < 12; i++) {
Shinya Kitaoka 120a6e
    app       = std::to_string(param[i]);
Shinya Kitaoka 120a6e
    cParam[i] = strsave(app.c_str());
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------