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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-12 21:10:24 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-12 21:10:24 +0400
commit55ca0e7636b77a408ea70bf3117eff569e49954b (patch)
tree88560249a92547e6f94698e369b11201cf28ea39 /source/blender/makesdna
parent1719b86f74a757998c6edc8ffc578a14c724d1ff (diff)
Make dopesheet settings per-tracking data
It was a bit confusing to synchronize settings used in pre-calculated dopesheet channels which was storing in tracking data with settings used for display which is in space data. This was initially done by converting one flags to other and checking if space's settings matches pre-calculated one, but that had several issues if two different dopesheet are using different settings: - Channels would be re-calculated on every redraw for each of spaces - Dopesheet operators could fail due to the could be using channels calculated for other space. That was also quite nasty code checking if requested settings matches pre-calculated one.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_space_types.h19
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h18
2 files changed, 16 insertions, 21 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index cb905d7f768..e9a07bfbf29 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -1006,11 +1006,7 @@ typedef struct SpaceClip {
void *draw_context;
- /* dopesheet */
- short dope_sort; /* sort order in dopesheet view */
- short dope_flag; /* dopsheet view flags */
-
- int around; /* pivot point for transforms */
+ int around, pad4; /* pivot point for transforms */
/* **** mask editing **** */
struct Mask *mask;
@@ -1058,19 +1054,6 @@ typedef enum eSpaceClip_View {
SC_VIEW_DOPESHEET,
} eSpaceClip_View;
-/* SpaceClip->dope_sort */
-typedef enum eSpaceClip_Dopesheet_Sort {
- SC_DOPE_SORT_NAME = 0,
- SC_DOPE_SORT_LONGEST,
- SC_DOPE_SORT_TOTAL,
- SC_DOPE_SORT_AVERAGE_ERROR,
-} eSpaceClip_Dopesheet_Sort;
-
-/* SpaceClip->dope_flag */
-typedef enum eSpaceClip_Dopesheet_Flag {
- SC_DOPE_SORT_INVERSE = (1 << 0),
-} eSpaceClip_Dopesheet_Flag;
-
/* SpaceClip->gpencil_src */
typedef enum eSpaceClip_GPencil_Source {
SC_GPENCIL_SRC_CLIP = 0,
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index 84ae1835751..850d4361ab7 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -238,13 +238,16 @@ typedef struct MovieTrackingDopesheetChannel {
} MovieTrackingDopesheetChannel;
typedef struct MovieTrackingDopesheet {
- int ok, pad; /* flag if dopesheet information is still relevant */
+ int ok; /* flag if dopesheet information is still relevant */
+ short sort_method; /* method to be used to sort tracks */
+ short flag; /* dopesheet building flag such as inverted order of sort */
+
+ /* runtime stuff */
ListBase channels;
int tot_channel;
- short sort_method; /* method to be used to sort tracks */
- short sort_inverse; /* order of tracks is inverted */
+ int pad;
} MovieTrackingDopesheet;
typedef struct MovieTracking {
@@ -347,4 +350,13 @@ enum {
#define TRACKING_CLEAN_DELETE_TRACK 1
#define TRACKING_CLEAN_DELETE_SEGMENT 2
+/* MovieTrackingDopesheet->sort_method */
+#define TRACKING_DOPE_SORT_NAME 0
+#define TRACKING_DOPE_SORT_LONGEST 1
+#define TRACKING_DOPE_SORT_TOTAL 2
+#define TRACKING_DOPE_SORT_AVERAGE_ERROR 3
+
+/* MovieTrackingDopesheet->flag */
+#define TRACKING_DOPE_SORT_INVERSE (1 << 0)
+
#endif