31 Commits

Author SHA1 Message Date
Campbell Barton
50258d55e7 Cleanup: remove debug prints in py.ops.nla.bake() 2020-06-09 17:57:50 +10:00
Sybren A. Stüvel
ded7af53b4 Fix T74889 Baking to current action doesn't work properly
Before this commit, baking an action would only insert keys that are
necessary (i.e. using `INSERTKEY_NEEDED`). When baking to the current
Action, if there are no constraints that influence the final animation,
there are no additional keys necessary. This makes it appear as if
nothing happened. However, when baking to a new Action every additional
frame is necessary and thus a key is added for every frame.

@mont29 and I agreed that this behaviour is confusing, so this commit
changes the behaviour such that baking to the current action and to a
new action result in the same baked animation (that is, keyed on every
frame).
2020-04-06 13:39:46 +02:00
Alexander Gavrilov
d5c963bbc3 Fix T69105: reset the action blend mode to Replace in Bake Action.
This can't be done in Tweak mode since the setting is stored in the
tweaked strip, and the logic for finding it is not exposed to python.
2020-01-14 16:13:06 +03:00
Alexander Gavrilov
283d76932a Fix T57159: don't exit tweak mode in Bake Action if reusing the action. 2020-01-14 16:13:06 +03:00
Campbell Barton
9467c0dcf9 Fix T71924: Baking quaternion keyframes gives discontinuous values 2019-11-27 02:00:14 +11:00
Philipp Oeser
dfbbc5067e Fix T64733: Error baking action
scene.update() needs to be replaced with view_layer.update() after
rBe693918d4074

note: will go over other occurances of scene.update() in a different
commit
2019-05-17 10:45:30 +02:00
Lucas Veber
ffb3226d27 Fix T64308: bake animation not working after recent bendy bone changes
Differential Revision: https://developer.blender.org/D4820
2019-05-09 11:18:16 +02:00
Dalai Felinto
caf89c3de1 Fix Object > Animation > Bake Action 2019-02-14 13:54:15 +00:00
Campbell Barton
a44ac44c1e Fix anim_utils.bake_action typo
D4172 by @rcorre
2019-01-10 13:11:48 +11:00
Bastien Montagne
e9ffe93350 Fix T56766: Bake Action Visual Keying Not Working.
Consequences of new requirement to use named keywords parameters for our
RNA API... Hopefully fixed all other cases in that file as well, but
guess we'll find more of those in comming weeks. :|
2018-09-12 11:52:06 +02:00
Campbell Barton
b66aa0b0a6 Cleanup: pep8 2018-07-03 06:48:44 +02:00
Joshua Leung
fc77676f33 Bake Action operator: Added missing Bendy Bones support 2017-11-20 01:57:21 +13:00
Campbell Barton
bd1f946413 Recent action-bake used Py3.6 syntax 2017-09-14 17:04:41 +10:00
Campbell Barton
6d2cd1719b Bake Action: operate on selected objects
Previously only the active object was used.

Use coroutines to support baking frames for multiple objects at once,
without having to playback the animation multiple times.
2017-09-10 17:16:47 +10:00
Campbell Barton
a4a59d578c PyAPI: Add object argument to bake_action
Avoids having to set the scene's active object first.
2017-09-10 14:30:03 +10:00
Bastien Montagne
b06584dbf8 Fix T49349: Baking action doesnt bake multiple objects.
Tooltip was wrong here, it can only bake a single (active) object, 'only selected' option
is for pose bones only...
2016-09-16 11:50:49 +02:00
Kévin Dietrich
f283aa61c5 Fix T48397: Can not bake tweaked NLA
We need to leave tweak mode before trying to modifiy the action as doing
so will leave Blender in a semi-corrupted state.

Reviewers: #animation

Reviewed by: aligorith

Maniphest Tasks: T48397

Differential Revision: https://developer.blender.org/D2119
2016-07-24 03:18:40 +02:00
Campbell Barton
946b850b3e Fix T46040: Bake action cleans existing keyframes 2015-09-08 04:01:03 +10:00
Campbell Barton
652b2b656a Fix bake action visual-keying option
Disabling did nothing
2015-02-17 07:19:48 +11:00
Bastien Montagne
2d4980e68e Fix T42510: bake animation wrong result.
Caused by own rBfb7ff31315a1c9 - not surprising code using Object.matrix_local
in other contexts than mere Object parenting fails, since it was using a broken
implementation before...

Note that whole NLA_OT_Bake op would need some love, it is quite brittle in many aspects.
2015-02-03 15:44:20 +01:00
Campbell Barton
7132bfe664 fix [#35977] Bake Action doesn't work properly
there are cases where you want to use visual-keying but not remove constraints, also it wasnt obvious that clearing constraints used a different method of keyframing.
So split these into 2 options.
2013-07-04 23:52:02 +00:00
Campbell Barton
577a1b9239 fix [#34805] Bake action ignores parent motion
in fact this is more feature request.
add an option to bake a parented objects animation, then clear the parent and apply the action.
2013-04-11 08:42:25 +00:00
Campbell Barton
8e3d590b76 code cleanup: python/pep8 and double-promotion warnings. 2013-03-28 19:33:14 +00:00
Joshua Leung
53de752858 Bugfix [#33946] Bake Action fails in SVN for Objects
The problems here were caused by a cleanup commit (r. 53369).
BTW, the code here is pretty convoluted mess.
2013-01-21 02:40:51 +00:00
Bastien Montagne
c587c985e8 Fix [#33424] Inadequate bake action.
bake_action tries to make kind of a 'visual keying'... On one side, this is rather stupid when you keep constraints (in this case, keying actual loc/rot/scale transforms, i.e. matrix_basis, is enough, doing more would lead to unexpected behavior with some constraints). On the other one, making a good visual keying of bones is *really* tricky, so now using the new object's convert_space() func to compute that (when the user chooses to remove the constraints).

Incidentally, this greatly simplifies the code of bake_action!
2012-12-28 13:34:19 +00:00
Campbell Barton
71d1b09708 minor code cleanup 2012-08-25 12:55:14 +00:00
Campbell Barton
179ac9ebc0 baking actions with euler rotations now uses compatible eulers for pose and object bakes. 2012-08-25 12:37:15 +00:00
Campbell Barton
1f74789d12 Correct mathutils documentation, also correct some python spelling errors and add makefile target check_spelling 2012-02-08 04:37:37 +00:00
Campbell Barton
fda2045150 correct spelling errors in comments 2011-10-17 06:58:07 +00:00
Campbell Barton
8a423f59ea pep8 cleanup and fix for keymap test operator from my own recent fix. 2011-09-26 15:39:15 +00:00
Campbell Barton
458b920abb remove bl_operators/nla.py, move bake_action function into bpy_extras.anim_utils and bake operator into bl_operators/anim.py 2011-09-22 22:51:54 +00:00