DNA: rename SpaceIpo -> SpaceGraph

This commit is contained in:
2019-02-16 10:16:16 +11:00
parent 374cbdc63b
commit 419911b1d1
26 changed files with 79 additions and 78 deletions

View File

@@ -167,7 +167,7 @@ struct SpaceSeq *CTX_wm_space_seq(const bContext *C);
struct SpaceOutliner *CTX_wm_space_outliner(const bContext *C);
struct SpaceNla *CTX_wm_space_nla(const bContext *C);
struct SpaceNode *CTX_wm_space_node(const bContext *C);
struct SpaceIpo *CTX_wm_space_graph(const bContext *C);
struct SpaceGraph *CTX_wm_space_graph(const bContext *C);
struct SpaceAction *CTX_wm_space_action(const bContext *C);
struct SpaceInfo *CTX_wm_space_info(const bContext *C);
struct SpaceUserPref *CTX_wm_space_userpref(const bContext *C);

View File

@@ -774,7 +774,7 @@ struct SpaceNode *CTX_wm_space_node(const bContext *C)
return NULL;
}
struct SpaceIpo *CTX_wm_space_graph(const bContext *C)
struct SpaceGraph *CTX_wm_space_graph(const bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if (sa && sa->spacetype == SPACE_IPO)

View File

@@ -6792,7 +6792,7 @@ static void direct_link_area(FileData *fd, ScrArea *area)
blo_do_versions_view3d_split_250(v3d, &sl->regionbase);
}
else if (sl->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->ads = newdataadr(fd, sipo->ads);
BLI_listbase_clear(&sipo->runtime.ghost_curves);
@@ -6979,7 +6979,7 @@ static void lib_link_area(FileData *fd, ID *parent_id, ScrArea *area)
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
bDopeSheet *ads = sipo->ads;
if (ads) {
@@ -7465,7 +7465,7 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, Main
}
}
else if (sl->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
bDopeSheet *ads = sipo->ads;
if (ads) {

View File

@@ -279,7 +279,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D));
/* init mainarea view2d */

View File

@@ -682,7 +682,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
SpaceLink *sl = sa->spacedata.first;
while (sl) {
if (sl->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->v2d.max[0] = 15000.0;
}
sl = sl->next;
@@ -2503,7 +2503,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->autosnap = SACTSNAP_FRAME;
break;
}

View File

@@ -2871,13 +2871,13 @@ static void write_area_regions(WriteData *wd, ScrArea *area)
}
}
else if (sl->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
ListBase tmpGhosts = sipo->runtime.ghost_curves;
/* temporarily disable ghost curves when saving */
BLI_listbase_clear(&sipo->runtime.ghost_curves);
writestruct(wd, DATA, SpaceIpo, 1, sl);
writestruct(wd, DATA, SpaceGraph, 1, sl);
if (sipo->ads) {
writestruct(wd, DATA, bDopeSheet, 1, sipo->ads);
}

View File

@@ -168,7 +168,7 @@ static bool acf_show_channel_colors(bAnimContext *ac)
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
showGroupColors = !(sipo->flag & SIPO_NODRAWGCOLORS);
break;
@@ -3966,7 +3966,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
draw_sliders = (sipo->flag & SIPO_SLIDERS);
break;
}
@@ -4573,7 +4573,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
draw_sliders = (sipo->flag & SIPO_SLIDERS);
break;
}

View File

@@ -1439,7 +1439,7 @@ static bool animchannels_grouping_poll(bContext *C)
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
/* drivers can't have groups... */
if (sipo->mode != SIPO_MODE_ANIMATION)

View File

@@ -331,7 +331,7 @@ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, boo
short ANIM_get_normalization_flags(bAnimContext *ac)
{
if (ac->sl->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *) ac->sl;
SpaceGraph *sipo = (SpaceGraph *) ac->sl;
bool use_normalization = (sipo->flag & SIPO_NORMALIZE) != 0;
bool freeze_normalization = (sipo->flag & SIPO_NORMALIZE_FREEZE) != 0;
return use_normalization

View File

@@ -268,7 +268,7 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
/* ----------- Private Stuff - Graph Editor ------------- */
/* Get data being edited in Graph Editor (depending on current 'mode') */
static bool graphedit_get_context(bAnimContext *ac, SpaceIpo *sipo)
static bool graphedit_get_context(bAnimContext *ac, SpaceGraph *sipo)
{
/* init dopesheet data if non-existent (i.e. for old files) */
if (sipo->ads == NULL) {
@@ -359,7 +359,7 @@ bool ANIM_animdata_context_getdata(bAnimContext *ac)
}
case SPACE_IPO:
{
SpaceIpo *sipo = (SpaceIpo *)sl;
SpaceGraph *sipo = (SpaceGraph *)sl;
ok = graphedit_get_context(ac, sipo);
break;
}

View File

@@ -712,7 +712,7 @@ static bool ed_marker_move_use_time(MarkerMove *mm)
{
if (((mm->slink->spacetype == SPACE_SEQ) && !(((SpaceSeq *)mm->slink)->flag & SEQ_DRAWFRAMES)) ||
((mm->slink->spacetype == SPACE_ACTION) && (((SpaceAction *)mm->slink)->flag & SACTION_DRAWTIME)) ||
((mm->slink->spacetype == SPACE_IPO) && !(((SpaceIpo *)mm->slink)->flag & SIPO_DRAWTIME)) ||
((mm->slink->spacetype == SPACE_IPO) && !(((SpaceGraph *)mm->slink)->flag & SIPO_DRAWTIME)) ||
((mm->slink->spacetype == SPACE_NLA) && !(((SpaceNla *)mm->slink)->flag & SNLA_DRAWTIME)))
{
return true;

View File

@@ -108,7 +108,7 @@ static bool graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
static void graph_panel_view(const bContext *C, Panel *pa)
{
bScreen *sc = CTX_wm_screen(C);
SpaceIpo *sipo = CTX_wm_space_graph(C);
SpaceGraph *sipo = CTX_wm_space_graph(C);
Scene *scene = CTX_data_scene(C);
PointerRNA spaceptr, sceneptr;
uiLayout *col, *sub, *row;
@@ -576,7 +576,7 @@ static void driver_update_flags_cb(bContext *UNUSED(C), void *fcu_v, void *UNUSE
/* drivers panel poll */
static bool graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceIpo *sipo = CTX_wm_space_graph(C);
SpaceGraph *sipo = CTX_wm_space_graph(C);
if (sipo->mode != SIPO_MODE_DRIVERS)
return 0;

View File

@@ -304,7 +304,7 @@ static void draw_fcurve_vertices(ARegion *ar, FCurve *fcu, bool do_handles, bool
/* Handles ---------------- */
static bool draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
static bool draw_fcurve_handles_check(SpaceGraph *sipo, FCurve *fcu)
{
/* don't draw handle lines if handles are not to be shown */
if (
@@ -332,7 +332,7 @@ static bool draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
/* draw lines for F-Curve handles only (this is only done in EditMode)
* note: draw_fcurve_handles_check must be checked before running this. */
static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
static void draw_fcurve_handles(SpaceGraph *sipo, FCurve *fcu)
{
int sel, b;
@@ -446,7 +446,7 @@ static void draw_fcurve_sample_control(float x, float y, float xscale, float ysc
}
/* helper func - draw keyframe vertices only for an F-Curve */
static void draw_fcurve_samples(SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
static void draw_fcurve_samples(SpaceGraph *sipo, ARegion *ar, FCurve *fcu)
{
FPoint *first, *last;
float hsize, xscale, yscale;
@@ -485,7 +485,7 @@ static void draw_fcurve_samples(SpaceIpo *sipo, ARegion *ar, FCurve *fcu)
/* helper func - just draw the F-Curve by sampling the visible region (for drawing curves with modifiers) */
static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d, View2DGrid *grid, unsigned int pos)
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
ChannelDriver *driver;
float samplefreq;
float stime, etime;
@@ -965,7 +965,7 @@ static void graph_draw_driver_debug(bAnimContext *ac, ID *id, FCurve *fcu)
/* Draw the 'ghost' F-Curves (i.e. snapshots of the curve)
* NOTE: unit mapping has already been applied to the values, so do not try and apply again
*/
void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
void graph_draw_ghost_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *ar)
{
FCurve *fcu;
@@ -1013,7 +1013,7 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
/* This is called twice from space_graph.c -> graph_main_region_draw()
* Unselected then selected F-Curves are drawn so that they do not occlude each other.
*/
void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel)
void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *ar, View2DGrid *grid, short sel)
{
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;

View File

@@ -332,7 +332,7 @@ void GRAPH_OT_view_frame(wmOperatorType *ot)
/* Bake each F-Curve into a set of samples, and store as a ghost curve */
static void create_ghost_curves(bAnimContext *ac, int start, int end)
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
int filter;
@@ -448,12 +448,12 @@ void GRAPH_OT_ghost_curves_create(wmOperatorType *ot)
static int graphkeys_clear_ghostcurves_exec(bContext *C, wmOperator *UNUSED(op))
{
bAnimContext ac;
SpaceIpo *sipo;
SpaceGraph *sipo;
/* get editor data */
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
sipo = (SpaceIpo *)ac.sl;
sipo = (SpaceGraph *)ac.sl;
/* if no ghost curves, don't do anything */
if (BLI_listbase_is_empty(&sipo->runtime.ghost_curves)) {
@@ -520,7 +520,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
size_t num_items;
ReportList *reports = ac->reports;
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
struct Depsgraph *depsgraph = ac->depsgraph;
Scene *scene = ac->scene;
ToolSettings *ts = scene->toolsettings;
@@ -2030,7 +2030,7 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *UNUSED(op))
/* set the new current frame and cursor values, based on the average time and value */
if (ked.i1) {
SpaceIpo *sipo = (SpaceIpo *)ac.sl;
SpaceGraph *sipo = (SpaceGraph *)ac.sl;
Scene *scene = ac.scene;
/* take the average values, rounding to the nearest int as necessary for int results */
@@ -2094,7 +2094,7 @@ static void snap_graph_keys(bAnimContext *ac, short mode)
bAnimListElem *ale;
int filter;
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
KeyframeEditData ked;
KeyframeEditFunc edit_cb;
float cursor_value = 0.0f;
@@ -2221,7 +2221,7 @@ static void mirror_graph_keys(bAnimContext *ac, short mode)
bAnimListElem *ale;
int filter;
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
KeyframeEditData ked;
KeyframeEditFunc edit_cb;
float cursor_value = 0.0f;

View File

@@ -26,7 +26,7 @@
struct ARegion;
struct ARegionType;
struct ScrArea;
struct SpaceIpo;
struct SpaceGraph;
struct View2DGrid;
struct bAnimContext;
struct bAnimListElem;
@@ -42,8 +42,8 @@ struct ARegion *graph_has_buttons_region(struct ScrArea *sa);
/* graph_draw.c */
void graph_draw_channel_names(struct bContext *C, struct bAnimContext *ac, struct ARegion *ar);
void graph_draw_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar, struct View2DGrid *grid, short sel);
void graph_draw_ghost_curves(struct bAnimContext *ac, struct SpaceIpo *sipo, struct ARegion *ar);
void graph_draw_curves(struct bAnimContext *ac, struct SpaceGraph *sipo, struct ARegion *ar, struct View2DGrid *grid, short sel);
void graph_draw_ghost_curves(struct bAnimContext *ac, struct SpaceGraph *sipo, struct ARegion *ar);
/* ***************************************** */
/* graph_select.c */

View File

@@ -75,7 +75,7 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
SpaceIpo *sipo = CTX_wm_space_graph(C);
SpaceGraph *sipo = CTX_wm_space_graph(C);
/* this isn't technically "frame", but it'll do... */
float frame = RNA_float_get(op->ptr, "frame");

View File

@@ -83,7 +83,7 @@ void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channel
bAnimListElem *ale;
int filter;
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
KeyframeEditData ked = {{NULL}};
KeyframeEditFunc test_cb, sel_cb;
@@ -235,7 +235,7 @@ static void box_select_graphkeys(
bAnimListElem *ale;
int filter, mapping_flag;
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
KeyframeEditData ked;
KeyframeEditFunc ok_cb, select_cb;
View2D *v2d = &ac->ar->v2d;
@@ -453,7 +453,7 @@ static int graphkeys_lassoselect_exec(bContext *C, wmOperator *op)
selectmode = SELECT_SUBTRACT;
{
SpaceIpo *sipo = (SpaceIpo *)ac.sl;
SpaceGraph *sipo = (SpaceGraph *)ac.sl;
if (selectmode == SELECT_ADD) {
incl_handles = ((sipo->flag & SIPO_SELVHANDLESONLY) ||
(sipo->flag & SIPO_NOHANDLES)) == 0;
@@ -530,7 +530,7 @@ static int graph_circle_select_exec(bContext *C, wmOperator *op)
rect_fl.ymax = y + radius;
{
SpaceIpo *sipo = (SpaceIpo *)ac.sl;
SpaceGraph *sipo = (SpaceGraph *)ac.sl;
if (selectmode == SELECT_ADD) {
incl_handles = ((sipo->flag & SIPO_SELVHANDLESONLY) ||
(sipo->flag & SIPO_NOHANDLES)) == 0;
@@ -1113,7 +1113,7 @@ typedef enum eGraphVertIndex {
/* check if its ok to select a handle */
// XXX also need to check for int-values only?
static bool fcurve_handle_sel_check(SpaceIpo *sipo, BezTriple *bezt)
static bool fcurve_handle_sel_check(SpaceGraph *sipo, BezTriple *bezt)
{
if (sipo->flag & SIPO_NOHANDLES) return 0;
if ((sipo->flag & SIPO_SELVHANDLESONLY) && BEZT_ISSEL_ANY(bezt) == 0) return 0;
@@ -1183,7 +1183,7 @@ static void get_nearest_fcurve_verts_list(bAnimContext *ac, const int mval[2], L
bAnimListElem *ale;
int filter;
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
View2D *v2d = &ac->ar->v2d;
short mapping_flag = 0;
@@ -1307,7 +1307,7 @@ static tNearestVertInfo *find_nearest_fcurve_vert(bAnimContext *ac, const int mv
/* option 1) select keyframe directly under mouse */
static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_mode, short curves_only)
{
SpaceIpo *sipo = (SpaceIpo *)ac->sl;
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
tNearestVertInfo *nvi;
BezTriple *bezt = NULL;

View File

@@ -56,7 +56,7 @@
/* NOTE: Currently called from windowmanager (new drivers editor window) and RNA (mode switching) */
void ED_drivers_editor_init(bContext *C, ScrArea *sa)
{
SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)sa->spacedata.first;
/* Set mode */
sipo->mode = SIPO_MODE_DRIVERS;

View File

@@ -92,10 +92,10 @@ ARegion *graph_has_buttons_region(ScrArea *sa)
static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
{
ARegion *ar;
SpaceIpo *sipo;
SpaceGraph *sipo;
/* Graph Editor - general stuff */
sipo = MEM_callocN(sizeof(SpaceIpo), "init graphedit");
sipo = MEM_callocN(sizeof(SpaceGraph), "init graphedit");
sipo->spacetype = SPACE_IPO;
sipo->autosnap = SACTSNAP_FRAME;
@@ -162,7 +162,7 @@ static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
/* not spacelink itself */
static void graph_free(SpaceLink *sl)
{
SpaceIpo *si = (SpaceIpo *)sl;
SpaceGraph *si = (SpaceGraph *)sl;
if (si->ads) {
BLI_freelistN(&si->ads->chanbase);
@@ -178,7 +178,7 @@ static void graph_free(SpaceLink *sl)
/* spacetype; init callback */
static void graph_init(struct wmWindowManager *wm, ScrArea *sa)
{
SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)sa->spacedata.first;
/* init dopesheet data if non-existent (i.e. for old files) */
if (sipo->ads == NULL) {
@@ -196,10 +196,10 @@ static void graph_init(struct wmWindowManager *wm, ScrArea *sa)
static SpaceLink *graph_duplicate(SpaceLink *sl)
{
SpaceIpo *sipon = MEM_dupallocN(sl);
SpaceGraph *sipon = MEM_dupallocN(sl);
/* clear or remove stuff from old */
BLI_duplicatelist(&sipon->runtime.ghost_curves, &((SpaceIpo *)sl)->runtime.ghost_curves);
BLI_duplicatelist(&sipon->runtime.ghost_curves, &((SpaceGraph *)sl)->runtime.ghost_curves);
sipon->ads = MEM_dupallocN(sipon->ads);
return (SpaceLink *)sipon;
@@ -222,7 +222,7 @@ static void graph_main_region_init(wmWindowManager *wm, ARegion *ar)
static void graph_main_region_draw(const bContext *C, ARegion *ar)
{
/* draw entirely, view changes should be handled here */
SpaceIpo *sipo = CTX_wm_space_graph(C);
SpaceGraph *sipo = CTX_wm_space_graph(C);
Scene *scene = CTX_data_scene(C);
bAnimContext ac;
View2D *v2d = &ar->v2d;
@@ -565,7 +565,7 @@ static void graph_region_message_subscribe(
/* editor level listener */
static void graph_listener(wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn, Scene *UNUSED(scene))
{
SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)sa->spacedata.first;
/* context changes */
switch (wmn->category) {
@@ -755,7 +755,7 @@ static void graph_refresh_fcurve_colors(const bContext *C)
static void graph_refresh(const bContext *C, ScrArea *sa)
{
SpaceIpo *sipo = (SpaceIpo *)sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)sa->spacedata.first;
/* updates to data needed depends on Graph Editor mode... */
switch (sipo->mode) {
@@ -797,7 +797,7 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id)
{
SpaceIpo *sgraph = (SpaceIpo *)slink;
SpaceGraph *sgraph = (SpaceGraph *)slink;
if (sgraph->ads) {
if ((ID *)sgraph->ads->filter_grp == old_id) {
@@ -811,13 +811,13 @@ static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID
static int graph_space_subtype_get(ScrArea *sa)
{
SpaceIpo *sgraph = sa->spacedata.first;
SpaceGraph *sgraph = sa->spacedata.first;
return sgraph->mode;
}
static void graph_space_subtype_set(ScrArea *sa, int value)
{
SpaceIpo *sgraph = sa->spacedata.first;
SpaceGraph *sgraph = sa->spacedata.first;
sgraph->mode = value;
}

View File

@@ -600,7 +600,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t)
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
else if (t->spacetype == SPACE_IPO) {
//SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
//SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
else if (t->spacetype == SPACE_NLA) {
@@ -8680,7 +8680,7 @@ static short getAnimEdit_SnapMode(TransInfo *t)
autosnap = saction->autosnap;
}
else if (t->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
if (sipo)
autosnap = sipo->autosnap;

View File

@@ -4507,7 +4507,7 @@ static void graph_key_shortest_dist(TransInfo *t, FCurve *fcu, TransData *td_sta
static void createTransGraphEditData(bContext *C, TransInfo *t)
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
Scene *scene = t->scene;
ARegion *ar = t->ar;
View2D *v2d = &ar->v2d;
@@ -4996,7 +4996,7 @@ static void beztmap_to_data(TransInfo *t, FCurve *fcu, BeztMap *bezms, int totve
*/
void remake_graph_transdata(TransInfo *t, ListBase *anim_data)
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
bAnimListElem *ale;
const bool use_handle = (sipo->flag & SIPO_NOHANDLES) == 0;
@@ -5030,7 +5030,7 @@ void remake_graph_transdata(TransInfo *t, ListBase *anim_data)
*/
void flushTransGraphData(TransInfo *t)
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
TransData *td;
TransData2D *td2d;
TransDataGraph *tdg;
@@ -6706,7 +6706,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
saction->flag &= ~SACTION_MOVING;
}
else if (t->spacetype == SPACE_IPO) {
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
bAnimContext ac;
const bool use_handle = (sipo->flag & SIPO_NOHANDLES) == 0;

View File

@@ -397,7 +397,7 @@ static void recalcData_actedit(TransInfo *t)
/* helper for recalcData() - for Graph Editor transforms */
static void recalcData_graphedit(TransInfo *t)
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
ViewLayer *view_layer = t->view_layer;
ListBase anim_data = {NULL, NULL};
@@ -1484,7 +1484,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->around = V3D_AROUND_CENTER_BOUNDS;
}
else if (t->spacetype == SPACE_IPO) {
SpaceIpo *sipo = sa->spacedata.first;
SpaceGraph *sipo = sa->spacedata.first;
t->view = &ar->v2d;
t->around = sipo->around;
}
@@ -1931,7 +1931,7 @@ void calculateCenterCursor2D(TransInfo *t, float r_center[2])
void calculateCenterCursorGraph2D(TransInfo *t, float r_center[2])
{
SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
Scene *scene = t->scene;
/* cursor is combination of current frame, and graph-editor cursor value */

View File

@@ -1520,7 +1520,7 @@ static void applyGridIncrement(TransInfo *t, float *val, int max_index, const fl
if (t->spacetype == SPACE_IPO) {
View2D *v2d = &t->ar->v2d;
View2DGrid *grid;
SpaceIpo *sipo = t->sa->spacedata.first;
SpaceGraph *sipo = t->sa->spacedata.first;
int unity = V2D_UNIT_VALUES;
int unitx = (sipo->flag & SIPO_DRAWTIME) ? V2D_UNIT_SECONDS : V2D_UNIT_FRAMESCALE;

View File

@@ -48,7 +48,7 @@ struct MovieClip;
struct MovieClipScopes;
struct Scopes;
struct Script;
struct SpaceIpo;
struct SpaceGraph;
struct Text;
struct bDopeSheet;
struct bGPdata;
@@ -359,16 +359,16 @@ typedef enum eSpaceOutliner_Search_Flags {
/** \name Graph Editor
* \{ */
typedef struct SpaceIpo_Runtime {
typedef struct SpaceGraph_Runtime {
/** #eGraphEdit_Runtime_Flag */
char flag;
char _pad[7];
/** Sampled snapshots of F-Curves used as in-session guides */
ListBase ghost_curves;
} SpaceIpo_Runtime;
} SpaceGraph_Runtime;
/* 'Graph' Editor (formerly known as the IPO Editor) */
typedef struct SpaceIpo {
typedef struct SpaceGraph {
SpaceLink *next, *prev;
/** Storage of regions for inactive spaces. */
ListBase regionbase;
@@ -402,11 +402,11 @@ typedef struct SpaceIpo {
int around;
int pad;
SpaceIpo_Runtime runtime;
} SpaceIpo;
SpaceGraph_Runtime runtime;
} SpaceGraph;
/* SpaceIpo.flag (Graph Editor Settings) */
/* SpaceGraph.flag (Graph Editor Settings) */
typedef enum eGraphEdit_Flag {
/* OLD DEPRECEATED SETTING */
/* SIPO_LOCK_VIEW = (1 << 0), */
@@ -441,7 +441,7 @@ typedef enum eGraphEdit_Flag {
SIPO_NORMALIZE_FREEZE = (1 << 15),
} eGraphEdit_Flag;
/* SpaceIpo.mode (Graph Editor Mode) */
/* SpaceGraph.mode (Graph Editor Mode) */
typedef enum eGraphEdit_Mode {
/* all animation curves (from all over Blender) */
SIPO_MODE_ANIMATION = 0,

View File

@@ -40,6 +40,7 @@
/* Match RNA names where possible, keep sorted. */
DNA_STRUCT_RENAME(SpaceIpo, SpaceGraph)
DNA_STRUCT_RENAME(SpaceOops, SpaceOutliner)
DNA_STRUCT_RENAME_ELEM(Camera, YF_dofdist, dof_distance)

View File

@@ -1585,7 +1585,7 @@ static void rna_SpaceDopeSheetEditor_mode_update(bContext *C, PointerRNA *ptr)
static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *ptr)
{
ScrArea *sa = rna_area_from_space(ptr);
SpaceIpo *sipo = (SpaceIpo *)ptr->data;
SpaceGraph *sipo = (SpaceGraph *)ptr->data;
/* for "Drivers" mode, enable all the necessary bits and pieces */
if (sipo->mode == SIPO_MODE_DRIVERS) {
@@ -1601,7 +1601,7 @@ static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *pt
static bool rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
{
SpaceIpo *sipo = (SpaceIpo *)(ptr->data);
SpaceGraph *sipo = (SpaceGraph *)(ptr->data);
return (BLI_listbase_is_empty(&sipo->runtime.ghost_curves) == false);
}
@@ -4078,7 +4078,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
srna = RNA_def_struct(brna, "SpaceGraphEditor", "Space");
RNA_def_struct_sdna(srna, "SpaceIpo");
RNA_def_struct_sdna(srna, "SpaceGraph");
RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data");
/* mode */