Commit Graph

1192 Commits

Author SHA1 Message Date
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
e95fd79258 Correction for error in own recent commit (makesrna c++ api, un-init var) 2014-04-01 16:53:15 +11:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
097a3756c0 Code cleanup: use bool 2014-03-31 23:39:08 +11:00
551d1a1ed5 Code cleanup: style 2014-03-24 13:14:19 +11:00
85e0f69040 A few spelling fixes 2014-03-22 16:57:57 +13:00
daccaa713b Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types
which are useful for motion-graphics work. These define a number of
"easing equations" (basically, equations which define some preset
ways that one keyframe transitions to another) which reduce the amount
of manual work (inserting and tweaking keyframes) to achieve certain
common effects. For example, snappy movements, and fake-physics such
as bouncing/springing effects.

The additional interpolation types introduced in this commit can be found
in many packages and toolkits (notably Qt and all modern web browsers).
For more info and a few live demos, see [1] and [2].


Credits:
* Dan Eicher (dna)              - Original patch
* Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase
* Joshua Leung (aligorith)      - Code review and a few polishing tweaks

Additional Resources:
[1] http://easings.net
[2] http://www.robertpenner.com/easing/
2014-03-22 03:00:27 +13:00
9767ff8916 Code cleanup: use true/false in sequencer functions 2014-03-20 15:46:38 +06:00
a91247c2b4 Code cleanup: unreachable break/return 2014-03-19 12:47:09 +11:00
ec4e12d9a2 Code cleanup: comments and typos 2014-03-18 05:40:18 +11:00
37dd7360d6 Code cleanup: naming conventions 2014-03-16 22:11:14 +11:00
e81d98aff7 Spelling fix 2014-03-15 11:45:52 +13:00
1f3655d224 Fix T38897: Problems moving animation channels up and down in dope sheet/action editor.
Basic idea is to check whether an element is visible or not, and ignore those that are hidden, during move up/down.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D376
2014-03-14 12:48:15 +01:00
d219312d44 Fix T39018: Duplicate entries for material/shader in AnimEditors
In many BI shader setups, the material which owns the nodetree is often itself
included as a node in that nodetree (i.e. to provide the base colour for that
mesh). This would often result in the material (and its subtree) getting included
in the dopesheet results twice.
2014-03-09 19:23:32 +13:00
fa24ad1fd5 Graph Editor: add lasso select for fcurves 2014-03-09 16:20:04 +11:00
f16a6e3016 Comment fixes 2014-03-08 02:15:59 +13:00
46682d8812 Icon for LineStyle
patch T37008 from Michael P.
2014-03-04 04:22:32 +11:00
c4eab10e5c Fix T38853: right click menu add driver should not be possible to redo.
This was already disabled for the keyframing operators, needs to be done for
drivers as well as this doesn't work.
2014-02-26 18:56:00 +01:00
4ff3ec835e Fix T38737: Box select channels in dope sheet doesn't select corresponding bones in rig 2014-02-22 00:53:03 +13:00
bff99b10a3 Fix T38720: Clear preview range operator missing notifier to redraw
timeline.
2014-02-19 13:34:50 +01:00
5cf987cff8 Patch T38282/D295: Add a time offset to the FCurve Noise Modifier
FCurve Noise Modifer now has an extra float property which offsets the noise in time.
This is useful for creating follow through in procedurally animated noise.

For example, if you've used a noise modifier on a parent bone to add additional movement,
a quick and easy way to add overlapping motion is to create copies of that modifier on
its children, and then offset the time those curves play at. See this in action at:
http://youtu.be/Ph6fk_z_k3k

Reviewed By: Joshua Leung
2014-02-10 16:21:12 +13:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
b320139c67 Use bool where appropriate 2014-02-03 19:23:49 +13:00
39eb314cb9 UI: Refactor timecode functions into BLI_timecode
- deduplicate timecode_simple_string from image.c
- replace V2D_UNIT_SECONDSSEQ with V2D_UNIT_SECONDS
- avoid possible buffer overflow bugs (sprintf -> BLI_snprintf)
- remove option not to use timecode and split into 2 functions

Patch D227 by Andrew Buttery with own refactoring.
2014-01-29 20:44:01 +11:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
257f408864 Fix T38347: adding object visibility keyframes in the outliner groups and
libraries view not working.

This was disabled in the operator, there may have been a reason for this at
some point, but I can't see any reason to disallow it in the current code or
find a good reason why it was done in the commit logs.
2014-01-24 16:12:56 +01:00
4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
e27dcc3423 Cleanup: no need to use constraint space transform API here, we can directly call
BKE_armature_mat_pose_to_bone (and avoids the need to get an Object pointer!).
Note the former just calls the later internally, in this case.
2014-01-21 09:18:48 +01:00
607df8090b Fix for long keyframes not getting faded out with their associated keyframes on protected channels 2014-01-17 14:53:03 +13:00
d8fa72bfb1 Assorted polish fixes for keyframe theme settings patch
* Version patching fixes for theme settings
* Added missing support for NLA (needed for the keyframes drawn in the action lines)
* Fix for a lack of contrast between selected and unselected extreme keyframe type
  (restoring it back to the pre-patch color scheme)
* Fix for keyframes on protected channels not being drawn with partial opacity
2014-01-17 14:53:02 +13:00
5e5b0cee4f T37579: Theme settings for Keyframe Colours
This patch makes it possible to customise the colours used for the different
keyframe types (Keyframe, Breakdown, Extreme, Jitter) and the border colours
(normal and selected).

Reviewed by: Joshua Leung
2014-01-17 14:42:10 +13:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
6734936c13 RNA API: use bool's for enum itemf callbacks. 2014-01-04 18:10:01 +11:00
6727bf3a21 Avoid temporary change of animation data flags for nodes filter
Use temporary runtime flag of filter_mode argument instead.

This commit also fixes some weirdo mix of filter_mode with
filterflag bits.
2013-12-26 18:50:22 +06:00
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
87cc890aef Support units in modal numinput
Summary:
This completly changes the way modal numinput is handled. Now, edited expression is a string, which then gets unit- and py-evaluated to get a float value.

We gain many power and flexibility, but lose a few "shortcuts" like '-' to negate, or '/' to inverse (if they are really needed, we still can add them with modifiers, like e.g. ctrl-/ or so).

Features:
- units (cm, ", deg, etc.).
- basic operations from python/BKE_unit (+, *, **, etc.), and math constants and functions (pi, sin, etc.).
- you can navigate in edited value (left/right key, ctrl to move by block) and insert/delete chars, e.g. to fix a typo without having to rewrite everything.
- you can go to next/previous value with (ctrl-)TAB key.
- As before, hitting backspace after having deleted all leading chars will first reset the edited value to init state, and on second press, the whole "modal numinput" editing will be cancelled, going back to usual transform with mouse.

Notes:
- Did not touch to how values are shown in header when modal numinput is not enabled (would do that in another commit), so this is still quite inconsistent.
- Added back radian support in BKE_unit.
- Added arcminute/arcsecond to BKE_unit.
(those unit changes affect all angle UI controls, btw, so you can now enter radians or longitude/latitude values when in degrees units).

Related to T37600.

Reviewers: brecht, campbellbarton, carter2422

Reviewed By: brecht, campbellbarton, carter2422
Thanks everybody!

Differential Revision: http://developer.blender.org/D61
2013-12-21 17:44:48 +01:00
48b9680578 Fix T37883: Dope Sheet - Selecting object channels in AnimEditors doesn't make them active
There was probably a reason in the past why this wasn't desirable, but since we allow
bones to be properly selected when clicking on corresponding channels here, we may as
well allow this case too.
2013-12-20 23:55:44 +13:00
b2fdc591c3 UI: restore confirmation popups for delete operators.
It turned out this was leading to accidental deleting in some cases when the
info message was missed by users. Fixes T37801.
2013-12-20 01:40:33 +01:00
db795b66fa Fix bplayer broken in own rB51f5c994e9f0. 2013-12-17 10:47:32 +01:00
51f5c994e9 Fix T37103: Keyframing custom properties issue (FCurve would not reflect Custom props type changes).
Add an helper func to re-compute integer-only fcurve flags, and call it when editing custom props.

Reviewed by aligorith, thanks!

Summary: Proposal fix for "keyframing custom properties issue" (T37103).

Reviewers: aligorith

Maniphest Tasks: T37103

Differential Revision: http://developer.blender.org/D111
2013-12-17 09:51:27 +01:00
ff6bf133ad Fix T37811: Delete key shortcut missing for deleting markers
The keymap here used WM_keymap_verify_item(), which only allows for a
single hotkey to be bound to an operator. In most cases, this really
isn't justified.
2013-12-14 13:42:42 +13:00
ac38f2584f Code Cleanup: replace ABS() with fabsf() when used with float expressions. 2013-12-01 13:11:12 +11:00
cedc90b607 Fix errors and inconsistencies in confirmation popup removal.
* Improve some clip editor messages
* Remove popup for metastrips, seems unnecessary
* Renamed some variables for consistency
* Avoid unnecessary call to CTX_DATA_COUNT

Reviewed By: sergey, campbellbarton, aligorith

Differential Revision: http://developer.blender.org/D44
2013-11-29 17:49:01 +01:00
63caaa2b12 Code Cleanup: rename vars for detecting change to be more consistent
rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
2013-11-26 06:39:14 +11:00
3ca4387bc8 UI: remove unnecessary confirmation popups
This makes a number of operators no longer ask for confirmation, rather it will
show an info message after performing the operation. Ref T37422 for decision. In
particular, these were changed:

* Delete objects, bones, keyframes, masks, mask curves, motion tracks, markers.
* Clear and delete keyframes in the 3D view.
* Align bone to parents.
* Separate bones from armature.
* Group/ungroup metastrips in sequencer.
* Copy/paste objects to/from buffer.

Reviewed By: brecht, dingto

Differential Revision: http://developer.blender.org/D35
2013-11-25 12:21:45 +01:00
1d33098314 More short->bool refactoring work for anim channel type define callbacks
Changed the "neg" flag for acf.setting_flag() to be a bool
2013-11-23 18:59:21 +13:00
ff66f3d3ad Anim Editors: Refactored animchannel type definition callbacks to use bools
Changes:
- acf.name_prop() and acf.has_setting() now return bools instead of shorts
- Renamed a few name_prop() callbacks whose names ended in "_nameprop"
  instead of "_name_prop", which made it difficult to safely find all
  such instances
2013-11-23 18:59:21 +13:00