Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-01-26 14:33:16 +0300
committerJoshua Leung <aligorith@gmail.com>2009-01-26 14:33:16 +0300
commita34e2e1427413b6e116c99e81a58d4535e521a2b (patch)
treee1434d0f2078982369d83a0a11139828eb942e99 /source/blender/makesdna/DNA_space_types.h
parentbf05827319f07d7a7b34ff34d0556cb54f6284d9 (diff)
Animato/2.5 - Graph Editor (i.e. the new 'IPO Editor')
This commit brings back the drawing code for the 'Graph Editor'. I've decided to call it this, as currently it can show either F-Curves for Animation stored in Actions, or F-Curves for Drivers. Currently, it shows all curves, since some of the necessary filtering code (i.e. for limiting curve visibility) hasn't been put in place yet. At least this serves as good proof that we can have F-Curves from multiple sources at least. It should be noted that the code still has to be modified to work with some of the new Animato features, such as F-Curve Modifiers (cycles are an example of one of the features that use this). Also, a nicer way to set the colours of the curves needs to be investigated. Notes: * Fixed a few bugs in RNA User-Preferences wrapping * The keyframe drawing uses the new-style drawing for handles from AnimSys2. There's a minor bug that sometimes occurs, where a distorted handle gets drawn at the origin of the grid on the first run. Hints anyone? * Removed most of the old data from SpaceIpo struct, as the new code uses that. Maybe later, the directories/files at least should get renamed. * Removed ancient hack for NVidia/TNT drivers. It is probably no longer needed, but could be restored if someone needs it.
Diffstat (limited to 'source/blender/makesdna/DNA_space_types.h')
-rw-r--r--source/blender/makesdna/DNA_space_types.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 33a45f76a22..dffea96ce41 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -38,7 +38,6 @@
/* Hum ... Not really nice... but needed for spacebuts. */
#include "DNA_view2d_types.h"
-struct Ipo;
struct ID;
struct Text;
struct Script;
@@ -51,6 +50,7 @@ struct bNodeTree;
struct uiBlock;
struct FileList;
struct bGPdata;
+struct bDopeSheet;
struct FileSelectParams;
struct wmOperator;
struct wmTimer;
@@ -78,6 +78,8 @@ typedef struct SpaceInfo {
short blockhandler[8];
} SpaceInfo;
+/* 'Graph' Editor (formerly known as the IPO Editor) */
+// XXX for now, we keep all old data...
typedef struct SpaceIpo {
SpaceLink *next, *prev;
ListBase regionbase; /* storage of regions for inactive spaces */
@@ -85,25 +87,18 @@ typedef struct SpaceIpo {
float blockscale;
short blockhandler[8];
-
- unsigned int rowbut, pad2;
View2D v2d; /* depricated, copied to region */
- void *editipo;
- ListBase ipokey;
+ // 'IPO keys' - vertical lines for
+ //ListBase ipokey; // XXX it's not clear how these will come back yet
+ //short showkey; // XXX this doesn't need to be restored until ipokeys come back
- /* the ipo context we need to store */
- struct Ipo *ipo;
- struct ID *from;
- char actname[32], constname[32], bonename[32];
-
- short totipo, pin;
- short butofs, channel;
- short showkey, blocktype;
- short menunr, lock;
- short flag, autosnap;
- float median[3];
- rctf tot;
+ struct bDopeSheet *ads; /* settings for filtering animation data (NOTE: we use a pointer due to code-linking issues) */
+
+ short mode; /* mode for the Graph editor (eGraphEdit_Mode) */
+ short flag; /* settings for Graph editor */
+ short autosnap; /* time-transform autosnapping settings for Graph editor (eAnimEdit_AutoSnap in DNA_action_types.h) */
+ char pin, lock;
} SpaceIpo;
typedef struct SpaceButs {
@@ -588,13 +583,21 @@ typedef struct SpaceImaSel {
#define SI_DRAW_STRETCH 1<<21
#define SI_DISPGP 1<<22
-/* SpaceIpo->flag */
+/* SpaceIpo->flag (Graph Editor Settings) */
#define SIPO_LOCK_VIEW (1<<0)
#define SIPO_NOTRANSKEYCULL (1<<1)
#define SIPO_NOHANDLES (1<<2)
#define SIPO_NODRAWCFRANUM (1<<3)
#define SIPO_DRAWTIME (1<<4)
+/* SpaceIpo->mode (Graph Editor Mode) */
+enum {
+ /* all animation curves (from all over Blender) */
+ SIPO_MODE_ANIMATION = 0,
+ /* drivers only */
+ SIPO_MODE_DRIVERS,
+} eGraphEdit_Mode;
+
/* SpaceText flags (moved from DNA_text_types.h) */
#define ST_SCROLL_SELECT 0x0001 // scrollable