diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-10 03:46:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-10 04:19:18 +0300 |
commit | 9df2b6da3a718323dbe9431c5a4b43fc309fa4b9 (patch) | |
tree | c6e65efa197bfe184811dfaa0b6b9d12d9ca52e8 /source/blender/editors/space_graph | |
parent | d7ef1af22bf48f00607ba86e1344e1467e6e5e53 (diff) |
DNA: add runtime struct to for graph & action editor
Move struct members, no functional change
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 19 |
3 files changed, 17 insertions, 16 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 6823a4343a7..2cbbeda4abf 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -932,8 +932,8 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) if ((sipo->flag & SIPO_BEAUTYDRAW_OFF) == 0) glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); - /* the ghost curves are simply sampled F-Curves stored in sipo->ghostCurves */ - for (fcu = sipo->ghostCurves.first; fcu; fcu = fcu->next) { + /* the ghost curves are simply sampled F-Curves stored in sipo->runtime.ghost_curves */ + for (fcu = sipo->runtime.ghost_curves.first; fcu; fcu = fcu->next) { /* set whatever color the curve has set * - this is set by the function which creates these * - draw with a fixed opacity of 2 diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 3086e189a7a..cd00959e7d2 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -344,7 +344,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) int filter; /* free existing ghost curves */ - free_fcurves(&sipo->ghostCurves); + free_fcurves(&sipo->runtime.ghost_curves); /* sanity check */ if (start >= end) { @@ -395,7 +395,7 @@ static void create_ghost_curves(bAnimContext *ac, int start, int end) gcu->color[2] = fcu->color[2] - 0.07f; /* store new ghost curve */ - BLI_addtail(&sipo->ghostCurves, gcu); + BLI_addtail(&sipo->runtime.ghost_curves, gcu); /* restore driver */ fcu->driver = driver; @@ -462,11 +462,11 @@ static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op)) sipo = (SpaceIpo *)ac.sl; /* if no ghost curves, don't do anything */ - if (BLI_listbase_is_empty(&sipo->ghostCurves)) + if (BLI_listbase_is_empty(&sipo->runtime.ghost_curves)) { return OPERATOR_CANCELLED; - + } /* free ghost curves */ - free_fcurves(&sipo->ghostCurves); + free_fcurves(&sipo->runtime.ghost_curves); /* update this editor only */ ED_area_tag_redraw(CTX_wm_area(C)); diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index cfa42cab3e7..fead6efa2b5 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -173,8 +173,9 @@ static void graph_free(SpaceLink *sl) MEM_freeN(si->ads); } - if (si->ghostCurves.first) - free_fcurves(&si->ghostCurves); + if (si->runtime.ghost_curves.first) { + free_fcurves(&si->runtime.ghost_curves); + } } @@ -202,7 +203,7 @@ static SpaceLink *graph_duplicate(SpaceLink *sl) SpaceIpo *sipon = MEM_dupallocN(sl); /* clear or remove stuff from old */ - BLI_duplicatelist(&sipon->ghostCurves, &((SpaceIpo *)sl)->ghostCurves); + BLI_duplicatelist(&sipon->runtime.ghost_curves, &((SpaceIpo *)sl)->runtime.ghost_curves); sipon->ads = MEM_dupallocN(sipon->ads); return (SpaceLink *)sipon; @@ -476,7 +477,7 @@ static void graph_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) switch (wmn->data) { case ND_OB_ACTIVE: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_OB_SELECT: - sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; + sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC; ED_area_tag_refresh(sa); break; @@ -489,7 +490,7 @@ static void graph_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) switch (wmn->data) { case ND_BONE_SELECT: /* selection changed, so force refresh to flush (needs flag set to do syncing) */ case ND_BONE_ACTIVE: - sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; + sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC; ED_area_tag_refresh(sa); break; case ND_TRANSFORM: @@ -503,7 +504,7 @@ static void graph_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) case NC_NODE: if (wmn->action == NA_SELECTED) { /* selection changed, so force refresh to flush (needs flag set to do syncing) */ - sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; + sipo->runtime.flag |= SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC; ED_area_tag_refresh(sa); } break; @@ -512,7 +513,7 @@ static void graph_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) ED_area_tag_redraw(sa); break; case NC_WINDOW: - if (sipo->flag & SIPO_TEMP_NEEDCHANSYNC) { + if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC) { /* force redraw/refresh after undo/redo - prevents "black curve" problem */ ED_area_tag_refresh(sa); } @@ -669,9 +670,9 @@ static void graph_refresh(const bContext *C, ScrArea *sa) /* update the state of the animchannels in response to changes from the data they represent * NOTE: the temp flag is used to indicate when this needs to be done, and will be cleared once handled */ - if (sipo->flag & SIPO_TEMP_NEEDCHANSYNC) { + if (sipo->runtime.flag & SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC) { ANIM_sync_animchannels_to_data(C); - sipo->flag &= ~SIPO_TEMP_NEEDCHANSYNC; + sipo->runtime.flag &= ~SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC; ED_area_tag_redraw(sa); } |