21 lines
798 B
Python
21 lines
798 B
Python
import json
|
|
import os
|
|
|
|
import unreal
|
|
|
|
|
|
REPORT_PATH = os.path.join(unreal.Paths.project_dir(), "VehicleExports", "unreal_anim_pose_api_report.json")
|
|
mesh = unreal.load_asset("/Game/MrPlow/Vehicles/Kamaz/SK_Kamaz_Chassis.SK_Kamaz_Chassis")
|
|
skeleton = mesh.get_editor_property("skeleton")
|
|
pose = skeleton.get_reference_pose()
|
|
|
|
report = {
|
|
"poseClass": pose.get_class().get_name() if hasattr(pose, "get_class") else type(pose).__name__,
|
|
"poseMethods": [name for name in dir(pose) if "bone" in name.lower() or "transform" in name.lower() or "pose" in name.lower() or "name" in name.lower()],
|
|
}
|
|
|
|
os.makedirs(os.path.dirname(REPORT_PATH), exist_ok=True)
|
|
with open(REPORT_PATH, "w", encoding="utf-8") as report_file:
|
|
json.dump(report, report_file, indent=2)
|
|
|
|
print(json.dumps(report, indent=2))
|