Commit Graph

68 Commits

Author SHA1 Message Date
Joshua Leung 71da1e96d1 Drivers Code Cleanups and UI Tweaks:
- Adding drivers from the UI (not from py-scripts though) will now
automatically add a "Transform Channel" driver variable to the newly
created drivers. This makes setting up drivers a bit more convenient
for the most commonly used case.

- Drivers now report their errors using the Reports system instead of
writing these directly to the console.

- Clarified some comments to be more insightful about the "why's" of
some design decisions, and related formatting/cleanup tweaks
- Reduced scope of "path" vars to just the scope they're required in

- Removed some unused defines from a failed experiment in the original
Keying Sets code ("templates" and "template flags") which was
superseeded by the more flexible + nicer "Builtin KeyingSets"
2010-12-28 05:45:15 +00:00
Campbell Barton b45c3363fd fix for some pedantic warnings. 2010-12-03 01:52:28 +00:00
Joshua Leung db4609eb08 Animation Editors: Channel Reordering
This commit restores the ability to reorder channels in the animation editors (DopeSheet/Action/etc., Graph/Drivers, NLA). The hotkeys for this are:
- Shift-PageUp = Move Up
- Shift-PageDown = Move Down

- Ctrl-Shift-PageUp = Move to Top of List
- Ctrl-Shift-PageDown = Move to Bottom of List

Do note that only animation data can get reordered using this. 
So, do not expect to be able to change the object order (that is actually taken from the order that Blender actually evaluates them per update/frame).

---

In the process, I've fixed a couple of other bugs:
* Removed 'optimisation step' check in anim_filter.c for dopesheet with no filtering options modified, since this meant that the ANIMFILTER_ANIMDATA data filter was not getting processed (and potentially there were other maintenance problems with that).

* Made NLA Editor's channel list not totally duplicate the basic Animation Channels keymap. Instead, the "NLA Channels" keymap now only defines the parts that are different, and this then gets specified before the standard one so that these different parts will override the standard ones.

* Attempted to fix BorderSelect on NLA Channels list. Still not totally working correctly yet though.

* Moved "Euler Discontinuity" menu entry from "Channels" to "Keys". It really belongs in the latter, since it affects the keyframe values, rather than some aspect of the channel (i.e. ordering of channels or how they're displayed)
2010-11-07 12:09:15 +00:00
Campbell Barton 391cc2d004 merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
Joshua Leung d89a8c34f3 More F-Modifier Tweaks:
This commit started out aiming to make the "Stepped" F-Modifier (committed last night) even more useful, but ended up fixing a few other finer-points of how F-Modifiers work.

Firstly, the new stuff:
I've addded options to the Stepped F-Modifier to not affect frames before and/or after specified values, and renamed the 'start offset' to 'offset' for clarity. 

The main objective of this is to allow Stepped F-Modifiers to only affect certain time ranges, so that by layering/using multiple instances of the F-Modifier, it can be possible to have multiple stepping-sizes.

This allows for effects like:
http://www.pasteall.org/blend/2230
or in words, it provides a convenient mechanism for animators to specify whether sections of the animation is shown "on twos", "fours", or even "forty-second-ths plus a smidgen", as can be easily done with 2D.

Assorted changes to support this:
* Properly fixed up how F-Modifiers that work with time, evaluate the time to evaluate the curve at. Now layered time effects like this should be possible in a much nicer way.

* Added proper value range validation/clamping to many properties. There are still a lot more that need checking, but at least more properties now do "the right thing".
2010-03-19 03:38:14 +00:00
Joshua Leung 618b459e8b F-Modifier Goodies (as requested by @ndy):
* Copy/Paste operators for F-Modifiers
Available in Graph and NLA Editors. Use the Copy/Paste buttons beside the 'Add Modifier' buttons.

Copy copies all the modifiers of the ACTIVE F-Curve or Strip depending on the editor.
Paste pastes modifiers from the buffer to all the selected F-Curves or Strips, adding the new modifiers to the ends of each list.

* 'Stepped Interpolation' F-Modifier
This modifier holds each interpolated value from the F-Curve for several frames without changing the timing. 

This allows to preview motions 'on-twos' for example without altering the timing, or having to go through setting heaps of keyframes. In this case, Andy wanted to use this for CG <-> StopMo.
2010-03-18 13:04:46 +00:00
Joshua Leung ea4a987fd4 == Massive Keying Sets Recode ==
After a few days of wrong turns and learning the finer points of RNA-type-subclassing the hard way, this commit finally presents a refactored version of the Keying Sets system (now version 2) based on some requirements from Cessen.

For a more thorough discussion of this commit, see 
http://sites.google.com/site/aligorith/keyingsets_2.pdf?attredirects=0&d=1

------

The main highlight of this refactor is that relative Keying Sets have now been recoded so that Python callbacks are run to generate the Keying Set's list of paths everytime the Keying Set is used (to insert or delete keyframes), allowing complex heuristics to be used to determine whether a property gets keyframed based on the current context. These checks may include checking on selection status of related entities, or transform locks.

Built-In KeyingSets have also been recoded, and moved from C and out into Python. These are now coded as Relative Keying Sets, and can to some extent serve as basis for adding new relative Keying Sets. However, these have mostly been coded in a slightly 'modular' way which may be confusing for those not so familiar with Python in general. A usable template will be added soon for more general usage.

Keyframing settings (i.e. 'visual', 'needed') can now be specified on a per-path basis now, which is especially useful for Absolute Keying Sets, where control over this is often beneficial.

Most of the places where Auto-Keyframing is performed have been tidied up for consistency. I'm sure quite a few issues still exist there, but these I'll clean up over the next few days.
2010-03-16 06:18:49 +00:00
Joshua Leung 7790780006 Animation Editors: DopeSheet filter for Object-level animation
Added a new option to filter the out Object-level (i.e. transforms, object visibility/settings, and also bone animation) animation data from the channels list. As most of these settings are transforms, I've used the transform manipulator icon and named the RNA setting display_transforms. 

This is useful when trying to filter out only material animation data for example, as requested by Colin.
2010-02-17 12:03:23 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Joshua Leung 14d4feca57 Radians vs Degrees: The Second Attempt
F-Curves now internally store radians again instead of degrees. 
- This solves problems with inconsistencies when working with drivers.
- No need to version patch old files, potentially screwing them up. As such, removed the version patching for F-Curves.
- Is better suited to optionally showing radians throughout the UI instead or degrees.

As a result, values are now converted on the fly in the Graph Editor for display and operators that operate on values. I've made the conversion system for this rather general, so that other unit type conversions can also be hooked up with the type conversion backend.

Also, made some tweaks to F-Curve RNA wrapping to make it represent the data better.

TODO:
- Transform code currently still needs to be corrected to work with these changes. Currently moving keyframes for rotation curves will make them change too rapidly vertically when using degrees.
2010-01-26 03:16:14 +00:00
Matt Ebb 0c5998e799 Radians -> Degrees (in UI)
Rotations are now stored internally as radians, while exposing degrees in the UI - 
in the graph editor and UI controls. This is done in two areas:
1) Using the unit system to convert RNA data to display as degrees in the UI controls
2) FCurves now use degrees for rotation, so you can edit in the graph editor what 
you see in the UI.

All rotation data is consistently accessible in DNA and RNA as radians, degrees are only 
used for the UI controls and graph editor.

This commit includes conversions will convert old files (stored data and also fcurve data) 
to the new units, hopefully everything should go smoothly!

Part of this also changes a few properties that were hard-coded as degrees before (such 
as IK pole angle and brush texture rotation) to also use the same consistent system of 
radians (dna/rna) and degrees (ui).

Thanks to Joshua for hints and review here too.
2010-01-25 06:24:05 +00:00
Joshua Leung a8855e2caf Drivers UI: Debug Info
Feature request for ZanQdo, which shows the intermediate values used in driver calculations (i.e. current value of driver, and current value of variables), allowing drivers expressions to be debugged. This is a per-driver setting...
2010-01-19 23:38:26 +00:00
Campbell Barton d3a718dc2f fix for own but in recent driver optimization [#20580] Driver Crasher rev [25763]
recalculate names when needed
2010-01-06 22:42:13 +00:00
Brecht Van Lommel 9a3362c84f BUGFIX: revision 25736 (about 3 hours ago) introduced a problem in SDNA
for drivers, which will cause files that include drivers and saved since
then to crash on load, and loading existing files to crash as well. This
commit fixes that problem. So, don't use builds from revision 25736-25743.

The problem is this line, SDNA does not support parsing #defines:

DriverTarget targets[MAX_DRIVER_TARGETS];
2010-01-05 14:56:48 +00:00
Joshua Leung 6fb1d0e6a3 More Driver Fixes:
* Fixed Driver version-patching code to work correctly again with the new system.

* Fix for bug #20484, by adding a new driver variable type ('Transform Channel') which makes it easier to use object/bone transforms as in the past. The main differences with using this (compared with the 'Single Prop' type) are that this allows for 'final' transforms to get used instead (i.e. constraints are also taken into account), and also that this variable type can only be used for transforms (more limited scope -> less flexibility -> point-n-click goodies can follow). Mancandy now loads correctly again.

* Added toggle for local vs worldspace transforms when working with Rot/Loc Diff variable types, and also for the newly added Transform Channel

* Removed some dead code from sequencer...
2010-01-05 11:59:12 +00:00
Joshua Leung a9861e3381 Durian Request: Drivers Recode
Highlights:
* Support for Multi-Target Variables
This was the main reason for this recode. Previously, variables could only be used to give some RNA property used as an input source to the driver a name. However, this meant that effects such as Rotational Difference couldn't be used in conjunction with other effects and/or settings to achieve the powerful results. Now, a variable can take several input targets, perform some interesting operations on them, and spit out a representative value based on that.

* New Variable Types
With the introduction of multi-target variables, there are now 3 types of variable that can be used: single property (i.e. the only type previously), Rotational Difference (angle between two bones), and Distance (distance between two objects or bones).

* New Driver Types
In addition to the existing 'Average', 'Sum', and 'Expression' types, there is now the additional options of 'Minimum' and 'Maximum'. These take the smallest/largest value that one of the variables evaluates to.

* Fix for Driver F-Curve colouring bug 
Newly added drivers did not get automatically coloured in the Graph Editor properly. Was caused by inappropriate notifiers being used.


Notes:
* This commit breaks existing 2.5 files with drivers (in other words, they are lost forever). 
* Rigify has been corrected to work with the new system. The PyAPI for accessing targets used for the variables could still be made nicer (using subclassing to directly access?), but that is left for later.
* Version patching for 2.49 files still needs to be put back in place.
2010-01-04 21:15:45 +00:00
Joerg Mueller a2b0020e11 Reverted the addition of the f-curve sound modifier (was added in revision 24759) due to unusability and performance issues. The ability to use a sound as animation source will be added as an import operator later that renders a sound to an f-curve which brings the advantage that you can edit the generated curve later and the disadvantage it is not automatically updated when the sound changes. 2009-12-24 14:01:22 +00:00
Joshua Leung da5025d46d Bugfix #20463: In graph editor bone channels cannot be selected with 'A' or 'B' border select
This bug was caused by my recent commit to get bone select -> selection syncing working. The selection flushing was occurring too readily, blocking any selection tools from having any visible effect. Now this syncing is only triggered when appropriate notifiers+flags have been set.
2009-12-23 11:22:30 +00:00
Joshua Leung 6b7544bfda Durian Request: Default F-Curve Auto-Colour Modes
Added option to KeyingSets+Keyframing Functions which makes newly added F-Curves for Transforms + Colours to use the colour mode which uses the array index to determine the colour of the F-Curve. 

The main implication of this is that when this option is enabled for a KeyingSet, all sets of XYZ F-Curves (i.e. location, rotation, scale) for transforms will be shown in Red/Green/Blue instead of some automatically determined "rainbow" colour. Useful for animators far too used to Maya's Graph Editor :P

This setting is named, "XYZ to RGB", though that doesn't make its purpose entirely clear.
2009-12-10 10:40:28 +00:00
Campbell Barton 0391b1ab78 compile python driver expressions for faster re-evaluation.
approx 15-25x speedup
2009-12-08 10:36:46 +00:00
Campbell Barton 47416c725c driver type 'Sum' 2009-12-07 19:59:04 +00:00
Joerg Mueller 8e877c1f9f Added a first version of the Sound F-Curve Modifier, not really usable yet, but you can play around with it. 2009-11-22 12:10:45 +00:00
Joshua Leung 1ef163f1e0 UI Templates: ('Any ID' Selector)
Added new template for choosing to use any type of ID-block. The first combo box allows you to choose the type of ID-block that gets used, and the second box allows you to choose the ID-block of the type specified by the first one.

This is currently used for setting the ID-block used for Keying Sets, but the main user for this was intended to be the Drivers UI. However, I still need to clear up a few button-event issues there before I can port this over.


Additional Bugfixes:
* Adding new Keying Set path was setting the active path wrong, meaning that you had to click on the list to get some response after adding
* Bone Groups list was being drawn too long by default (when empty)
2009-10-14 09:08:53 +00:00
Joshua Leung f4c697cf7f Keying Sets UI:
Added a way to view and edit Keying Sets via the Scene Buttons. These are still some tweaks needed to make this really workable, but should still work well enough for simply viewing and tweaking existing Keying Sets created using other means.

Additional bugfixes:
* Adjusted the size of labels on properties that had a 'label' for their name. Now it uses 1/3 of the total width instead, which looks much better for most cases.
* Added missing entries for adding Force Fields from the Info-header 'Add' menu. At some point we should unify this menu with the popup operator's one, since this is exactly the kind of situation we had hoped in avoid with new UI architectures.
* Moved all the operator defines for keyframing stuff to the 'intern' anim header instead
2009-10-03 04:21:38 +00:00
Joshua Leung 7d2fd5449e Durian Feature Request: Rotation Modes for Objects
This (biggish) commit generalises the rotation modes functionality added for Bones, allowing Objects to use the various Euler Rotation orders, Axis-Angle, and Quaternion rotation representations.

I've also cleaned up the nomenclature of the rotation-related settings so that the naming styles are more consistent with each other. Unfortunately, this will break all files involving object or bone rotation animation made in 2.5 versions (2.4x will still get correctly converted).

General Notes:
* By default, Objects still default to using Eulers, while Bones will use Quaternions by default still.
* I've fixed all areas that I'm currently aware of to work with these changes. However, there are probably a few places where I've missed a few changes (i.e. auto-keyframing will need attention later).
* Removed the old "IPO-Keys" stuff from Transform code. I'm unlikely to restore this in the near future, and trying to fix that to include support for this commit would have been too much work.
2009-09-28 10:19:20 +00:00
Joshua Leung fbfa8d2f81 2.5 - Assorted Animation UI/Editing Tweaks
Main Feature:
* It is now possible to choose which AnimData block is the 'active' one for editing, and/or select them too. AnimData blocks are generally the dark blue and lighter-blue expanders (i.e. Scene, Object, Camera, Lamp, Curve, Armature, etc.)

* Objects are no longer selected/deselected when AKEY is used to toggle selection of channels. This was getting a bit annoying. 

* Following on from selection of AnimData blocks, it is now possible to select/make active an AnimData block in the animation editors, and change the active action for that block via the 'Animation Data' panel in NLA Editor's properties region.
--> Be aware that user-counts are not totally handled correctly there yet, so some funky behaviour might be seen...
--> It is possible to assign a new action, or to assign an existing one, allowing to switch between actions as in the past with Actions/IPO Editors...

Other tweaks:
* Some code tweaks towards making the 'Euler Filter' feature for Graph Editor working sometime soon
* Added some backend code for snapping the values of keyframes to a single value. Still need to work out some UI for it though.
* Shuffled the code for ACT_OT_new() around, and removed the poll() callback so that it worked in NLA too.
* Fixed some more notifier bugs with deleting bones and a few other editmode operations for Armatures.
2009-09-27 04:22:04 +00:00
Joshua Leung 9a8b01218f 2.5 - Bones with "Euler" rotations can now have their rotation keyframed properly using built-in keyingsets (i.e. the IKEY menu in 3D-View) 2009-08-02 23:31:18 +00:00
Joshua Leung a1eef5bb4d Animato - NLA + Realtime Animating Goodies
* When doing realtime recording of animation (i.e. transforming objects + bones while animation playback is running, and auto-keying is enabled), animation will be added to a new NLA Track+Strip combo everytime a single 'loop' of the frame range has finished. This will allow 'passes' over the animation to be less destructive.

* Made the evaluation of the active action (when NLA data is present), be handled as part of the normal NLA system evaluation code (as if it were just another strip in a track at the end). The immediate benefit is that there are now some settings (available in the "Animation Data" panel in the NLA Editor with a strip selected) which allow for the way the active action is combined with the NLA stack results. For instance, the way that the action extrapolates is used in the recording tweaks above.
2009-07-31 07:43:47 +00:00
Joshua Leung b3d0753467 2.5 - Small tweaks to order of buttons for Animation Editor header buttons to have more consistent layout 2009-07-29 11:59:21 +00:00
Joshua Leung ae7e321c8b 2.5 - Fixes to try and let C++ compilers not choke on DNA_anim_types.h 2009-07-20 10:43:41 +00:00
Joshua Leung 66a81a4062 NLA SoC: Names for NLA Strips
In order to be able to better identify NLA Strips (and to reduce the complexity of the text on them), I've implemented a name property for the strips. The names are made to be unique within the AnimData block the strip comes from, though this may not always happen if not enough relevant context info is present to validate this.
2009-07-10 23:25:30 +00:00
Joshua Leung d7a7081e63 NLA SoC: Tweaks from feedback from Broken + jez
* Renamed the 'blend' blending mode to 'replace', since that's what it usually does

* Drawing a darkened rect behind the keyframes shown in the action line

--

* Fixed typo made last night which broke compiling
* Consolidated all the keyframe-shape drawing code to use a single codebase. Even if we don't ultimately go with OpenGL keyframes, there's always a tidy option for that now.
2009-07-10 00:32:13 +00:00
Joshua Leung 518911e78c NLA SoC: Assorted cleanups
* Some cleanups aimed at giving some (neglible) speedups 

* Preparation for NLA-Strip keyframes to be editable
2009-07-09 01:04:42 +00:00
Joshua Leung 1586570261 NLA SoC: More work on Meta-Strips
* Added several API functions for Meta-Strips editing. One of these (flush transform) still needs a few tweaks before it does its job well enough for all cases.

* Meta strips are now drawn with a purple-ish colour. The start/end points of the strips they encompass are shown with lines along the length of the strips, with lines starting from the top indicating start-points and lines starting from the bottom indicating end-points.

* Meta strips can be made (i.e. strips can be assigned to meta-strips) by selecting some strips and pressing Shift-G. 
Meta strips can be removed by selecting some meta-strips and pressing Alt-G.

* Strips can now be 'snapped' to start from: the current frame, the nearest frame, the nearest second, or the nearest marker; using the Shift-S hotkey. 
'Islands' of adjacent selected strips occurring in the same track are moved together as a single strip so that the start-point of the first strip is on the sepcified time, but all the relative lengths of strips stay the same. Internally, temporary meta-strips are created to facilitate this.
2009-07-06 11:06:34 +00:00
Joshua Leung f87fcde686 NLA SoC: Start of 'Meta' Strips
Refactored the backend code/API's to support 'meta' strips (i.e. strips containing other strips). These have been implemented to be nested to 'unlimited' depths (in terms of common usages that is, though there is a very remote chance of stack-overflow in theoretrical evil cases only that shouldn't ever be encountered in production).

This paves the way for implementing the necessary tweaks needed for the transform code (in addition to some cool user-level tricks)
2009-07-06 03:44:44 +00:00
Joshua Leung b8042f535c NLA SoC: Muting and Graph-Editor Curve visibility for (Action) Groups
Groups (the Action variety) can now be muted, and also be set to not be drawn in the Graph Editor. These settings get applied to all the F-Curves within the group, overriding any settings individual F-Curves might have, allowing users to quickly mute or hide groups of curves without having to go through clicking on all of them.

Also, added a flag that can be used to set the curve visiblity on AnimData level too. This will be enabled in a future commit.
2009-07-03 10:28:10 +00:00
Joshua Leung 66efea5e2d NLA SoC: Toggle for 'Editing in Place'
The 'pin' icon beside the name of the active Action when tweaking some strip's action can be used to toggle between editing the Action's keyframes in 'mapped' time or in 'un-mapped' time.
2009-07-03 04:48:44 +00:00
Joshua Leung 28d371d117 NLA SoC: Assorted fixes
* Made NLA Editing functions more aware of transitions. 
- A transition can only be added between a pair of action-clips. Previous, two transitions could be added next to each other, which has undefined behaviour
- Deleting a strip with transition(s) on either side will remove the transitions too. Feedback welcome on this
- The 'type' setting for NLA-Strips is no longer editable. This was dangerous as it could result in transitions with undefined behaviour (though nothing would happen).

* Menus for adding F-Modifiers now only show relevant modifiers (i.e. 'Invalid' is not included in the list, and 'Cycles' doesn't need to be shown for NLA since we've got repeat)

* Function Generator and Noise F-Modifiers now have complete GUI's. A few settings were missed during the porting process.

* F-Modifier buttons now have their source-ID's included in the RNA Pointers used. This didn't get them animateable directly, but is a step closer.
2009-07-03 01:10:46 +00:00
Joshua Leung 1588de008a NLA SoC: Separated 'Built-In Function Generator' FModifier into a separate FModifier
Started cleaning up FModifiers in preparation for allowing them to be used on NLA Strips. 

This commit separates the 'Built-in Function' mode for the Generator modifier out into its own modifier, since it was being quite frequently used (and the RNA wrapping for this used to be quite hackish). 

BACKWARDS COMPATABILITY WARNING:
Old files with FModifiers saved (i.e. old 2.5 files, but not any others) will not load correctly as a result of these changes (the wrong modifiers will be shown). I've decided that there are not likely to be many files affected by this yet, but doing this will result in a much nicer modifiers-define list in the long run.
2009-07-02 02:12:37 +00:00
Joshua Leung b4acd77526 NLA SoC: Big Commit - Restored NLA-Mapping Corrections
In TweakMode, the keyframes of the Active Action are now shown (and can be edited) in NLA-mapped time, with appropriate corrections applied when editing. This works in the DopeSheet and Graph Editors :)

To do this, got rid of the old wrappers/API-methods, replacing them with new-style ones. A few methods previously (in this branch) used only for evaluation are now used for this purpose too. As the same code is used for editing + evaluation, this should now be much better to work with.

I've only done a few brief tests now, but I think I might've muddled the invert-flags on one or two cases which I'll need to check out tomorrow. So, beware that there may be some weird and critical bugs for the next few days here...

Also, added proper license headers to new NLA files.


TODO:
- testing + bugfixing due to this commit
- show range of keyframes in NLA Editor active-action line
2009-06-23 13:25:31 +00:00
Joshua Leung 867e129135 F-Modifiers (in Nla branch):
For fun, added 'sinc' (i.e. y = sin(pi*x)/(pi*x)) as a type of builtin function usable through the generator modifier. This makes a nice 'jolt' which tapers off.
2009-06-10 05:03:27 +00:00
Joshua Leung 5c21c176fa NLA SoC: Operators for 'tweaking' strip actions (TAB-Key for both)
In this commit, I've introduced the mechanism by which actions already referenced by strips used in the NLA can be edited (or 'tweaked'). To use, simply select a strip you wish to edit, and hit that TAB key to start tweaking that strip's action, and hit TAB again once you're done.


What happens when you enter 'tweak mode':
1) The action of the active strip temporarily becomes the 'active action' of the AnimData block. You are now able to edit this in one of the Animation Editors (DopeSheet/Action, Graph Editors) as per normal (i.e. sliding keyframes around, inserting keyframes, etc.). The 'action-line' will therefore get drawn immediately above the active track containing the active strip, so that it's clear that that's what we're editing.

2) All the NLA-tracks (and all the strips within them) that occur after the track that the active strip lived in get disabled while you're in tweakmode. This is equivalent to travelling back to an earlier state in a construction history stack.

3) The active NLA track also gets disabled while in tweakmode, since it would otherwise interfere with the correct functioning of the tweaking for the action of interest.

4) The 'real' active action (i.e. the one displaced by the active strip's action) gets put into temp storage, and will be restored after you exit tweakmode.

5) Any strips which also reference the action being tweaked will get highlighted in red shading to indicate that you may be making some changes to the action which you don't really want to make for the other users too.


Please note though, that this is only a rough prototype of this functionality, with some niceties still to come. i.e.:
* NLA-tracks after the active track should still get drawn above the 'tweaking action line', but perhaps with different appearance?
* Various tools will still need awareness of this to prevent corrupting operations from taking place. How to proceed is still undecided...
* When exiting tweak-mode, the strip the action came from still needs some form of syncing with the modified action... there are a few tricky issues here that will need to be solved
* Evaluation code doesn't totally take this into account yet...

---
Also, fixed a number of bugs with various code (notably selection, and also a few drawing bugs)
2009-06-05 05:18:07 +00:00
Joshua Leung 37f47ef386 NLA SoC: Merge from 2.5 20441 to 20570 (HEAD)
There were a few conflicts/missing files. Hopefully everything updated ok...
2009-06-02 01:40:53 +00:00
Joshua Leung 72205f45e4 NLA SoC: Basic Strip drawing
Implemented some basic strip-drawing code with some hardcoded colours. These colours will be made into theme colours at some point, but the aim is to use different colours as indicators of the 'state' of the strip (i.e. active/being tweaked, uses the same action as the strip being tweaked, selected, normal). 

This is not yet usable though...
2009-05-30 00:28:33 +00:00
Joshua Leung 4512be4b6c 2.5 - Fixes for animating enum values
Interpolation between keyframes for enum values (and booleans) can only be constant now. 

TODO:
A way to do this for modifiers is still needed.
2009-05-28 01:57:29 +00:00
Joshua Leung 9b1ce6e556 NLA SoC: Part 1 of NLA-Data Management API
In this commit:
* Added code for freeing NLA data now stored in AnimData
* Started writing some utilities for adding NLA data, especially the 'push-down' concept for Actions
* Cleanups of existing code - removal of obsolete NLA code from various places

Next commits/parts:
* File IO code for new-style NLA data
* Version patching for old data to new data
2009-05-22 01:16:26 +00:00
Joshua Leung 4e10be01c7 NLA-SoC: Merge from 2.5 branch 19863:20113 2009-05-09 08:59:41 +00:00
Joshua Leung 22c2827d2d Cycles F-Curve Modifier: 'Mirrored' Option
Using this cycling mode option, the keyframe range will be repeated in reverse order every second repeat. Thanks for the idea mfoxdogg :)
2009-05-04 10:04:46 +00:00
Joshua Leung 2e93dc4037 F-Curve Modifiers: Time-Modifying F-Modifiers Cleanup
Time-Modifying F-Curve Modifiers now get special callbacks to allow them to specify what frame they need to be evaluated on, instead of forcing a re-evaluation of the preceeding curve + modifier-stack. This should be more robust than the old way in general.

It still remains to be seen if some tweaks to this are still needed, as the full consequences of the propogation of modified time-spaces have yet to be fully explored. 

For now though, evaluation works by finding the last modifier on the stack which modifies time, and asks it what time it modifies the given time to. This modified time is used to evaluate the F-Curve data only. The modifier stack gets evaluated using the original time instead.
2009-05-03 13:00:59 +00:00
Joshua Leung ab3339f380 NLA SoC: Initial commit of changes for the way NLA is evaluated
* Recoded the flags for NLA-Strips to take into account the new design directions
* Modified parts of the evaluation pipeline to reflect this
2009-05-03 11:46:57 +00:00