Commit Graph

24 Commits

Author SHA1 Message Date
387aad7275 A bit more F-Modifier wrapping... 2009-04-20 03:29:45 +00:00
d880257d16 Graph Editor: UI bugfixes
* Fixed a few alignment/size issues
* Number buttons work nicely again. Added temporary define for floating point limits here...
2009-04-19 12:26:31 +00:00
7cb8b3910d 2.5 Animation UI Tweaks:
* Added back backgrounds behind buttons for modifiers and driver targets
* 'Protect' toggle doesn't draw for F-Curves with no keyframes to prevent editing on anymore
* Inserting keyframes on objects using builtin keyingsets now use the right names
2009-04-17 02:13:35 +00:00
f47ab4f0ae 2.5:
* Added extra parameter to generic unique name finding function BLI_uniquename() for specifying the delimeter between non-unique parts of the name and digits.

* Driver target variables now get unique names by default.
2009-04-16 13:10:08 +00:00
eed6adbb48 Drivers: UI working + bugfixes
* The UI for adding and modifying drivers is now functional, and reflects the new way they work. It has also been tidied up a bit (from the previous incarnation), with RNA buttons starting to be used (currently limited to the 'Path' settings).
* Fixed errors in RNA wrapping for drivers
2009-04-16 12:38:44 +00:00
079304d199 Animato - Drivers with Multiple Targets:
Drivers now support multiple targets which act as 'variables'. The targets have a short 'name' (see later), and reference some property (in much the same way as F-Curves do, using RNA-Paths) which acts as the 'value'. 

These named variables can then be used in a Python Expression which relates them to each other for more fine-grained control over the result of the driver. By using only the names of these variables in the expressions, we are able to define expressions/relationships in a much more readable way, as data access is separated from data use. This makes the underlying relationships easier to understand.

By default, if no Python Expression is given, the variables are simply averaged together, so old files won't break. :)

For example, check the following diagram (thanks Cessen/Nathan V from Peach team):
http://download.blender.org/ftp/incoming/250_drivers_mockup_cessen.png


TODO List:
* Depsgraph building for new driver relationships doesn't work yet. This needs to be recoded again, but this new system makes this much easier, since the targets are clearly defined (i.e. no need to parse py expressions to get list of objects)
* Graph Editor interface for editing these needs to be rewritten
* Python function for evaluating these expressions is needed (Campbell?)
2009-04-16 07:37:06 +00:00
5b3d7bfdf6 2.5
More cleanup!

- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
  Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
  (was only in use for radiosity buttons)

And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:

- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
  to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
  a several calls using different args.

Further just added the missing includes, and removed unused vars.
2009-04-14 15:59:52 +00:00
3ef247eed9 FCurve Modifiers - "Limits" Modifier:
This new modifier clamps the values of the F-Curve to lie within specified bounds, much like Limit Location/Rotation/Scale constraints do. You can limit by time range(s) and/or value range(s).
2009-04-14 11:53:41 +00:00
f0fea32129 2.5 - Assorted tweaks in Graph Editor 2009-04-13 00:46:32 +00:00
fc02e980f4 Drivers: Errors + UI Tweaks
* Invalid drivers are now tagged accordingly and are not evaluated until they are manually refreshed using the 'Update Dependencies' button
* Drivers with errors have a error warning shown in their UI
* Rearranged the UI buttons a bit for drivers, adding support for a 'remove' driver button.
2009-04-11 06:48:39 +00:00
728767bad7 2.5 Drivers:
* Fixed bug with setting the active F-Curve
* UI for editing drivers now works
2009-04-11 00:29:21 +00:00
4bb41c3dcd UI: various panels fixes.
* Fix sometimes non-working close/open button.
* Fix panels being a bit out of the view on startup.
* Fix too large totrct region for view2d.
* Fix wrong panel order when changing vertical <-> horizontal.
* Fix wrong panel positions after switching contexts.
* Fix an access of freed memory when collapsing panels.

* Free align mode works again.
* Animations work again.
2009-04-02 01:39:33 +00:00
c7d82ec96e F-Curve Modifiers: Experimental 'Additive' option for Generator Modifiers
This setting means that instead of blindly replacing the existing values, the generator modifier will instead apply its effects on top of any existing modifiers (and/or curve data). 
Thus, it is now possible to apply effects such sin/cos-based oscillations on top of keyframed motion.
2009-03-26 11:12:39 +00:00
b4209c5656 F-Curve Modifiers: Envelope Modifier
Got the basic envelope modifier code working, including primitive drawing of relevant helper info in the graph view. It doesn't work in a very intuitive way yet, so I will recode it soon.
2009-03-21 03:49:22 +00:00
43d4e3fa7e Graph Editor: F-Curves which can only take integral values are now drawn stair-stepped using the sampling code. 2009-03-18 10:58:18 +00:00
1ac0d54fea F-Curve Modifiers: Cycles Modifier
* Added GUI and fixed bugs in the Cycles Modifier. This replaces the old Cyclic Extrapolation settings, giving more fine-grained control over the results. You can now specify whether the keyframes are repeated before and/or after the range independently, also, the maximum number of cycles on either side can be controlled.

* TODO: it would be nice to have the last value held for cyclic+offset.

* Deleting modifiers now works
2009-03-17 06:37:50 +00:00
b68f5d7e96 F-Curve Modifier - Generator: Buttons for builtin-function mode (i.e. sin, cos, etc.) 2009-03-17 00:31:10 +00:00
133e8827b7 F-Curve Modifiers - Generator: Finishing off most of UI
* Finished code for Expanded Polynomial and Factorised Polynomial UI's.
* Started UI code for 'Builtin Function' mode. There are still 4 controls to add there to use something other than simple mapping
* Finished/fixed up verification code for these so that values get initialised ok.
2009-03-16 11:43:02 +00:00
ae0f349346 F-Curve Modifiers: Basic GUI for Generator Modifier working
* Currently, this only works for the 'Expanded polynomial' mode, but this will be expanded to include the other modes too. Now you can modify the values and interactively see the graph in the view change. 

* Disabled the backdrops (modifier 'panels') temporarily, as ROUNDBOX UI elements currently swallow all events, which is not good.

Note: the code here still uses the old-style UI definition code since the new stuff is still under heavy construction.
2009-03-16 11:11:44 +00:00
8522b08e05 F-Curve Modifiers: Generator Modifier Code
* Rewrote the Generator modifier to be more efficient and support more options
* A few UI tweaks for this, but the UI for this is still not yet functional though.
2009-03-16 01:12:37 +00:00
329aa658c9 F-Curve Modifiers: Groundwork for getting these working
- Completed cleaning up the drawing code so that F-Curves with modifiers now get drawn to reflect this.
- Added a temporary operator to add modifiers (hotkey Ctrl-Shift-M)
2009-03-15 10:39:02 +00:00
7c8d98acb8 Animation Editors: Drawing stuff
* Added basic panels (Info, Drivers - where applicable, Modifiers) for editing active F-Curve/driver in Graph Editor. The buttons layouts here are really really rough, and have only got a few buttons to be sufficient for debugging purposes. Unfortunately, I don't have time to tweak these nicely now. 

* Fixed indention errors with Action Groups used in Material actions

* Changing mode in the Graph Editor now recalculates colours
2009-02-22 09:30:18 +00:00
59b44cda51 Graph Editor: NKEY panel - added code to retrieve 'active F-Curve'
Currently, this is just used to print the 'name' of the active F-Curve in a panel for verification purposes. This is the recommended way of getting this info.
2009-02-21 11:22:06 +00:00
a9654c3e6a Graph Editor: Started adding the missing NKEY panel stuff
Only a dummy pannel for now. I'll add some basic examples of relevant buttons + ways to use them soon.
2009-02-21 10:38:58 +00:00