diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-04-13 15:15:08 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-04-13 15:15:08 +0400 |
commit | 99e4e1fcb793abbd2563311dd9682bcd02e6e375 (patch) | |
tree | abed0f9662d1c61a48c4fe755d579ed800ce64f3 /source/blender/src/editipo_lib.c | |
parent | 54efb4c916f10a8dc8291aa33135385cef5cdd25 (diff) |
== Action Editor - Individual IPO-Curves Now Shown ==
Continuing on from my previous 'Expandable/Collapsable Action Channel' commit, this commit introduces the ability to show/hide the keyframes in each ipo-curve represented by an Action Channel.
When you expand an Action-Channel by clicking on the triangle beside its name, you will now be presented with options to show/hide the ipo-curves represented by
the Action-Channel, and/or the Constraint Channels belonging to that Action-Channel. Actual ipo-curves will not be drawn in the Action-Editor, but the keyframes
will be shown.
Screenshot:
* http://wiki.blender.org/index.php/Image:244_ActionEditor_SubTracks_01.png
Possibly Coming Soon/Further Work:
* 'Protection' options for ipo-curves (currently disabled in code, as all IPO-related
tools will need to be made aware of this)
* Sliders for IPO-Curve Channels of the active Action-Channel
Diffstat (limited to 'source/blender/src/editipo_lib.c')
-rw-r--r-- | source/blender/src/editipo_lib.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/source/blender/src/editipo_lib.c b/source/blender/src/editipo_lib.c index f32e1816b2d..8707e5dd12c 100644 --- a/source/blender/src/editipo_lib.c +++ b/source/blender/src/editipo_lib.c @@ -40,6 +40,8 @@ #include "BKE_ipo.h" #include "BKE_utildefines.h" +#include "BIF_resources.h" + #include "BSE_edit.h" #include "BSE_editipo_types.h" #include "BSE_editipo.h" @@ -95,6 +97,51 @@ char *ac_ic_names[AC_TOTNAM] = {"LocX", "LocY", "LocZ", "ScaleX", "ScaleY", char *ic_name_empty[1] ={ "" }; char *fluidsim_ic_names[FLUIDSIM_TOTNAM] = { "Fac-Visc", "Fac-Time", "GravX","GravY","GravZ", "VelX","VelY","VelZ", "Active" }; +/* gets the appropriate icon for the given blocktype */ +int geticon_ipo_blocktype(short blocktype) +{ + switch (blocktype) { + case ID_OB: + return ICON_OBJECT; + case ID_PO: + return ICON_POSE_HLT; + case ID_KE: + return ICON_EDIT; + case ID_MA: + return ICON_MATERIAL; + case ID_WO: + return ICON_WORLD; + case ID_CU: + return ICON_CURVE; + case ID_CA: + return ICON_CAMERA; + case ID_LA: + return ICON_LAMP; + case ID_TE: + return ICON_TEXTURE; + case ID_CO: + return ICON_CONSTRAINT; + case ID_FLUIDSIM: + return ICON_WORLD; // uggh + default: + return 0; // what about blank icon? + } +} + +/* get name of ipo-curve (icu should be valid pointer) */ +char *getname_ipocurve(IpoCurve *icu) +{ + switch (icu->blocktype) { + case ID_OB: + return getname_ob_ei(icu->adrcode, 0); /* dummy 2nd arg */ + case ID_PO: + return getname_ac_ei(icu->adrcode); + + default: /* fixme - add all of the other types! */ + return NULL; + } +} + char *getname_ac_ei(int nr) { switch(nr) { |