Converter.source.fbx namespace

Converter.source.fbx.FbxBuilder module

Build FBX files

Converter.source.fbx.FbxBuilder.CreateFBX(width: float, height: float, depth: float, name: str, front: str = '', back: str = '', left: str = '', right: str = '', top: str = '', bottom: str = '', outputPath='C:\\Users\\trios\\Documents\\GitHub\\OGrEE-Tools-AR\\Converter\\output\\OGrEE\\fbx') str

Build an FBX file containing a box mesh with up to six textured faces

Parameters:
  • width (float) – The width of the model (cm)

  • height (float) – The height of the model (cm)

  • depth (float) – The depth of the model (cm)

  • name (str) – the name given to the FBX file

  • front (str) – the path to the picture of the front face

  • back (str) – the path to the picture of the back face

  • left (str) – the path to the picture of the left face

  • right (str) – the path to the picture of the right face

  • top (str) – the path to the picture of the top face

  • bottom (str) – the path to the picture of the bottom face

Returns:

return the path to the newly created FBX file

Return type:

str

Converter.source.fbx.FbxBuilder.CreateMaterial(manager: FbxManager, name: str, texturePath: str) FbxSurfacePhong

Create a SurfacePhong material from a picture

Parameters:
  • manager (fbx.FbxManager) – the manager of the scene

  • name (str) – name of the material (can be empty)

  • texturePath (str) – path to the picture

Returns:

a SurfacePhong material with correct emissive, diffuse, ambient and specular colors, transpacy factor, shininess and shading model

Return type:

fbx.FbxSurfacePhong

Converter.source.fbx.FbxBuilder.CreateTexture(manager: FbxManager, texturePath: str) FbxFileTexture

Create a texture from a picture

Parameters:
  • manager (fbx.FbxManager) – the manager of the scene

  • texturePath (str) – path to the picture

Returns:

the texture with correct mapping, texture and UV

Return type:

fbx.FbxFileTexture

Converter.source.fbx.FbxBuilder.addCube(manager: FbxManager, scene: FbxScene, cubeName: str, cubeScale: tuple[float, float, float] = (1.0, 1.0, 1.0)) FbxMesh

Add a cube to a scene

Parameters:
  • manager (fbx.FbxManager) – the manager of the scene

  • scene (fbx.FbxScene) – the scene containing the cube

  • cubeName (str) – the name of the cubemesh

  • cubeScale (tuple[float, float, float], optional) – the dimensions of the cube, defaults to (1.0, 1.0, 1.0)

Returns:

the mesh containing the cube

Return type:

fbx.FbxMesh

Converter.source.fbx.FbxBuilder.makeCube(manager: FbxManager) FbxMesh

Make a simple cube

Parameters:

manager (fbx.FbxManager) – Manager containing the cube

Returns:

the cubemesh with correct control points, vertices and normals

Return type:

fbx.FbxMesh