gsll Posted March 11, 2017 Posted March 11, 2017 Considering the advances vpoteryaev made with skyrim nif data utils,I would need a script that would automatically, for every bone,insert a keyframe corresponding to all bone constraints along the whole timeline.I think f-curves are the best way to get the information between two keyframes. The script would : - get the properties of the bone : location, scale and rotation - insert a keyframe for all these.The blender API documentation on fcurve doesn't help much.I need some good examples to figure out how it works.I've been looking at f-curves and looking for working examples (blenderstackexchange seems the only resource):- evaluate property at any keyframe 1- evaluate property at any keyframe 2- select a fcurve- get keyframe data- export anim data propertyI have not yet managed to make a working script to retrieve the required values. Does anyone could provide a tip or a link toward working script ? Best regards
Tweens Posted March 11, 2017 Posted March 11, 2017 If you are wanting to bake the keys, Blender already does that. In Pose Mode, go to: Pose->Animation->Bake Action. Select: Only Selected, Visual Keying, and Clear Constraints. Blender will then key all bones relative to the constraints used. This can then be exported. ETA: Be sure to select all bones (keyboard shortcut A) before baking.
gsll Posted March 11, 2017 Author Posted March 11, 2017 Thank you. It works better with all bones selected.
vpoteryaev Posted March 13, 2017 Posted March 13, 2017 If you are wanting to bake the keys, Blender already does that. In Pose Mode, go to: Pose->Animation->Bake Action. Select: Only Selected, Visual Keying, and Clear Constraints. Blender will then key all bones relative to the constraints used. This can then be exported. ETA: Be sure to select all bones (keyboard shortcut A) before baking. Thank you. It works better with all bones selected. Sorry, at current stage of 'utils' development this method gives nothing at output except error message. Because: 1. Action name must start with 'skeleton'. Easy to fix - I will remove 'assert' statement that check this requirenment. 2. Baking adds scaling parts to keyframes that not supported at that moment. 3. Baking doesn't create exactly 'LocRot' frames, but sometimes only 'Location', sometimes 'Rotation' I'll try to update scripts before weekend. Kind Regards. ADDED: quick fix in post.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.