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
Toshihiro Shimizu 890ddd
#ifdef WIN32
Toshihiro Shimizu 890ddd
#pragma warning(disable : 4996)
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
//---------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
int isTTT(const char *fn)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	int ln, i;
Toshihiro Shimizu 890ddd
	char lfn[1024];
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	strcpy(lfn, fn);
Toshihiro Shimizu 890ddd
	ln = strlen(lfn);
Toshihiro Shimizu 890ddd
	for (i = ln - 1; i >= 0; i--)
Toshihiro Shimizu 890ddd
		if (lfn[i] == ' ') {
Toshihiro Shimizu 890ddd
			lfn[i] = '\0';
Toshihiro Shimizu 890ddd
		} else
Toshihiro Shimizu 890ddd
			break;
Toshihiro Shimizu 890ddd
	ln = strlen(lfn);
Toshihiro Shimizu 890ddd
	if (toupper(lfn[ln - 1]) == (int)'T' &&
Toshihiro Shimizu 890ddd
		toupper(lfn[ln - 2]) == (int)'T' &&
Toshihiro Shimizu 890ddd
		toupper(lfn[ln - 3]) == (int)'T')
Toshihiro Shimizu 890ddd
		return 1;
Toshihiro Shimizu 890ddd
	return 0;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
const char *strsave(const char *t)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	char *s;
Toshihiro Shimizu 890ddd
	s = (char *)malloc(strlen(t) + 1);
Toshihiro Shimizu 890ddd
	strcpy(s, t);
Toshihiro Shimizu 890ddd
	return s;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void convertParam(double param[], const char *cParam[], int cParamLen)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	string app;
Toshihiro Shimizu 890ddd
	for (int i = 1; i < 12; i++) {
Toshihiro Shimizu 890ddd
		app = toString(param[i]);
Toshihiro Shimizu 890ddd
		cParam[i] = strsave(app.c_str());
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-----------------------------------------------------------------------