提交 003a81f3 编写于 作者: O Ohayon Franck

Updated CURRENT_REVISION string with Major.Minor.revision

上级 a0f8b935
#ifndef __COLLADABU_VERSIONINFO_H__
#define __COLLADABU_VERSIONINFO_H__
namespace COLLADABU
{
const String CURRENT_REVISION = "developer_version";
// CURRENT_REVISION = MajorVersion.MinorVersion.Revision
//
const String CURRENT_REVISION = "1.6.developer_version";
}
#endif // __COLLADABU_VERSIONINFO_H__
......@@ -35,6 +35,8 @@
#include "COLLADASWScene.h"
#include "COLLADASWConstants.h"
#include "COLLADABUVersionInfo.h"
#include <max.h>
namespace COLLADAMax
......@@ -42,11 +44,17 @@ namespace COLLADAMax
const String DocumentExporter::SCENE_ID = "MaxScene";
const String DocumentExporter::PHYSIC_SCENE_ID = "PhysicMaxScene";
std::size_t foundLast = COLLADABU::CURRENT_REVISION.find_last_of(".");
std::size_t foundFirst = COLLADABU::CURRENT_REVISION.find_first_of(".");
String versionMajor = COLLADABU::CURRENT_REVISION.substr(0, foundFirst);
String versionMinor = COLLADABU::CURRENT_REVISION.substr(foundFirst + 1, foundLast - foundFirst - 1);
const String DocumentExporter::AUTHORING_TOOL = String("OpenCOLLADA for 3ds Max") +
(COLLADAPlugin::PLUGIN_VERSION_STRING.empty() ? "" : String("; ") + COLLADAPlugin::PLUGIN_VERSION_STRING) +
(COLLADAPlugin::REVISION_STRING.empty() ? "" : String("; ") + COLLADAPlugin::REVISION_STRING);
(COLLADAPlugin::PLUGIN_VERSION_STRING.empty() ? "" : String("; ") + COLLADAPlugin::PLUGIN_VERSION_STRING) +
(COLLADABU::CURRENT_REVISION.empty() ? "" : String("; ") + String("Version: ") + versionMajor + "." + versionMinor) +
(COLLADABU::CURRENT_REVISION.empty() ? "" : String("; ") + String("Revision: ") + COLLADABU::CURRENT_REVISION.substr(foundLast + 1));
//---------------------------------------------------------------
DocumentExporter::DocumentExporter ( Interface * i, const NativeString &filepath, COLLADABU::IDList& xRefExportFileNames, bool exportOnlySelected )
......
......@@ -21,12 +21,8 @@
namespace COLLADAMaya
{
// COLLADA NetAllied Systems
static const char* TRANSLATOR_VENDOR = "NetAllied Systems GmbH";
static const char* TRANSLATOR_VERSION = "1.3.0";
static const String PLUGIN_VERSION_STRING = String(TRANSLATOR_VERSION).empty() ? "" : String("Version: ") + TRANSLATOR_VERSION;
static const String REVISION_STRING = COLLADABU::CURRENT_REVISION.empty() ? "" : String("Revision: ") + COLLADABU::CURRENT_REVISION;
static const char* USERNAME = "USERNAME";
static const char* USER = "USER";
......
......@@ -324,10 +324,16 @@ namespace COLLADAMaya
sourceFileUri.setScheme ( COLLADASW::URI::SCHEME_FILE );
asset.getContributor().mSourceData = sourceFileUri.getURIString();
}
std::size_t foundLast = COLLADABU::CURRENT_REVISION.find_last_of(".");
std::size_t foundFirst = COLLADABU::CURRENT_REVISION.find_first_of(".");
String versionMajor = COLLADABU::CURRENT_REVISION.substr(0, foundFirst);
String versionMinor = COLLADABU::CURRENT_REVISION.substr(foundFirst + 1, foundLast - foundFirst -1 );
asset.getContributor().mAuthoringTool = AUTHORING_TOOL_NAME + MGlobal::mayaVersion().asChar() +
(COLLADAMaya::PLUGIN_VERSION_STRING.empty() ? "" : String("; ") + COLLADAMaya::PLUGIN_VERSION_STRING) +
(COLLADAMaya::REVISION_STRING.empty() ? "" : String("; ") + COLLADAMaya::REVISION_STRING);
asset.getContributor().mAuthoringTool = AUTHORING_TOOL_NAME + MGlobal::mayaVersion().asChar() +
(COLLADABU::CURRENT_REVISION.empty() ? "" : String("; ") + String("Version: ") + versionMajor + "." + versionMinor) +
(COLLADABU::CURRENT_REVISION.empty() ? "" : String("; ") + String("Revision: ") + COLLADABU::CURRENT_REVISION.substr(foundLast + 1));
// comments
MString optstr = MString("\n\t\t\tColladaMaya export options: ")
......
......@@ -83,12 +83,9 @@
std::ostringstream stream;
stream << MAYA_API_VERSION;
COLLADAMaya::String revision ( COLLADAMaya::TRANSLATOR_VERSION );
revision += "." + COLLADABU::CURRENT_REVISION;
MFnPlugin plugin ( obj,
COLLADAMaya::TRANSLATOR_VENDOR,
revision.c_str (),
COLLADABU::CURRENT_REVISION.c_str(),
stream.str ().c_str () );
// --------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册