Code cleanups - whitespace

This commit is contained in:
Joshua Leung
2012-04-29 13:20:28 +00:00
parent 40489e378d
commit d3d93ee4a2

View File

@@ -551,21 +551,21 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
* TODO: find a way to module the hue so that not all curves have same color...
*/
float *col= fcu->color;
switch (fcu->array_index) {
case 0:
col[0]= 1.0f; col[1]= 0.0f; col[2]= 0.0f;
break;
case 1:
col[0]= 0.0f; col[1]= 1.0f; col[2]= 0.0f;
break;
case 2:
col[0]= 0.0f; col[1]= 0.0f; col[2]= 1.0f;
break;
default:
/* 'unknown' color - bluish so as to not conflict with handles */
col[0]= 0.3f; col[1]= 0.8f; col[2]= 1.0f;
break;
case 0:
col[0] = 1.0f; col[1] = 0.0f; col[2] = 0.0f;
break;
case 1:
col[0] = 0.0f; col[1] = 1.0f; col[2] = 0.0f;
break;
case 2:
col[0] = 0.0f; col[1] = 0.0f; col[2] = 1.0f;
break;
default:
/* 'unknown' color - bluish so as to not conflict with handles */
col[0] = 0.3f; col[1] = 0.8f; col[2] = 1.0f;
break;
}
}
break;
@@ -596,55 +596,55 @@ void ED_spacetype_ipo(void)
st->spaceid= SPACE_IPO;
strncpy(st->name, "Graph", BKE_ST_MAXNAME);
st->new= graph_new;
st->free= graph_free;
st->init= graph_init;
st->duplicate= graph_duplicate;
st->operatortypes= graphedit_operatortypes;
st->keymap= graphedit_keymap;
st->listener= graph_listener;
st->refresh= graph_refresh;
st->new = graph_new;
st->free = graph_free;
st->init = graph_init;
st->duplicate = graph_duplicate;
st->operatortypes = graphedit_operatortypes;
st->keymap = graphedit_keymap;
st->listener = graph_listener;
st->refresh = graph_refresh;
/* regions: main window */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_WINDOW;
art->init= graph_main_area_init;
art->draw= graph_main_area_draw;
art->listener= graph_region_listener;
art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
art->init = graph_main_area_init;
art->draw = graph_main_area_draw;
art->listener = graph_region_listener;
art->keymapflag = ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_ANIMATION|ED_KEYMAP_FRAMES;
BLI_addhead(&st->regiontypes, art);
/* regions: header */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_HEADER;
art->prefsizey= HEADERY;
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
art->listener= graph_region_listener;
art->init= graph_header_area_init;
art->draw= graph_header_area_draw;
art->prefsizey = HEADERY;
art->keymapflag = ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER;
art->listener = graph_region_listener;
art->init = graph_header_area_init;
art->draw = graph_header_area_draw;
BLI_addhead(&st->regiontypes, art);
/* regions: channels */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_CHANNELS;
art->prefsizex= 200+V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
art->listener= graph_region_listener;
art->init= graph_channel_area_init;
art->draw= graph_channel_area_draw;
art->prefsizex = 200 + V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
art->keymapflag = ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES;
art->listener = graph_region_listener;
art->init = graph_channel_area_init;
art->draw = graph_channel_area_draw;
BLI_addhead(&st->regiontypes, art);
/* regions: UI buttons */
art= MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region");
art->regionid = RGN_TYPE_UI;
art->prefsizex= 200;
art->keymapflag= ED_KEYMAP_UI;
art->listener= graph_region_listener;
art->init= graph_buttons_area_init;
art->draw= graph_buttons_area_draw;
art->prefsizex = 200;
art->keymapflag = ED_KEYMAP_UI;
art->listener = graph_region_listener;
art->init = graph_buttons_area_init;
art->draw = graph_buttons_area_draw;
BLI_addhead(&st->regiontypes, art);