Commit: f5a44de5bf0b996642cd73d783411fda596fe48f
Author: Julian Eisel
Date:   Wed Apr 8 14:46:18 2015 +0200
Branches: wiggly-widgets
https://developer.blender.org/rBf5a44de5bf0b996642cd73d783411fda596fe48f

Graph Editor backdrop: Move settings back to already existing panel

(and remove ugly version check)

===================================================================

M       source/blender/blenloader/intern/versioning_270.c
M       source/blender/editors/space_graph/graph_buttons.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_270.c 
b/source/blender/blenloader/intern/versioning_270.c
index fec2438..1f183a3 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -799,7 +799,7 @@ void blo_do_versions_270(FileData *fd, Library 
*UNUSED(lib), Main *main)
                        }
                }
        }
-       if (!MAIN_VERSION_ATLEAST(main, 275, 0)) {
+       {
                if (!DNA_struct_elem_find(fd->filesdna, "SpaceNode", "float", 
"backdrop_zoom")) {
                        bScreen *sc;
                        for (sc = main->screen.first; sc; sc = sc->id.next) {
diff --git a/source/blender/editors/space_graph/graph_buttons.c 
b/source/blender/editors/space_graph/graph_buttons.c
index d99f923..f4a09bc 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 ************** */
@@ -930,12 +937,6 @@ static void graph_panel_backdrop(const bContext *C, Panel 
*pa)
        /* get RNA pointers for use when creating the UI elements */
        RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr);
 
-       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);
 }
 
 /* ******************* general ******************************** */
@@ -949,7 +950,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");
@@ -984,14 +984,6 @@ void graph_buttons_register(ARegionType *art)
        pt->draw = graph_panel_modifiers;
        pt->poll = graph_panel_poll;
        BLI_addtail(&art->paneltypes, pt);
-
-
-       pt = MEM_callocN(sizeof(PanelType), "spacetype graph panel backdrop");
-       strcpy(pt->idname, "GRAPH_PT_backdrop");
-       strcpy(pt->label, N_("Backdrop"));
-       strcpy(pt->translation_context, BLF_I18NCONTEXT_DEFAULT_BPYRNA);
-       pt->draw = graph_panel_backdrop;
-       BLI_addtail(&art->paneltypes, pt);
 }
 
 static int graph_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to