Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_graph/space_graph.c
| Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene) | ||||
| sipo->autosnap = SACTSNAP_FRAME; | sipo->autosnap = SACTSNAP_FRAME; | ||||
| /* allocate DopeSheet data for Graph Editor */ | /* allocate DopeSheet data for Graph Editor */ | ||||
| sipo->ads = MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet"); | sipo->ads = MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet"); | ||||
| sipo->ads->source = (ID *)scene; | sipo->ads->source = (ID *)scene; | ||||
| /* settings for making it easier by default to just see what you're interested in tweaking */ | /* settings for making it easier by default to just see what you're interested in tweaking */ | ||||
| sipo->ads->filterflag |= ADS_FILTER_ONLYSEL; | sipo->ads->filterflag |= ADS_FILTER_ONLYSEL; | ||||
| sipo->flag |= SIPO_SELVHANDLESONLY | SIPO_MARKER_LINES; | sipo->flag |= SIPO_SELVHANDLESONLY | SIPO_SHOW_MARKERS; | ||||
| /* header */ | /* header */ | ||||
| ar = MEM_callocN(sizeof(ARegion), "header for graphedit"); | ar = MEM_callocN(sizeof(ARegion), "header for graphedit"); | ||||
| BLI_addtail(&sipo->regionbase, ar); | BLI_addtail(&sipo->regionbase, ar); | ||||
| ar->regiontype = RGN_TYPE_HEADER; | ar->regiontype = RGN_TYPE_HEADER; | ||||
| ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP; | ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP; | ||||
| ▲ Show 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | if (sipo->mode != SIPO_MODE_DRIVERS) { | ||||
| } | } | ||||
| ANIM_draw_cfra(C, v2d, cfra_flag); | ANIM_draw_cfra(C, v2d, cfra_flag); | ||||
| } | } | ||||
| /* markers */ | /* markers */ | ||||
| if (sipo->mode != SIPO_MODE_DRIVERS) { | if (sipo->mode != SIPO_MODE_DRIVERS) { | ||||
| UI_view2d_view_orthoSpecial(ar, v2d, 1); | UI_view2d_view_orthoSpecial(ar, v2d, 1); | ||||
| int marker_draw_flag = DRAW_MARKERS_MARGIN; | int marker_draw_flag = DRAW_MARKERS_MARGIN; | ||||
| if (sipo->flag & SIPO_MARKER_LINES) { | if (sipo->flag & SIPO_SHOW_MARKERS) { | ||||
| marker_draw_flag |= DRAW_MARKERS_LINES; | |||||
| } | |||||
| ED_markers_draw(C, marker_draw_flag); | ED_markers_draw(C, marker_draw_flag); | ||||
| } | } | ||||
| } | |||||
| /* preview range */ | /* preview range */ | ||||
| if (sipo->mode != SIPO_MODE_DRIVERS) { | if (sipo->mode != SIPO_MODE_DRIVERS) { | ||||
| UI_view2d_view_ortho(v2d); | UI_view2d_view_ortho(v2d); | ||||
| ANIM_draw_previewrange(C, v2d, 0); | ANIM_draw_previewrange(C, v2d, 0); | ||||
| } | } | ||||
| /* callback */ | /* callback */ | ||||
| ▲ Show 20 Lines • Show All 599 Lines • Show Last 20 Lines | |||||