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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-01-20 14:20:20 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-20 14:20:20 +0300
commit6307c65534f6d5cf29d08220cea0dbcca9a0e118 (patch)
treeddfe6aff3abd1b49156029c84504d3e753fd624b /source
parent09424badda213ea71aaded574b8004bae6fae4f6 (diff)
Animation Editors: Restored 'Realtime Updates' toggle
- In 2.4x, this setting was the lock button in the headers. - Now, this option can be found in the View menus of all relevant editors - Basically, this option toggles whether objects (using animation data that's being edited) get updated during animation editor transforms to give realtime feedback on the effects of tweaks. - By default, this is enabled, since this fits in nicer with 2.5's everything 'live' paradigm. However, it is recommended to disable this on slower computers or when updates for heavy rigs are causing too much workflow lag - Also, removed some old crufty settings from action editor data
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/transform/transform_generics.c28
-rw-r--r--source/blender/makesdna/DNA_action_types.h14
-rw-r--r--source/blender/makesdna/DNA_space_types.h14
-rw-r--r--source/blender/makesrna/intern/rna_space.c18
5 files changed, 53 insertions, 23 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 0b63dd73cda..44199832156 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -159,7 +159,7 @@ static short actedit_get_context (bAnimContext *ac, SpaceAction *saction)
switch (saction->mode) {
case SACTCONT_ACTION: /* 'Action Editor' */
/* if not pinned, sync with active object */
- if (saction->pin == 0) {
+ if (/*saction->pin == 0*/0) {
if (ac->obact && ac->obact->adt)
saction->action = ac->obact->adt->action;
else
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 3be863fc3f7..e719f1cf133 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -335,6 +335,7 @@ void recalcData(TransInfo *t)
}
else if (t->spacetype == SPACE_ACTION) {
Scene *scene= t->scene;
+ SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
@@ -358,10 +359,14 @@ void recalcData(TransInfo *t)
filter= (ANIMFILTER_VISIBLE | ANIMFILTER_ANIMDATA);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- /* just tag these animdata-blocks to recalc, assuming that some data there changed */
- for (ale= anim_data.first; ale; ale= ale->next) {
- /* set refresh tags for objects using this animation */
- ANIM_list_elem_update(t->scene, ale);
+ /* just tag these animdata-blocks to recalc, assuming that some data there changed
+ * BUT only do this if realtime updates are enabled
+ */
+ if ((saction->flag & SACTION_NOREALTIMEUPDATES) == 0) {
+ for (ale= anim_data.first; ale; ale= ale->next) {
+ /* set refresh tags for objects using this animation */
+ ANIM_list_elem_update(t->scene, ale);
+ }
}
/* now free temp channels */
@@ -369,6 +374,7 @@ void recalcData(TransInfo *t)
}
else if (t->spacetype == SPACE_IPO) {
Scene *scene;
+ SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
ListBase anim_data = {NULL, NULL};
bAnimContext ac;
@@ -408,8 +414,11 @@ void recalcData(TransInfo *t)
else
calchandles_fcurve(fcu);
- /* set refresh tags for objects using this animation */
- ANIM_list_elem_update(t->scene, ale);
+ /* set refresh tags for objects using this animation,
+ * BUT only if realtime updates are enabled
+ */
+ if ((sipo->flag & SIPO_NOREALTIMEUPDATES) == 0)
+ ANIM_list_elem_update(t->scene, ale);
}
/* do resort and other updates? */
@@ -439,8 +448,11 @@ void recalcData(TransInfo *t)
if (tdn->handle == 0)
continue;
- /* set refresh tags for objects using this animation */
- ANIM_id_update(t->scene, tdn->id);
+ /* set refresh tags for objects using this animation,
+ * BUT only if realtime updates are enabled
+ */
+ if ((snla->flag & SNLA_NOREALTIMEUPDATES) == 0)
+ ANIM_id_update(t->scene, tdn->id);
/* if cancelling transform, just write the values without validating, then move on */
if (t->state == TRANS_CANCEL) {
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index dbc715ba87f..646a724299e 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -558,9 +558,7 @@ typedef struct SpaceAction {
bDopeSheet ads; /* the currently active context (when not showing action) */
char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */
- short flag, actnr; /* flag: bitmapped settings; */
- short pin, lock; /* pin: keep showing current action; actnr: used for finding chosen action from menu; lock: lock time to other windows */
- short actwidth; /* width of the left-hand side name panel (in pixels?) */ // XXX depreceated!
+ short flag; /* flag: bitmapped settings; */
float timeslide; /* for Time-Slide transform mode drawing - current frame? */
} SpaceAction;
@@ -568,24 +566,26 @@ typedef struct SpaceAction {
typedef enum eSAction_Flag {
/* during transform (only set for TimeSlide) */
SACTION_MOVING = (1<<0),
- /* show sliders (if relevant) */
+ /* show sliders */
SACTION_SLIDERS = (1<<1),
/* draw time in seconds instead of time in frames */
SACTION_DRAWTIME = (1<<2),
/* don't filter action channels according to visibility */
- SACTION_NOHIDE = (1<<3),
+ //SACTION_NOHIDE = (1<<3), // XXX depreceated... old animation system
/* don't kill overlapping keyframes after transform */
SACTION_NOTRANSKEYCULL = (1<<4),
/* don't include keyframes that are out of view */
- SACTION_HORIZOPTIMISEON = (1<<5),
+ //SACTION_HORIZOPTIMISEON = (1<<5), // XXX depreceated... old irrelevant trick
/* hack for moving pose-markers (temp flag) */
SACTION_POSEMARKERS_MOVE = (1<<6),
/* don't draw action channels using group colours (where applicable) */
- SACTION_NODRAWGCOLORS = (1<<7),
+ SACTION_NODRAWGCOLORS = (1<<7), // XXX depreceated... irrelevant for current groups implementation
/* don't draw current frame number beside frame indicator */
SACTION_NODRAWCFRANUM = (1<<8),
/* temporary flag to force channel selections to be synced with main */
SACTION_TEMP_NEEDCHANSYNC = (1<<9),
+ /* don't perform realtime updates */
+ SACTION_NOREALTIMEUPDATES = (1<<10),
} eSAction_Flag;
/* SpaceAction Mode Settings */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index c4eed2fcce2..4a7866d7058 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -750,6 +750,8 @@ enum FileSortTypeE {
#define SIPO_SELVHANDLESONLY (1<<9)
/* temporary flag to force channel selections to be synced with main */
#define SIPO_TEMP_NEEDCHANSYNC (1<<10)
+ /* don't perform realtime updates */
+#define SIPO_NOREALTIMEUPDATES (1<<11)
/* SpaceIpo->mode (Graph Editor Mode) */
enum {
@@ -835,15 +837,15 @@ enum {
#define IMS_INFILESLI 4
/* nla->flag */
- // depreceated
-#define SNLA_ALLKEYED (1<<0)
- // depreceated
-#define SNLA_ACTIVELAYERS (1<<1)
-
+/* flags (1<<0), (1<<1), and (1<<3) are depreceated flags from old blenders */
+ /* draw timing in seconds instead of frames */
#define SNLA_DRAWTIME (1<<2)
-#define SNLA_NOTRANSKEYCULL (1<<3)
+ /* don't draw frame number beside frame indicator */
#define SNLA_NODRAWCFRANUM (1<<4)
+ /* don't draw influence curves on strips */
#define SNLA_NOSTRIPCURVES (1<<5)
+ /* don't perform realtime updates */
+#define SNLA_NOREALTIMEUPDATES (1<<6)
/* time->flag */
/* show timing in frames instead of in seconds */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 88c2eb9d121..4d742c5d4d6 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -449,7 +449,7 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *bmain, Scene *scene, Po
Object *obact= (scene->basact)? scene->basact->object: NULL;
/* we must set this action to be the one used by active object (if not pinned) */
- if(obact && saction->pin == 0) {
+ if(obact/* && saction->pin == 0*/) {
AnimData *adt= BKE_id_add_animdata(&obact->id); /* this only adds if non-existant */
/* set action */
@@ -1342,6 +1342,11 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOTRANSKEYCULL);
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
+
+ prop= RNA_def_property(srna, "realtime_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SACTION_NOREALTIMEUPDATES);
+ RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_DOPESHEET, NULL);
/* dopesheet */
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
@@ -1426,6 +1431,11 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Show handles of Bezier control points.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+ prop= RNA_def_property(srna, "realtime_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOREALTIMEUPDATES);
+ RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming keyframes, changes to the animation data are flushed to other views.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
+
/* cursor */
prop= RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCURSOR);
@@ -1489,6 +1499,12 @@ static void rna_def_space_nla(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOSTRIPCURVES);
RNA_def_property_ui_text(prop, "Show Control Curves", "Show influence curves on strips.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
+
+ /* editing */
+ prop= RNA_def_property(srna, "realtime_updates", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SNLA_NOREALTIMEUPDATES);
+ RNA_def_property_ui_text(prop, "Realtime Updates", "When transforming strips, changes to the animation data are flushed to other views.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NLA, NULL);
/* dopesheet */
prop= RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);