mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-15 01:43:25 +00:00
Add axis system option.
This commit is contained in:
parent
a28531d834
commit
f741ade168
3 changed files with 20 additions and 8 deletions
|
|
@ -219,6 +219,7 @@ void model::printFbx(const std::string &fn) const
|
||||||
// Prepare the FBX SDK.
|
// Prepare the FBX SDK.
|
||||||
InitializeSdkObjects(lSdkManager, lScene);
|
InitializeSdkObjects(lSdkManager, lScene);
|
||||||
|
|
||||||
|
// default is ???
|
||||||
//FbxAxisSystem::MayaZUp.ConvertScene(lScene);
|
//FbxAxisSystem::MayaZUp.ConvertScene(lScene);
|
||||||
|
|
||||||
// Create the scene.
|
// Create the scene.
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ bool silent = false;
|
||||||
bool printMaxPolygonBlock = false;
|
bool printMaxPolygonBlock = false;
|
||||||
|
|
||||||
cl::opt<path> p(cl::Positional, cl::desc("<MOD_ file or directory with MOD_ files>"), cl::value_desc("file or directory"), cl::Required);
|
cl::opt<path> p(cl::Positional, cl::desc("<MOD_ file or directory with MOD_ files>"), cl::value_desc("file or directory"), cl::Required);
|
||||||
cl::opt<bool> all_formats("a", cl::desc("All formats"));
|
cl::opt<bool> all_formats("af", cl::desc("All formats"));
|
||||||
|
|
||||||
yaml root;
|
yaml root;
|
||||||
cl::opt<bool> stats("i", cl::desc("Gather information from (models)"));
|
cl::opt<bool> stats("i", cl::desc("Gather information from (models)"));
|
||||||
|
|
|
||||||
|
|
@ -84,21 +84,32 @@ std::string translate(const std::string &s)
|
||||||
return s3;
|
return s3;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class AxisSystem
|
enum AxisSystem
|
||||||
{
|
{
|
||||||
MayaYUpZFrontRH,
|
MayaYUpZFrontRH,
|
||||||
|
Windows3dViewer = MayaYUpZFrontRH,
|
||||||
|
|
||||||
AIM,
|
AIM,
|
||||||
UE4 = AIM,
|
UE4 = AIM, // Do not use 'Convert scene' during UE4 import!
|
||||||
|
|
||||||
|
ax_aim = AIM,
|
||||||
|
ax_ue4,
|
||||||
|
ax_maya_y = MayaYUpZFrontRH,
|
||||||
|
ax_win_3d_viewer,
|
||||||
};
|
};
|
||||||
|
|
||||||
AxisSystem AS = AxisSystem::AIM;
|
cl::opt<AxisSystem> AS(cl::desc("Choose axis system:"),
|
||||||
|
cl::values(
|
||||||
|
clEnumVal(ax_ue4, "Original AIM or UE4 axis system"),
|
||||||
|
clEnumVal(ax_maya_y, "Default MAYA Y-Up Z-Front or Windows 3d Viewer axis system")
|
||||||
|
)
|
||||||
|
, cl::init(AxisSystem::UE4)
|
||||||
|
);
|
||||||
|
|
||||||
int get_x_coordinate_id()
|
int get_x_coordinate_id()
|
||||||
{
|
{
|
||||||
switch (AS)
|
switch (AS)
|
||||||
{
|
{
|
||||||
case AxisSystem::MayaYUpZFrontRH:
|
|
||||||
return 0;
|
|
||||||
case AxisSystem::AIM:
|
case AxisSystem::AIM:
|
||||||
return 1;
|
return 1;
|
||||||
default:
|
default:
|
||||||
|
|
@ -131,13 +142,13 @@ void aim_vector3<T>::load(const buffer &b)
|
||||||
switch (AS)
|
switch (AS)
|
||||||
{
|
{
|
||||||
case AxisSystem::MayaYUpZFrontRH:
|
case AxisSystem::MayaYUpZFrontRH:
|
||||||
// MAYA Y UP, Z FRONT (RH)
|
// Y UP, Z FRONT (RH)
|
||||||
READ(b, base::x);
|
READ(b, base::x);
|
||||||
READ(b, base::z);
|
READ(b, base::z);
|
||||||
READ(b, base::y);
|
READ(b, base::y);
|
||||||
break;
|
break;
|
||||||
case AxisSystem::AIM:
|
case AxisSystem::AIM:
|
||||||
// AIM viewer, UE4, Z UP (LH)
|
// Z UP, X FRONT (LH)
|
||||||
READ(b, base::y);
|
READ(b, base::y);
|
||||||
READ(b, base::x);
|
READ(b, base::x);
|
||||||
READ(b, base::z);
|
READ(b, base::z);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue