This is a utility module to make it a little easier to interact with FbxScenes and objects. It offers high level functionality to tasks which are common place when working with the Fbx SDK.
This module assumes you already have the standard fbx module - which is available from here:
https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2019-0
Alternatively, there is a pre-compiled version that works with Maya 2026 within this repository.
This module is particularly useful if you're exporting an fbx out of an application such as Maya, Blender or 3dsmax. Instead of modifying the users scene we can instead do a greedy export and then use the fbx sdk to clean the fbx. This way we're not being destructive to the users environment.
import fbxtra
fbx_path = "your path to an fbx file"
# -- Load the fbx file
fbx_scene = fbxtra.files.load(fbx_path)
# -- Remove namespaces
fbxtra.scene.clear_namespaces(fbx_scene)
# -- Get the skeleton root and make it a child of the scene root
skeletal_root_name = "RootBone"
fbx_skeletal_root = fbxtra.scene.get(fbx_scene, name=skeletal_root_name)
fbxtra.node.set_parent(fbx_skeletal_root, parent=None)
# -- Remove all items that are not part of the skeleton
fbxtra.scene.clear(fbx_scene, excluding=[fbx_skeletal_root])
# -- Remove animation on the skeletal root (much like removing
# -- root motion)
fbxtra.animation.remove_tr_keys(
fbx_skeletal_root,
zero=True,
)
# -- Ensure the time frame is specifically set in the fbx file
fbxtra.animation.set_time_range(
fbx_scene,
start_frame=10,
end_frame=100,
)
# -- Name the take according to the file name, removing the
# -- suffix
fbxtra.animation.set_current_take_name(
fbx_scene,
"example_take",
)
# -- Finally, save the fbx file
fbxtra.files.save(fbx_scene, fbx_path)
You can also use fbxtra to quickly get access to things like document properties in order to look up where an fbx was exported from:
import fbxtra
# -- Load the fbx
path = r"path to your fbx file"
scene = fbxtra.files.load(path)
# -- If the fbx was exported from maya then this would return the
# -- .ma or .mb file it was exported from for instance.
filepath_exported_from = fbxtra.document.get_property(scene, "ApplicationNativeFile")
print(filepath_exported_from)
Finally, here is an example of easily traversing and interacting with the scene
import fbxtra
# -- Load the fbx
path = r"your fbx file path"
scene = fbxtra.files.load(path)
# -- Read the root nodes and then the first children
for node in fbxtra.scene.get_top_level(scene):
node_name = node.GetName()
children = [
child.GetName()
for child in fbxtra.node.get_children(node)
]
print(f"{node_name} : {children}")
# -- We can also easily get all the nodes in the scene
for node in fbxtra.scene.get_all(scene):
print(node.GetName())
Metadata
Release files for fbxtra 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fbxtra-1.3.1.tar.gz | 25.4 kB | Without provenance | Details for fbxtra-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fbxtra-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for fbxtra-1.3.1-py3-none-any.whl |
Total release size: 53.5 kB
Release files / fbxtra-1.3.1.tar.gz
| Download URL | fbxtra-1.3.1.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
447189a26fd5a2f28abd1f41e39a3e2f151cc478ce1b797a566d9ebb68bebba0
|
|
BLAKE2b-256 checksum How to use checksums |
aa0cf01012d62215258ae95bcd42782aa6a732f52a0798e2cea185e0f7f1692d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / fbxtra-1.3.1-py3-none-any.whl
| Download URL | fbxtra-1.3.1-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e971f523079ab744a16477925c0a48f7b2af00e33102912d2f164fc3e1f0bfc0
|
|
BLAKE2b-256 checksum How to use checksums |
36743d6faae3158653b9a3b8998197f2db49401b57f1a557123e97b12f05088e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for fbxtra 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.