About This File
This is a small SKSE plugin that I needed in order to rotate skeleton bones programatically.
Â
I think there was no way to do this using existing Papyrus functions. Maybe because rotating specific bones it's not that useful.
Â
There is the limitation that bones must not be affected by animations / Havok / HDT or the rotation you set is overwritten by the other animation systems. I'm using this with the dummy CME bones from XP32 Maximum Skeleton Extended version 2.06.
Â
The SKSE plugin adds a new Papyrus script (SkeletonUtils.pex) that provides these funcions:
float Function GetNodeRotationX(ObjectReference ref, string node, bool firstPerson) native globalfloat Function GetNodeRotationY(ObjectReference ref, string node, bool firstPerson) native globalfloat Function GetNodeRotationZ(ObjectReference ref, string node, bool firstPerson) native global; examples:; SkeletonUtils.SetNodeRotationX(Game.GetPlayer(), "CME Genitals03 [Gen03]", -45.0, false); SkeletonUtils.SetNodeRotationZ(Game.GetPlayer(), "CME Genitals03 [Gen03]", 45.0, false)Function SetNodeRotationX(ObjectReference ref, string node, float x, bool firstPerson) native globalFunction SetNodeRotationY(ObjectReference ref, string node, float y, bool firstPerson) native globalFunction SetNodeRotationZ(ObjectReference ref, string node, float z, bool firstPerson) native global; this is like calling the 3 previous functionsFunction SetNodeRotation(ObjectReference ref, string node, float x, float y, float z, bool firstPerson) native global
Requires SKSE 1.07.01 or higher.
The C++ source files are in the archive if you want to take a look.