Commit Graph

1247 Commits

Author SHA1 Message Date
eb10cda135 Fix T40653: Modified keymap: MMB not behaving like RMB?
Modal frame_change was not terminating on mmb release event...
2014-08-18 16:37:01 +02:00
a3fac84c73 Cleanup: indentation 2014-08-05 13:36:35 +10:00
b64e36d26d BLI_listbase: consistent name prefix 2014-07-30 15:01:16 +10:00
976526559d Fix T41228: Selection of bones bug.
Turns out to be mostly some cleanup in Pose select code, got rid of magic numbers
(now understand usual SEL_xxx enums) in ED_pose_deselectall(), which was renamed
to ED_pose_de_selectall, and have a new bool parameter to ignore visibility status
in its process (was the root of the reported issue).

Also factorized slightly "(de)select all" code. Yet this area could use much more
cleanup probably...
2014-07-29 15:02:28 +02:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
19f89a083f Fix for invalid memory access in graph editor when deleting the last
vertex in a fcurve.
2014-07-10 13:03:05 +02:00
4bc62b31af Fix for RNA_int/enum mixup 2014-07-07 06:46:57 +10:00
145998c776 Code cleanup
- Fixed incorrect section heading
- Missed one place where short was still used when the specific enum type would be
  more appropriate
2014-07-06 19:35:24 +12:00
a4c4145800 NLA/AnimEditors: Added operator to remove all "empty" AnimData blocks
It is sometimes possible to end up with a lot of datablocks which have old + unused
"AnimData" containers still attached. This most commonly happens when doing motion
graphics work (i.e. when some linked-in objects may have previously been used to develop
a set of reusable assets), and is particularly distracting in the NLA Editor.

This commit adds an operator which removes AnimData blocks (restricted to only those
which are visible in the animation editor where it is run from) which are "empty"
(i.e. that is, have no active action, drivers, and nla tracks or strips).

This operator can be found from the "Edit" menu in the NLA Editor. Although it also
works when run from the DopeSheet or Graph Editors, it is of less use there since
those won't show these empty AnimData blocks by default (since by definition, such
AnimData blocks necesarily have no keyframes or drivers that can be shown), hence
there will be no feedback if the operator fails or succeeds.
2014-07-06 19:35:24 +12:00
b4b5d9c24e Style cleanup 2014-07-05 05:26:32 +10:00
cadf77d5ef Fix T40862: numinput transform did not take into account scale_length. 2014-06-30 10:57:39 +02:00
0bc94f8c7d Code Cleanup - Using the enum types in more API signatures instead of relying on coders to do the right thing 2014-06-24 22:01:06 +12:00
95b39acdb1 Code Cleanup - Replacing shorts with bools and enum types 2014-06-24 22:01:05 +12:00
9ca0c7eea3 Ctrl-F now activates the filter-by-name functionality for Animation Editors 2014-06-24 17:53:13 +12:00
afaf6e8d71 Improve doxygen comment to include some type info to make it more useful 2014-06-24 17:53:12 +12:00
179e7eaf39 Bugfix for Elastic and Back easing types
** TO BE PORTED BACK TO 2.71 **

As pointed out by Thomas Beck (plasmasolutions), the current behaviour and/or
default values for their parameters didn't quite make sense:

1) Back Easing - The old default value of 0.0 results in some overshoot being applied,
while trying to tweak it up or down resulted in some odd jumps and discontinities.

I've ended up removing some code here which forcibly using a "back" value of 1.7
when users wanted 0.0 instead. There doesn't seem to be any good reason for this.
To ensure that there is still an effect initially, keyframes now get created
with back set to 1.7


2) Elastic Easing - The old default settings of <amplitude = 0, period = 0> resulted
in a curve without any elastic bounce, which wasn't very useful for motion graphics.

Now, default values of amplitude = 0.8 and period = 4.1 get set. These were hand picked
by Thomas to work well when the duration of the motion is 10 frames long (i.e. the
typical length of such effects when doing motion graphics).
2014-06-20 01:34:35 +12:00
f161695150 Style cleanups here 2014-06-20 01:34:34 +12:00
8e722b0232 Feature Request T40643: Animation channels can be renamed by double-clicking on them too 2014-06-16 21:46:02 +12:00
365ff66987 GSet, GHash: Add BLI_gset_add, since its common to add members to a set
also rename BLI_edgeset_reinsert -> BLI_edgeset_add, in this case its the same.
2014-06-14 00:47:12 +10:00
e3b47c1e03 Code cleanup: BLI_strdupn -> BLI_strdup 2014-06-14 00:47:10 +10:00
4bd2609cd0 Quiet assert in debug mode, deleting mask/gpencil keys 2014-06-09 21:06:44 +10:00
ae4ed68dfe Code cleanup: style 2014-06-06 07:54:05 +10:00
9c9fc626b7 Comments: Note direction in doxy args 2014-05-29 22:05:07 +10:00
6c721a86ff Cleanup: Use doxy for more structured comments 2014-05-29 21:17:48 +10:00
6ce67a8eab For increased type safety, ANIM_animdata_filter() now specifies the enums its arguments can use
Hopefully this should help prevent bugs lik T40304 from occurring again.
2014-05-22 15:46:51 +12:00
6f99699d7d Previous commit uncovered another bug - Ungrouped FCurves couldn't be rearranged still
This was because to the filtering code, those FCurves still weren't in any
groups, and so couldn't be visible (since a temporary group is created to
house them). As a result, the visible-channels list would be empty, causing
all hidden FCurves to be treated as hidden.
2014-05-22 15:37:32 +12:00
9e76f13e6b Fix T40304: Rearranging NLA Tracks (and actually, all animation channels) didn't work anymore
These were broken by 1f3655d224, since
an argument of the wrong type was getting passed to ANIM_animdata_filter(),
resulting in no channels ever being picked up for the "visible channels" list.
2014-05-22 15:25:54 +12:00
5bb615c41e Bugfix T40292: Trying to rename shapekey datablocks from AnimEditors renamed object instead 2014-05-22 14:10:39 +12:00
193e77cc67 Fix T40201: Keyframe edits fail to update the viewport 2014-05-19 00:24:45 +10:00
3c3fa29f23 Fix FCurve mirror ignoring aligned/free handles 2014-05-14 13:53:47 +10:00
53efee6754 Fix T40187: Can't set single keyframe handle as Vector
ANIM_editkeyframes_refresh was testing handle selection as if those handles were transformed.

This is already handled by areas which need it,
so simply replace testhandles_fcurve -> calchandles_fcurve.

This was causing other bugs such as inserting a keyframe changing handles of unrelated fcurves.
2014-05-14 11:59:51 +10:00
b3cd9d289a Code cleanup: Define a dedicated "channel_role" field for animchannel types
This makes it easier for finding the active or first selected channel
(where actual data channels need to be favoured over expanders - which come
first), as previously, long switch statements were needed everytime.
2014-05-09 15:49:36 +12:00
d20c9e491c Bugfix: "Lock time to frame range" didn't work in the Graph Editor
This uses a different operator than the other time editors (as it needs to support
the setting of the value-cursor too), so the changes here didn't get propagated through.
2014-05-08 17:43:11 +12:00
aad0907644 Get rid of custom tooltip for pushdown button 2014-05-07 14:20:02 +12:00
cf069afdfd Fix: T40016 ID Names translated in menus 2014-05-05 15:09:29 +10:00
620901426c Code cleanup 2014-05-05 12:29:28 +10:00
4e0aa0e7f2 NLA Editor: Added dedicated operator for the pushdown operation 2014-05-05 14:16:41 +12:00
1e577739e7 NLA Editor: Polishing a few rough edges with the cleanup 2014-05-05 14:16:39 +12:00
da6b1ca27d NLA Editor: Second part of porting NLA Action channel to standard drawing system
This now works (barring one or two minor glitches and the operator on the pushdown
button being a bit of a hack). The old drawing code is still in place though, and
will be kept around for a little while yet while the last kinks are ironed out.
2014-05-05 14:16:38 +12:00
b2784d33ce NLA Editor Drawing: Set up AnimChannelType callbacks for drawing NLA Editor
This commit lays some of the groundwork needed to port the last of the NLA Editor
channel types that's still defined using custom code. By moving this code over
to the newer standardised framework, this will enable widgets to have tooltips
to make it easier for users to find out what various buttons do.

Currently this isn't hooked up to anything though.
2014-05-05 14:16:38 +12:00
2a3cdeadf1 Fixes for errors uncovered after previous commit 2014-05-04 23:28:27 +12:00
c561e0d929 Code cleanup: Use enum instead of int in function signatures for bAnimChannelType settings callbacks 2014-05-04 23:19:40 +12:00
35a9a7d396 NLA Editor: Show correct tooltip for "NLA Mute" on datablock expanders 2014-05-03 16:50:40 +12:00
3faa48cb07 Spelling fix 2014-05-03 16:50:39 +12:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
313d62df70 Get the edit-object when keying and checking editmode 2014-04-30 08:28:09 +10:00
a91c4ac99f Ignore user-preferences when inserting keys from Python 2014-04-29 07:35:04 +10:00
6feec25bdd "Auto" option for Keyframe.easing
This option (alongside the Ease In/Out/InOut options already available) aims to make it
easier to get an initial curve that looks closer to the one you were expecting, by
automatically picking whether Ease In or Ease Out should be used based on the type of
interpolation being used for the curve segment in question.

Notes:
* The types chosen may need some adjustments (e.g. using ease in-out instead of just ease in)
* This does break compatability with files saved in previous dev builds, but only
  if you were using Bounce/Elastic/Back with "Ease In"
2014-04-29 02:23:53 +12:00
2aa9d33404 Fix T39902: Keyframe insertion by a Keying Set fails in the edit mode when keyframing object data properties.
Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D484
2014-04-28 16:46:06 +09:00
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00