Skip to content

[Request] Create a Interpret function for UpVector, FrontVector and CoordSystem #113

@alsed

Description

@alsed

EDIT:
The first time I posted this I assumed that the fbx files could have axis system on the domain 0-2 or 1-3.
I was mistaken, the axis data for every fbx is in between 0-2.
But even if this is not a problem, a clear distinction between semantic data and raw data is useful.

--

Currently there is a problem with the parse of UpVector, since FBX scenes can be defined by the 0-2 domain, implemented by Blender or the original 1-3 defined by the Autodesk SDK.
parsed by a 0-2 domain (implemented by Blender) or the original 1-3 definition by the original SDK.

The problem lies in combining the raw data from the axes with the semantic interpretation of that data:
UpAxis is not the same as UpVector.
FrontAxis is not the same as FrontVector (which is actually a base parity).
And CoordAxis is definitely not the same as CoordSystem.

if GlobalSettings just copy the raw data, then UpVector, FrontVector y CoordSystem could be constructed elsewhere:

// everything is an int
		get_property("UpAxis", UpAxis, int, toInt);
		get_property("UpAxisSign", UpAxisSign, int, toInt);
		get_property("FrontAxis", FrontAxis, int, toInt);
		get_property("FrontAxisSign", FrontAxisSign, int, toInt);
		get_property("CoordAxis", CoordAxis, int, toInt);
		get_property("CoordAxisSign", CoordAxisSign, int, toInt);

// the same change in the GlobalSettings constructor

A solution for this is to create a new function, (e.g. "InterpretAxisSystem"), that takes the raw axis data and construct the axis system.

Then, the problem with UpVector domain being 0-2 like in Blender, or 1-3 in the SDK, should be easily solved:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions