diff --git a/release/scripts/ui/space_dopesheet.py b/release/scripts/ui/space_dopesheet.py index d53443a3fb5..4416f3128a8 100644 --- a/release/scripts/ui/space_dopesheet.py +++ b/release/scripts/ui/space_dopesheet.py @@ -73,6 +73,7 @@ class DOPESHEET_MT_view(bpy.types.Menu): layout.column() + layout.prop(st, "realtime_updates") layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_sliders") layout.prop(st, "automerge_keyframes") diff --git a/release/scripts/ui/space_graph.py b/release/scripts/ui/space_graph.py index d97fa2bfeed..c1d3b87a9de 100644 --- a/release/scripts/ui/space_graph.py +++ b/release/scripts/ui/space_graph.py @@ -68,9 +68,10 @@ class GRAPH_MT_view(bpy.types.Menu): layout.column() - layout.separator() layout.operator("graph.properties", icon='MENU_PANEL') - + layout.separator() + + layout.prop(st, "realtime_updates") layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_cursor") layout.prop(st, "show_sliders") diff --git a/release/scripts/ui/space_nla.py b/release/scripts/ui/space_nla.py index 0060941b476..b83e2d12625 100644 --- a/release/scripts/ui/space_nla.py +++ b/release/scripts/ui/space_nla.py @@ -58,6 +58,8 @@ class NLA_MT_view(bpy.types.Menu): layout.operator("nla.properties", icon='MENU_PANEL') layout.separator() + + layout.prop(st, "realtime_updates") layout.prop(st, "show_cframe_indicator") layout.operator("anim.time_toggle", text="Show Frames" if st.show_seconds else "Show Seconds") 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);