diff options
Diffstat (limited to 'source/blender/editors/space_graph/graph_buttons.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index e0b62722d57..c1e3d855e7d 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -139,6 +139,13 @@ static void graph_panel_view(const bContext *C, Panel *pa) row = uiLayoutSplit(sub, 0.7f, true); uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE); uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE); + + col = uiLayoutColumn(pa->layout, false); + uiItemR(col, &spaceptr, "show_backdrop", 0, NULL, ICON_NONE); + col = uiLayoutColumn(pa->layout, false); + uiLayoutSetActive(col, RNA_boolean_get(&spaceptr, "show_backdrop")); + uiItemR(col, &spaceptr, "backdrop_camera", 0, "Camera", ICON_NONE); + uiItemR(col, &spaceptr, "backdrop_opacity", 0, "Opacity", ICON_NONE); } /* ******************* active F-Curve ************** */ @@ -883,6 +890,7 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) FModifier *fcm; uiLayout *col, *row; uiBlock *block; + bool active; if (!graph_panel_context(C, &ale, &fcu)) return; @@ -907,9 +915,11 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste"); } + active = !(fcu->flag & FCURVE_MOD_OFF); /* draw each modifier */ for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) { col = uiLayoutColumn(pa->layout, true); + uiLayoutSetActive(col, active); ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm); } @@ -917,6 +927,21 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) MEM_freeN(ale); } +/* ******************* Others ************************ */ + +/* Graph Editor Backdrop Settings */ +static void UNUSED_FUNCTION(graph_panel_backdrop)(const bContext *C, Panel *UNUSED(pa)) +{ + bScreen *sc = CTX_wm_screen(C); + SpaceIpo *sipo = CTX_wm_space_graph(C); + PointerRNA spaceptr; + // uiLayout *col; + + /* get RNA pointers for use when creating the UI elements */ + RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr); + +} + /* ******************* general ******************************** */ void graph_buttons_register(ARegionType *art) @@ -928,7 +953,6 @@ void graph_buttons_register(ARegionType *art) strcpy(pt->label, N_("View Properties")); strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA); pt->draw = graph_panel_view; - pt->flag |= PNL_DEFAULT_CLOSED; BLI_addtail(&art->paneltypes, pt); pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel properties"); |