Skip to content

Commit

Permalink
make sure animation sequence import correct in fbx animation as unrea…
Browse files Browse the repository at this point in the history
…l fixed the incorrect rot x issue
  • Loading branch information
moonyuet committed Jan 22, 2025
1 parent 9bd3bfc commit 8fe7e1a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions client/ayon_unreal/plugins/load/load_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
from ayon_core.pipeline import (AYON_CONTAINER_ID, get_current_project_name,
get_representation_path, load_container,
discover_loader_plugins,
loaders_from_representation)
loaders_from_representation,
UNREAL_VERSION)
from ayon_core.pipeline.context_tools import get_current_folder_entity
from ayon_core.pipeline.load import LoadError
from ayon_unreal.api import pipeline as unreal_pipeline
Expand Down Expand Up @@ -124,8 +125,11 @@ def _import_animation(
'convert_scene', True)
task.options.anim_sequence_import_data.set_editor_property(
'force_front_x_axis', False)
task.options.anim_sequence_import_data.set_editor_property(
'import_rotation', unreal.Rotator(roll=90.0, pitch=0.0, yaw=0.0))
if UNREAL_VERSION.major == 5 and UNREAL_VERSION.minor <=4 :
task.options.anim_sequence_import_data.set_editor_property(
'import_rotation',
unreal.Rotator(roll=90.0, pitch=0.0, yaw=0.0)
)

unreal.AssetToolsHelpers.get_asset_tools().import_asset_tasks([task])

Expand Down

0 comments on commit 8fe7e1a

Please sign in to comment.