Commit Graph

46 Commits

Author SHA1 Message Date
Campbell Barton
2790740813 Cleanup: spelling 2019-08-17 00:57:05 +10:00
Campbell Barton
fc37238b17 Cleanup: unused args/vars/imports in bl_operators 2019-05-09 12:42:05 +10:00
Joshua Leung
3804636ee5 Fix: Better fix for KeyingSet "Export to File" and unescaped characters
Use Python's native raw formatting instead, which should take care of any issues
we may face.
2019-03-02 02:30:31 +13:00
Joshua Leung
49618b0e18 Fix: Ensure that KeyingSet.bl_description field is properly escaped when using the Export to File operator
Previously, if double-quotes appeared in the KeyingSet.bl_description field,
these would cause a syntax error in the resulting .py script export of the
KeyingSet. Since single quotes are even more likely to appear
(e.g. as apostrophes), we now use triple quotes here.

Unreported bug, noticed earlier when investigating T61010.
2019-02-05 16:21:35 +13:00
Dalai Felinto
39ad5c3ef1 Rename BakeAction > NLA_OT_bake
This was already the bl_idname anyways.

Now this seems to be working, for single and multi-pose.
That said, the operator seems to fail on redo.
2018-10-19 16:35:09 -03:00
Campbell Barton
09aa799e53 PyAPI: Use annotations for RNA definitions
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.

Properties using regular assignments will print a warning and load,
however the order is undefined.
2018-07-11 22:18:09 +02:00
74fd17e9d7 UI/Python: rename Lamps to Lights, to follow more standard terminology.
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
2018-07-06 20:06:09 +02:00
Campbell Barton
532c8ac583 Cleanup: pep8 function indentation 2018-06-26 19:58:56 +02: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
Joshua Leung
743bacaa6f Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
2017-08-18 01:03:28 +12:00
Campbell Barton
0b55b8cc6a Cleanup: triple quotes for docstrings 2017-04-14 20:01:43 +10:00
Campbell Barton
fa11d41113 Cleanup: especially non pep8 parts of Py UI 2017-03-20 09:49:35 +11:00
Campbell Barton
9bdda427e6 PyAPI: remove bpy.utils.register_module()
In preparation for it being removed, see: T47811
2017-03-18 20:03:24 +11: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
Joshua Leung
028c67c81e Fix T44453: Exporting Keying Sets referencing node tree properties generates invalid Python code/paths
The problem is that node trees (such as the Material, Lamp, and Compositor node trees)
are stored as "nested node trees" on the affected datablocks. They are particularly
troublesome to deal with, as the are not easily identified, and also cannot be easily
mapped back to the ID's which actually own them. As a result, the usual automated
methods do not work when dealing with these!
2016-02-20 17:55:11 +13:00
Campbell Barton
89b6c72f8d Cleanup: python 2015-05-26 23:53:47 +10:00
Bastien Montagne
6973e26bf9 Fix T44036: Add option to bake into current action instead of creating a new one.
This is needed when you want to bake only part of an armature's bones, since they
all share a single action, otherwise you'd lose non-baked bones' animation...
2015-05-26 15:32:06 +02:00
Campbell Barton
e17c6f79a5 cleanup: py imports 2015-01-28 16:50:51 +11:00
Joshua Leung
8db4a24e4e Bugfix T43343: Buttons for Keyframing Settings are Mutually Exclusive
Since 1c3f2354f83b3e79dee31d837ca4d7c08d2c3f26 the keyframing settings on
Keying Sets have been incorrectly displayed as a clump of toggle buttons,
which are usually only used when only one of the options apply.

Reverting this back to how it was, while leaving bl_options in place still for
the one case where it makes sense to do it that way (i.e. for KeyingSetInfo)
2015-01-26 19:19:33 +13:00
Campbell Barton
3e8c0027a3 Cleanup: replace deprecated imp -> importlib 2015-01-23 12:37:58 +11:00
Campbell Barton
0e0e528ea4 Cleanup: pep8 2014-09-17 18:36:17 +10:00
Campbell Barton
c829c71c57 use C style string formatting 2014-05-22 01:12:40 +10:00
Bastien Montagne
195df5a034 Fix some dummy formating issue (breacks i18n message processing). 2014-05-01 16:30:40 +02:00
Bastien Montagne
c089150426 Fix T39806: Koro rig (Caminandes) wrong in master, worked in 270(a).
Edit existing animsys_refactor module to make able to execute more complex conversions
('to' can now be a callback, instead of a simple prop name), and add a new
Update Animated Transform Constraints operator that uses it to handle complex
conversion for this constraint (drived or animated properties).

Note this operator has to be called manually (from 'space' menu), will make this clear
in release notes.

Also, similar changes made in 2.70 are *not* addressed by this script (would rather wrote
new operators as/if need arise, but Transform constraint looks much more sensible that the others).

This op should not remain in more than two or three releases anyway, imho.
2014-04-28 13:26:01 +02:00
Campbell Barton
1ea47c9af9 Code Cleanup: style, spelling and pep8 edits 2013-11-20 03:40:10 +11:00
Thomas Dinges
28bd03d9b5 Code cleanup:
* Remove "FCurve/Driver Version fix" from help menu, was used for RNA changes during 2.5x. 
* Keep utility code in animsys_refactor.py, might still become useful according to Joshua.
2013-11-05 08:52:12 +00: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
2085a42e52 pep8 cleanup 2013-06-27 03:05:19 +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
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
9fa36b12cc style cleanup: pep8 2012-10-08 08:28:05 +00:00
Campbell Barton
78d6288be3 correct spelling error in operator property 2012-10-02 13:13:26 +00:00
Campbell Barton
98e6912480 style cleanup 2012-06-19 22:17:19 +00:00
Campbell Barton
3bb4814194 initialize bake action vars from context 2012-05-26 00:46:12 +00:00
Bastien Montagne
a80b7d6129 Fixing several issues with keyingsets:
*Add a new idname to keyingsets, keeping name as label-only (using same string for both made lookup fail when using i18n other than english, as it tried to compare an untranslated static string id against a translated RNA name). Also adding a description string (can be helpful with custom keyingsets, imho).
*Fixed a few other bugs related to that area (namely, you can’t deselect current keyingset from the shift-ctrl-alt-I popup menu, and insert/delete key ops were using a rather strange way to get chosen custom keyingset…).
*Fixed UI code so that it always uses (RNA) enum, and simplified menu-creation code.
2012-03-08 14:04:06 +00:00
Campbell Barton
0d29b5c3df add bake action into animation menu - this nifty operator wasn't available anywhere in the UI. 2012-02-08 14:01:47 +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
77bdef4d22 py scripts - replace bad uses of len(),
checking if the collection is True is faster since it only checks if it has at least one item, rather then going over all items.
2012-01-02 16:18:39 +00:00
Campbell Barton
5600cf9dd9 not all filepaths had the FILE_PATH subtype, this means using non utf8 paths would give errors. 2011-12-11 21:23:29 +00:00
Bastien Montagne
daf51fe6cd A big set of UI messages fixes and tweaks! No functional changes. 2011-10-20 07:56:04 +00:00
Campbell Barton
fda2045150 correct spelling errors in comments 2011-10-17 06:58:07 +00:00
Campbell Barton
c658442c65 - move animsys update operator into the anim.py
- move the data into animsys_refactor.py module so its not loaded on blender start.
2011-09-23 17:38:52 +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
Guillermo S. Romero
ea32492dd5 SVN maintenance. 2011-09-22 20:37:22 +00:00
Thomas Dinges
e17ee1b415 2.6 Python UI files:
* Moved Operators from bl_ui into bl_operators.
* Renamed HELP_OT_operator_cheat_sheet to WM_OT_operator_cheat_sheet.
2011-09-22 19:50:41 +00:00