Cleanup: rename SPACE_IPO -> SPACE_GRAPH

This commit is contained in:
Campbell Barton 2019-02-16 16:42:11 +11:00
parent 9d09eda0a3
commit 2d1c14f036
31 changed files with 92 additions and 92 deletions

View File

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

View File

@ -6791,7 +6791,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) {
else if (sl->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->ads = newdataadr(fd, sipo->ads);
@ -6977,7 +6977,7 @@ static void lib_link_area(FileData *fd, ID *parent_id, ScrArea *area)
}
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)sl;
bDopeSheet *ads = sipo->ads;
@ -7464,7 +7464,7 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, Main
}
}
}
else if (sl->spacetype == SPACE_IPO) {
else if (sl->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)sl;
bDopeSheet *ads = sipo->ads;

View File

@ -136,7 +136,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
if (sl) {
/* first channels for ipo action nla... */
switch (sl->spacetype) {
case SPACE_IPO:
case SPACE_GRAPH:
ar = MEM_callocN(sizeof(ARegion), "area region from do_versions");
BLI_addtail(lb, ar);
ar->regiontype = RGN_TYPE_CHANNELS;
@ -277,7 +277,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
//ar->v2d.flag |= V2D_IS_INITIALISED;
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)sl;
memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D));

View File

@ -681,7 +681,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
while (sa) {
SpaceLink *sl = sa->spacedata.first;
while (sl) {
if (sl->spacetype == SPACE_IPO) {
if (sl->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->v2d.max[0] = 15000.0;
}
@ -873,7 +873,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
SpaceLink *sl;
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_IPO) {
if (sl->spacetype == SPACE_GRAPH) {
SpaceSeq *sseq = (SpaceSeq *)sl;
sseq->v2d.keeptot = 0;
}
@ -2501,7 +2501,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
sact->autosnap = SACTSNAP_FRAME;
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)sl;
sipo->autosnap = SACTSNAP_FRAME;

View File

@ -2870,7 +2870,7 @@ static void write_area_regions(WriteData *wd, ScrArea *area)
writestruct(wd, DATA, GPUDOFSettings, 1, v3d->fx_settings.dof);
}
}
else if (sl->spacetype == SPACE_IPO) {
else if (sl->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)sl;
ListBase tmpGhosts = sipo->runtime.ghost_curves;

View File

@ -166,7 +166,7 @@ static bool acf_show_channel_colors(bAnimContext *ac)
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
showGroupColors = !(sipo->flag & SIPO_NODRAWGCOLORS);
@ -533,7 +533,7 @@ static bool acf_scene_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale)
/* visible only in Graph Editor */
case ACHANNEL_SETTING_VISIBLE:
return ((ac) && (ac->spacetype == SPACE_IPO));
return ((ac) && (ac->spacetype == SPACE_GRAPH));
/* only select and expand supported otherwise */
case ACHANNEL_SETTING_SELECT:
@ -693,7 +693,7 @@ static bool acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, eAnim
/* visible only in Graph Editor */
case ACHANNEL_SETTING_VISIBLE:
return ((ac) && (ac->spacetype == SPACE_IPO) && (ob->adt));
return ((ac) && (ac->spacetype == SPACE_GRAPH) && (ob->adt));
/* only select and expand supported otherwise */
case ACHANNEL_SETTING_SELECT:
@ -701,7 +701,7 @@ static bool acf_object_setting_valid(bAnimContext *ac, bAnimListElem *ale, eAnim
return true;
case ACHANNEL_SETTING_ALWAYS_VISIBLE:
return ((ac) && (ac->spacetype == SPACE_IPO) && (ob->adt));
return ((ac) && (ac->spacetype == SPACE_GRAPH) && (ob->adt));
default:
return false;
@ -861,10 +861,10 @@ static bool acf_group_setting_valid(bAnimContext *ac, bAnimListElem *UNUSED(ale)
/* conditionally supported */
case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
return (ac->spacetype == SPACE_IPO);
return (ac->spacetype == SPACE_GRAPH);
case ACHANNEL_SETTING_ALWAYS_VISIBLE:
return (ac->spacetype == SPACE_IPO);
return (ac->spacetype == SPACE_GRAPH);
default: /* always supported */
return true;
@ -887,7 +887,7 @@ static int acf_group_setting_flag(bAnimContext *ac, eAnimChannel_Settings settin
* allowing different collapsing of groups there, since sharing the flag
* proved to be a hazard for workflows...
*/
return (ac->spacetype == SPACE_IPO) ?
return (ac->spacetype == SPACE_GRAPH) ?
AGRP_EXPANDED_G : /* Graph Editor case */
AGRP_EXPANDED; /* DopeSheet and elsewhere */
}
@ -993,7 +993,7 @@ static bool acf_fcurve_setting_valid(bAnimContext *ac, bAnimListElem *ale, eAnim
return false; // NOTE: in this special case, we need to draw ICON_ZOOMOUT
case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
return (ac->spacetype == SPACE_IPO);
return (ac->spacetype == SPACE_GRAPH);
case ACHANNEL_SETTING_ALWAYS_VISIBLE:
return false;
@ -3856,7 +3856,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
* - in Grease Pencil mode, color swatches for layer color
*/
if (ac->sl) {
if ((ac->spacetype == SPACE_IPO) &&
if ((ac->spacetype == SPACE_GRAPH) &&
(acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE)))
{
@ -3956,7 +3956,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
immUniformColor3fv(color);
/* check if we need to show the sliders */
if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH)) {
switch (ac->spacetype) {
case SPACE_ACTION:
{
@ -3964,7 +3964,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
draw_sliders = (saction->flag & SACTION_SLIDERS);
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
draw_sliders = (sipo->flag & SIPO_SLIDERS);
@ -4466,7 +4466,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
* - in Grease Pencil mode, color swatches for layer color
*/
if (ac->sl) {
if ((ac->spacetype == SPACE_IPO) &&
if ((ac->spacetype == SPACE_GRAPH) &&
(acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE) ||
acf->has_setting(ac, ale, ACHANNEL_SETTING_ALWAYS_VISIBLE)))
{
@ -4563,7 +4563,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
short draw_sliders = 0;
/* check if we need to show the sliders */
if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
if ((ac->sl) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_GRAPH)) {
switch (ac->spacetype) {
case SPACE_ACTION:
{
@ -4571,7 +4571,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle
draw_sliders = (saction->flag & SACTION_SLIDERS);
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
draw_sliders = (sipo->flag & SIPO_SLIDERS);

View File

@ -663,7 +663,7 @@ static bool animedit_poll_channels_active(bContext *C)
if (ELEM(NULL, sa, CTX_wm_region(C)))
return 0;
/* animation editor test */
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0)
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA) == 0)
return 0;
return 1;
@ -680,7 +680,7 @@ static bool animedit_poll_channels_nla_tweakmode_off(bContext *C)
if (ELEM(NULL, sa, CTX_wm_region(C)))
return 0;
/* animation editor test */
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0)
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA) == 0)
return 0;
/* NLA TweakMode test */
@ -1437,7 +1437,7 @@ static bool animchannels_grouping_poll(bContext *C)
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)sl;
@ -1844,7 +1844,7 @@ static void setflag_anim_channels(bAnimContext *ac, eAnimChannel_Settings settin
* - but for Graph Editor, this gets used also from main region
* where hierarchy doesn't apply [#21276]
*/
if ((ac->spacetype == SPACE_IPO) && (ac->regiontype != RGN_TYPE_CHANNELS)) {
if ((ac->spacetype == SPACE_GRAPH) && (ac->regiontype != RGN_TYPE_CHANNELS)) {
/* graph editor (case 2) */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_CHANNELS | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_NODUPLIS);
}
@ -2223,7 +2223,7 @@ static bool animchannels_enable_poll(bContext *C)
return 0;
/* animation editor test - Action/Dopesheet/etc. and Graph only */
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO) == 0)
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH) == 0)
return 0;
return 1;
@ -2295,7 +2295,7 @@ static bool animchannels_find_poll(bContext *C)
return 0;
/* animation editor with dopesheet */
return ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA);
return ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA);
}
/* find_invoke() - Get initial channels */

View File

@ -330,7 +330,7 @@ void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, boo
/* Get flags used for normalization in ANIM_unit_mapping_get_factor. */
short ANIM_get_normalization_flags(bAnimContext *ac)
{
if (ac->sl->spacetype == SPACE_IPO) {
if (ac->sl->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *) ac->sl;
bool use_normalization = (sipo->flag & SIPO_NORMALIZE) != 0;
bool freeze_normalization = (sipo->flag & SIPO_NORMALIZE_FREEZE) != 0;

View File

@ -357,7 +357,7 @@ bool ANIM_animdata_context_getdata(bAnimContext *ac)
ok = actedit_get_context(ac, saction);
break;
}
case SPACE_IPO:
case SPACE_GRAPH:
{
SpaceGraph *sipo = (SpaceGraph *)sl;
ok = graphedit_get_context(ac, sipo);

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) && !(((SpaceGraph *)mm->slink)->flag & SIPO_DRAWTIME)) ||
((mm->slink->spacetype == SPACE_GRAPH) && !(((SpaceGraph *)mm->slink)->flag & SIPO_DRAWTIME)) ||
((mm->slink->spacetype == SPACE_NLA) && !(((SpaceNla *)mm->slink)->flag & SNLA_DRAWTIME)))
{
return true;

View File

@ -71,7 +71,7 @@ static bool change_frame_poll(bContext *C)
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
return true;
}
else if (sa->spacetype == SPACE_IPO) {
else if (sa->spacetype == SPACE_GRAPH) {
/* NOTE: Graph Editor has special version which does some extra stuff.
* No need to show the generic error message for that case though!
*/
@ -286,7 +286,7 @@ static bool anim_set_end_frames_poll(bContext *C)
* this shouldn't show up in 3D editor (or others without 2D timeline view) via search
*/
if (sa) {
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_GRAPH, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
return true;
}
}

View File

@ -359,8 +359,8 @@ typedef enum eAnimFilter_Flags {
/* Action Channel Group */
#define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED) == 0)
#define EXPANDED_AGRP(ac, agrp) \
( ((!(ac) || ((ac)->spacetype != SPACE_IPO)) && (agrp->flag & AGRP_EXPANDED)) || \
(( (ac) && ((ac)->spacetype == SPACE_IPO)) && (agrp->flag & AGRP_EXPANDED_G)) )
( ((!(ac) || ((ac)->spacetype != SPACE_GRAPH)) && (agrp->flag & AGRP_EXPANDED)) || \
(( (ac) && ((ac)->spacetype == SPACE_GRAPH)) && (agrp->flag & AGRP_EXPANDED_G)) )
#define SEL_AGRP(agrp) ((agrp->flag & AGRP_SELECTED) || (agrp->flag & AGRP_ACTIVE))
/* F-Curve Channels */
#define EDITABLE_FCU(fcu) ((fcu->flag & FCURVE_PROTECTED) == 0)

View File

@ -114,7 +114,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case SPACE_VIEW3D:
ts = &btheme->space_view3d;
break;
case SPACE_IPO:
case SPACE_GRAPH:
ts = &btheme->space_graph;
break;
case SPACE_FILE:

View File

@ -664,12 +664,12 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "selected_editable_fcurves")) {
bAnimContext ac;
if (ANIM_animdata_get_context(C, &ac) && ELEM(ac.spacetype, SPACE_ACTION, SPACE_IPO)) {
if (ANIM_animdata_get_context(C, &ac) && ELEM(ac.spacetype, SPACE_ACTION, SPACE_GRAPH)) {
bAnimListElem *ale;
ListBase anim_data = {NULL, NULL};
int filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_NODUPLIS | ANIMFILTER_SEL) |
(ac.spacetype == SPACE_IPO ? ANIMFILTER_CURVE_VISIBLE : ANIMFILTER_LIST_VISIBLE);
(ac.spacetype == SPACE_GRAPH ? ANIMFILTER_CURVE_VISIBLE : ANIMFILTER_LIST_VISIBLE);
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);

View File

@ -1345,7 +1345,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync,
if (sa)
spacetype = sa->spacetype;
sad->from_anim_edit = (ELEM(spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA));
sad->from_anim_edit = (ELEM(spacetype, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA));
screen->animtimer->customdata = sad;

View File

@ -205,7 +205,7 @@ bool ED_operator_animview_active(bContext *C)
{
if (ED_operator_areaactive(C)) {
SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C);
if (sl && (ELEM(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO)))
if (sl && (ELEM(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_GRAPH)))
return true;
}
@ -268,7 +268,7 @@ bool ED_operator_node_editable(bContext *C)
bool ED_operator_graphedit_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_IPO);
return ed_spacetype_test(C, SPACE_GRAPH);
}
bool ED_operator_sequencer_active(bContext *C)
@ -2528,7 +2528,7 @@ static void areas_do_frame_follow(bContext *C, bool middle)
/* do follow here if editor type supports it */
if ((scr->redraws_flag & TIME_FOLLOW)) {
if ((ar->regiontype == RGN_TYPE_WINDOW &&
ELEM(sa->spacetype, SPACE_SEQ, SPACE_IPO, SPACE_ACTION, SPACE_NLA)) ||
ELEM(sa->spacetype, SPACE_SEQ, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA)) ||
(sa->spacetype == SPACE_CLIP && ar->regiontype == RGN_TYPE_PREVIEW))
{
float w = BLI_rctf_size_x(&ar->v2d.cur);
@ -3861,7 +3861,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws,
if ((redraws & TIME_ALL_3D_WIN) || from_anim_edit)
return 1;
break;
case SPACE_IPO:
case SPACE_GRAPH:
case SPACE_NLA:
if ((redraws & TIME_ALL_ANIM_WIN) || from_anim_edit)
return 1;
@ -3898,7 +3898,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws,
}
else if (regiontype == RGN_TYPE_CHANNELS) {
switch (spacetype) {
case SPACE_IPO:
case SPACE_GRAPH:
case SPACE_ACTION:
case SPACE_NLA:
if (redraws & TIME_ALL_ANIM_WIN)
@ -4082,7 +4082,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
/* do follow here if editor type supports it */
if ((sad->redraws & TIME_FOLLOW)) {
if ((ar->regiontype == RGN_TYPE_WINDOW &&
ELEM(sa->spacetype, SPACE_SEQ, SPACE_IPO, SPACE_ACTION, SPACE_NLA)) ||
ELEM(sa->spacetype, SPACE_SEQ, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA)) ||
(sa->spacetype == SPACE_CLIP && ar->regiontype == RGN_TYPE_PREVIEW))
{
float w = BLI_rctf_size_x(&ar->v2d.cur);

View File

@ -2815,7 +2815,7 @@ static bool graph_driver_delete_invalid_poll(bContext *C)
ScrArea *sa = CTX_wm_area(C);
/* firstly, check if in Graph Editor */
if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH))
return 0;
/* try to init Anim-Context stuff ourselves and check */

View File

@ -488,7 +488,7 @@ void ED_operatormacros_graph(void)
void graphedit_keymap(wmKeyConfig *keyconf)
{
/* keymap for all regions */
WM_keymap_ensure(keyconf, "Graph Editor Generic", SPACE_IPO, 0);
WM_keymap_ensure(keyconf, "Graph Editor Generic", SPACE_GRAPH, 0);
/* channels */
/* Channels are not directly handled by the Graph Editor module, but are inherited from the Animation module.
@ -497,5 +497,5 @@ void graphedit_keymap(wmKeyConfig *keyconf)
*/
/* keyframes */
WM_keymap_ensure(keyconf, "Graph Editor", SPACE_IPO, 0);
WM_keymap_ensure(keyconf, "Graph Editor", SPACE_GRAPH, 0);
}

View File

@ -139,7 +139,7 @@ bool graphop_visible_keyframes_poll(bContext *C)
/* firstly, check if in Graph Editor */
// TODO: also check for region?
if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH))
return 0;
/* try to init Anim-Context stuff ourselves and check */
@ -188,7 +188,7 @@ bool graphop_editable_keyframes_poll(bContext *C)
/* firstly, check if in Graph Editor */
// TODO: also check for region?
if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH))
return 0;
/* try to init Anim-Context stuff ourselves and check */
@ -235,7 +235,7 @@ bool graphop_active_fcurve_poll(bContext *C)
/* firstly, check if in Graph Editor */
// TODO: also check for region?
if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH))
return 0;
/* try to init Anim-Context stuff ourselves and check */
@ -276,7 +276,7 @@ bool graphop_selected_fcurve_poll(bContext *C)
/* firstly, check if in Graph Editor */
// TODO: also check for region?
if ((sa == NULL) || (sa->spacetype != SPACE_IPO))
if ((sa == NULL) || (sa->spacetype != SPACE_GRAPH))
return 0;
/* try to init Anim-Context stuff ourselves and check */

View File

@ -96,7 +96,7 @@ static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
/* Graph Editor - general stuff */
sipo = MEM_callocN(sizeof(SpaceGraph), "init graphedit");
sipo->spacetype = SPACE_IPO;
sipo->spacetype = SPACE_GRAPH;
sipo->autosnap = SACTSNAP_FRAME;
@ -213,9 +213,9 @@ static void graph_main_region_init(wmWindowManager *wm, ARegion *ar)
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
/* own keymap */
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor", SPACE_IPO, 0);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor", SPACE_GRAPH, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor Generic", SPACE_GRAPH, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@ -365,7 +365,7 @@ static void graph_channel_region_init(wmWindowManager *wm, ARegion *ar)
/* own keymap */
keymap = WM_keymap_ensure(wm->defaultconf, "Animation Channels", 0, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor Generic", SPACE_GRAPH, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@ -415,7 +415,7 @@ static void graph_buttons_region_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor Generic", SPACE_IPO, 0);
keymap = WM_keymap_ensure(wm->defaultconf, "Graph Editor Generic", SPACE_GRAPH, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@ -646,7 +646,7 @@ static void graph_refresh_fcurve_colors(const bContext *C)
if (ANIM_animdata_get_context(C, &ac) == false)
return;
UI_SetTheme(SPACE_IPO, RGN_TYPE_WINDOW);
UI_SetTheme(SPACE_GRAPH, RGN_TYPE_WINDOW);
/* build list of F-Curves which will be visible as channels in channel-region
* - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
@ -833,7 +833,7 @@ void ED_spacetype_ipo(void)
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype ipo");
ARegionType *art;
st->spaceid = SPACE_IPO;
st->spaceid = SPACE_GRAPH;
strncpy(st->name, "Graph", BKE_ST_MAXNAME);
st->new = graph_new;

View File

@ -213,7 +213,7 @@ static bool transdata_check_local_center(TransInfo *t, short around)
(t->flag & (T_OBJECT | T_POSE)) ||
/* implicit: (t->flag & T_EDIT) */
(ELEM(t->obedit_type, OB_MESH, OB_CURVE, OB_MBALL, OB_ARMATURE, OB_GPENCIL)) ||
(t->spacetype == SPACE_IPO) ||
(t->spacetype == SPACE_GRAPH) ||
(t->options & (CTX_MOVIECLIP | CTX_MASK | CTX_PAINT_CURVE)))
);
}
@ -276,7 +276,7 @@ void setTransformViewAspect(TransInfo *t, float r_aspect[3])
ED_space_clip_get_aspect(sclip, &r_aspect[0], &r_aspect[1]);
}
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
/* depemds on context of usage */
}
}
@ -343,7 +343,7 @@ void convertViewVec(TransInfo *t, float r_vec[3], double dx, double dy)
r_vec[0] *= t->aspect[0];
r_vec[1] *= t->aspect[1];
}
else if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
else if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_NLA)) {
convertViewVec2D(t->view, r_vec, dx, dy);
}
else if (ELEM(t->spacetype, SPACE_NODE, SPACE_SEQ)) {
@ -425,7 +425,7 @@ void projectIntViewEx(TransInfo *t, const float vec[3], int adr[2], const eV3DPr
adr[0] = out[0];
adr[1] = out[1];
}
else if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) {
else if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_NLA)) {
int out[2] = {0, 0};
UI_view2d_view_to_region((View2D *)t->view, vec[0], vec[1], &out[0], &out[1]);
@ -599,7 +599,7 @@ static void viewRedrawForce(const bContext *C, TransInfo *t)
//SpaceAction *saction = (SpaceAction *)t->sa->spacedata.first;
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
//SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
}
@ -683,7 +683,7 @@ static void viewRedrawPost(bContext *C, TransInfo *t)
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWVIEW3D, 0);
}
else if (ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_IPO)) {
else if (ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_GRAPH)) {
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWACTION, 0);
allqueue(REDRAWNLA, 0);
@ -2101,7 +2101,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if ((prop = RNA_struct_find_property(op->ptr, "proportional")) &&
!RNA_property_is_set(op->ptr, prop))
{
if (t->spacetype == SPACE_IPO)
if (t->spacetype == SPACE_GRAPH)
ts->proportional_fcurve = proportional;
else if (t->spacetype == SPACE_ACTION)
ts->proportional_action = proportional;
@ -2316,7 +2316,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
SPACE_TYPE_ANY, RGN_TYPE_ANY,
helpline_poll, drawHelpline, t);
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
//t->draw_handle_pixel = ED_region_draw_cb_activate(t->ar->type, drawTransformPixel, t, REGION_DRAW_POST_PIXEL);
t->draw_handle_cursor = WM_paint_cursor_activate(
@ -2522,7 +2522,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
/* same as TFM_TIME_EXTEND, but we need the mode info for later
* so that duplicate-culling will work properly
*/
if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA))
if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_NLA))
initTranslation(t);
else
initTimeTranslate(t);
@ -2534,7 +2534,7 @@ bool initTransform(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
* (for Graph/NLA Editors only since they uses 'standard' transforms to get 2D movement)
* depending on which editor this was called from
*/
if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA))
if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_NLA))
initTranslation(t);
else
initTimeTranslate(t);
@ -4696,7 +4696,7 @@ static void initSnapSpatial(TransInfo *t, float r_snap[3])
r_snap[1] = ED_node_grid_size();
r_snap[2] = ED_node_grid_size();
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
r_snap[0] = 0.0f;
r_snap[1] = 1.0;
r_snap[2] = 0.1f;
@ -4740,7 +4740,7 @@ static void initTranslation(TransInfo *t)
t->num.unit_type[2] = B_UNIT_LENGTH;
}
else {
/* SPACE_IPO, SPACE_ACTION, etc. could use some time units, when we have them... */
/* SPACE_GRAPH, SPACE_ACTION, etc. could use some time units, when we have them... */
t->num.unit_type[0] = B_UNIT_NONE;
t->num.unit_type[1] = B_UNIT_NONE;
t->num.unit_type[2] = B_UNIT_NONE;
@ -8679,7 +8679,7 @@ static short getAnimEdit_SnapMode(TransInfo *t)
if (saction)
autosnap = saction->autosnap;
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
if (sipo)

View File

@ -804,7 +804,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
else if (t->spacetype == SPACE_IMAGE) {
GPU_matrix_scale_2f(1.0f / t->aspect[0], 1.0f / t->aspect[1]);
}
else if (ELEM(t->spacetype, SPACE_IPO, SPACE_ACTION)) {
else if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_ACTION)) {
/* only scale y */
rcti *mask = &t->ar->v2d.mask;
rctf *datamask = &t->ar->v2d.cur;

View File

@ -6705,7 +6705,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
/* clear flag that was set for time-slide drawing */
saction->flag &= ~SACTION_MOVING;
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = (SpaceGraph *)t->sa->spacedata.first;
bAnimContext ac;
const bool use_handle = (sipo->flag & SIPO_NOHANDLES) == 0;
@ -6962,7 +6962,7 @@ int special_transform_moving(TransInfo *t)
if (t->spacetype == SPACE_SEQ) {
return G_TRANSFORM_SEQ;
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
return G_TRANSFORM_FCURVES;
}
else if ((t->flag & T_EDIT) || (t->flag & T_POSE)) {
@ -8716,7 +8716,7 @@ void createTransData(bContext *C, TransInfo *t)
createTransSeqData(C, t);
countAndCleanTransDataContainer(t);
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
t->flag |= T_POINTS | T_2D_EDIT;
t->obedit_type = -1;

View File

@ -1117,7 +1117,7 @@ void recalcData(TransInfo *t)
else if (t->spacetype == SPACE_SEQ) {
recalcData_sequencer(t);
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
recalcData_graphedit(t);
}
else if (t->spacetype == SPACE_NODE) {
@ -1483,7 +1483,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
t->view = &ar->v2d;
t->around = V3D_AROUND_CENTER_BOUNDS;
}
else if (t->spacetype == SPACE_IPO) {
else if (t->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = sa->spacedata.first;
t->view = &ar->v2d;
t->around = sipo->around;
@ -1575,7 +1575,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
/* use settings from scene only if modal */
if (t->flag & T_MODAL) {
if ((t->options & CTX_NO_PET) == 0) {
if (t->spacetype == SPACE_IPO) {
if (t->spacetype == SPACE_GRAPH) {
t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_fcurve);
}
else if (t->spacetype == SPACE_ACTION) {
@ -1716,7 +1716,7 @@ void postTrans(bContext *C, TransInfo *t)
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
/* free data malloced per trans-data */
if (ELEM(t->obedit_type, OB_CURVE, OB_SURF) ||
(t->spacetype == SPACE_IPO))
(t->spacetype == SPACE_GRAPH))
{
TransData *td = tc->data;
for (int a = 0; a < tc->data_len; a++, td++) {
@ -2058,7 +2058,7 @@ static void calculateCenter_FromAround(TransInfo *t, int around, float r_center[
case V3D_AROUND_CURSOR:
if (ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP))
calculateCenterCursor2D(t, r_center);
else if (t->spacetype == SPACE_IPO)
else if (t->spacetype == SPACE_GRAPH)
calculateCenterCursorGraph2D(t, r_center);
else
calculateCenterCursor(t, r_center);

View File

@ -1517,7 +1517,7 @@ static void applyGridIncrement(TransInfo *t, float *val, int max_index, const fl
if (use_aspect) {
/* custom aspect for fcurve */
if (t->spacetype == SPACE_IPO) {
if (t->spacetype == SPACE_GRAPH) {
View2D *v2d = &t->ar->v2d;
View2DGrid *grid;
SpaceGraph *sipo = t->sa->spacedata.first;

View File

@ -1595,7 +1595,7 @@ typedef struct SpaceStatusBar {
typedef enum eSpace_Type {
SPACE_EMPTY = 0,
SPACE_VIEW3D = 1,
SPACE_IPO = 2,
SPACE_GRAPH = 2,
SPACE_OUTLINER = 3,
SPACE_PROPERTIES = 4,
SPACE_FILE = 5,

View File

@ -74,7 +74,7 @@ const EnumPropertyItem rna_enum_space_type_items[] = {
{0, "", ICON_NONE, "Animation", ""},
//{SPACE_ACTION, "TIMELINE", ICON_TIME, "Timeline", "Timeline and playback controls (NOTE: Switch to 'Timeline' mode)"}, /* XXX */
{SPACE_ACTION, "DOPESHEET_EDITOR", ICON_ACTION, "Dope Sheet", "Adjust timing of keyframes"},
{SPACE_IPO, "GRAPH_EDITOR", ICON_GRAPH, "Graph Editor", "Edit drivers and keyframe interpolation"},
{SPACE_GRAPH, "GRAPH_EDITOR", ICON_GRAPH, "Graph Editor", "Edit drivers and keyframe interpolation"},
{SPACE_NLA, "NLA_EDITOR", ICON_NLA, "Nonlinear Animation", "Combine and layer Actions"},
/* Scripting */
@ -385,7 +385,7 @@ static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
switch (space->spacetype) {
case SPACE_VIEW3D:
return &RNA_SpaceView3D;
case SPACE_IPO:
case SPACE_GRAPH:
return &RNA_SpaceGraphEditor;
case SPACE_OUTLINER:
return &RNA_SpaceOutliner;

View File

@ -205,7 +205,7 @@ PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args)
static eSpace_Type rna_Space_refine_reverse(StructRNA *srna)
{
if (srna == &RNA_SpaceView3D) return SPACE_VIEW3D;
if (srna == &RNA_SpaceGraphEditor) return SPACE_IPO;
if (srna == &RNA_SpaceGraphEditor) return SPACE_GRAPH;
if (srna == &RNA_SpaceOutliner) return SPACE_OUTLINER;
if (srna == &RNA_SpaceProperties) return SPACE_PROPERTIES;
if (srna == &RNA_SpaceFileBrowser) return SPACE_FILE;

View File

@ -382,7 +382,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
case SPACE_VIEW3D:
km = WM_keymap_find_all(C, "3D View", sl->spacetype, 0);
break;
case SPACE_IPO:
case SPACE_GRAPH:
km = WM_keymap_find_all(C, "Graph Editor", sl->spacetype, 0);
break;
case SPACE_ACTION:

View File

@ -476,7 +476,7 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr
CTX_TEST_SPACE_TYPE(SPACE_IMAGE, "space_data.uv_editor", space_data);
CTX_TEST_SPACE_TYPE(SPACE_VIEW3D, "space_data.fx_settings", &(CTX_wm_view3d(C)->fx_settings));
CTX_TEST_SPACE_TYPE(SPACE_NLA, "space_data.dopesheet", CTX_wm_space_nla(C)->ads);
CTX_TEST_SPACE_TYPE(SPACE_IPO, "space_data.dopesheet", CTX_wm_space_graph(C)->ads);
CTX_TEST_SPACE_TYPE(SPACE_GRAPH, "space_data.dopesheet", CTX_wm_space_graph(C)->ads);
CTX_TEST_SPACE_TYPE(SPACE_ACTION, "space_data.dopesheet", &(CTX_wm_space_action(C)->ads));
CTX_TEST_SPACE_TYPE(SPACE_FILE, "space_data.params", CTX_wm_space_file(C)->params);
break;

View File

@ -947,7 +947,7 @@ wmWindow *WM_window_open_temp(bContext *C, int x, int y, int sizex, int sizey, i
ED_area_newspace(C, sa, SPACE_IMAGE, false);
}
else if (type == WM_WINDOW_DRIVERS) {
ED_area_newspace(C, sa, SPACE_IPO, false);
ED_area_newspace(C, sa, SPACE_GRAPH, false);
}
else {
ED_area_newspace(C, sa, SPACE_USERPREF, false);
@ -967,7 +967,7 @@ wmWindow *WM_window_open_temp(bContext *C, int x, int y, int sizex, int sizey, i
title = IFACE_("Blender Preferences");
else if (sa->spacetype == SPACE_FILE)
title = IFACE_("Blender File View");
else if (sa->spacetype == SPACE_IPO)
else if (sa->spacetype == SPACE_GRAPH)
title = IFACE_("Blender Drivers Editor");
else
title = "Blender";