Either I'm once again blind or it isn't available anywhere, but I can't find any information on how to set and retrieve keys for bone targets (scripting, naturally). If there was a tool that did this I could just examine it, but apparently it's only done via the constraints menu.
Anyone have the syntax? (if this is just as easy as bone.fTarget:SetValue(frame, boneID) I'll be pretty embarassed).
Target Bone keying
Moderators: Víctor Paredes, Belgarath, slowtiger
Re: Target Bone keying
bone.fTargetBone is an AnimVal that contains the ID of the current target bone.
So, this should get you the target bone:
local currentTargetBoneID = bone.fTargetBone.getValue(moho.layerFrame)
local currentTargetBone = skel:Bone(currentTargetBoneID)
Then you can manipulate the target bone's keys as usual.
So, this should get you the target bone:
local currentTargetBoneID = bone.fTargetBone.getValue(moho.layerFrame)
local currentTargetBone = skel:Bone(currentTargetBoneID)
Then you can manipulate the target bone's keys as usual.
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
Re: Target Bone keying
Thanks. I assume I can SetValue the same way, although using both frame and the value:
bone.fTargetBone.setValue(frame, value)
bone.fTargetBone.setValue(frame, value)