Editing Bones Through Lua

Hello,

Simple as the the title, I was wondering if there are any tutorials/examples of editing bones like Bone Editor in Gmod, but through Lua like…setting what bones you want to edit and where to position them, etc.

Any help would be greatly appreciated!

You could just see how “edit bones” property works.

It uses http://wiki.garrysmod.com/page/Entity/ManipulateBonePosition and similar functions. ( By similar I mean they start with ManipulateBone* )

Awesome! And how would I undo the changes made? Like I have a function to manipulate it, but then how do I remove it with the other function I have?

[editline]22nd December 2013[/editline]

Set Vector to 0,0,0 I assume?

[lua]
Player:ManipulateBoneAngles(boneNumber, Angle(0, 0, 0))
Player:ManipulateBonePosition(boneNumber, Vector(0, 0, 0))
[/lua]

Will reset the bones angles/pos

Alright, Thank you so much!

[editline]22nd December 2013[/editline]

Do you think it would be possible to make animations through this? Like…a timer for each bone manipulation? Sort of like frame by frame animation.