From 6991b477d7adcea2426110c9e53482db6b7d3f90 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 20 Jun 2018 18:45:56 +0200 Subject: UI: expose Driver as a space type See: T54744 --- source/blender/makesrna/RNA_enum_types.h | 1 + source/blender/makesrna/intern/rna_space.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index da2705d4660..cb82ab8a88f 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -55,6 +55,7 @@ extern const EnumPropertyItem rna_enum_snap_node_element_items[]; extern const EnumPropertyItem rna_enum_curve_fit_method_items[]; extern const EnumPropertyItem rna_enum_mesh_select_mode_items[]; extern const EnumPropertyItem rna_enum_mesh_delimit_mode_items[]; +extern const EnumPropertyItem rna_enum_space_graph_mode_items[]; extern const EnumPropertyItem rna_enum_space_type_items[]; extern const EnumPropertyItem rna_enum_space_image_mode_items[]; extern const EnumPropertyItem rna_enum_region_type_items[]; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 34d393c7b62..5b1800e808c 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -106,6 +106,12 @@ const EnumPropertyItem rna_enum_space_type_items[] = { {0, NULL, 0, NULL, NULL} }; +const EnumPropertyItem rna_enum_space_graph_mode_items[] = { + {SIPO_MODE_ANIMATION, "FCURVES", ICON_IPO, "Graph Editor", + "Edit animation/keyframes displayed as 2D curves"}, + {SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"}, + {0, NULL, 0, NULL, NULL} +}; const EnumPropertyItem rna_enum_space_image_mode_items[] = { {SI_MODE_VIEW, "VIEW", ICON_FILE_IMAGE, "View", "View the image and UV edit in mesh editmode"}, @@ -3672,13 +3678,6 @@ static void rna_def_space_graph(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static const EnumPropertyItem mode_items[] = { - {SIPO_MODE_ANIMATION, "FCURVES", ICON_IPO, "F-Curve", - "Edit animation/keyframes displayed as 2D curves"}, - {SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"}, - {0, NULL, 0, NULL, NULL} - }; - /* this is basically the same as the one for the 3D-View, but with some entries omitted */ static const EnumPropertyItem gpivot_items[] = { {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""}, @@ -3697,7 +3696,7 @@ static void rna_def_space_graph(BlenderRNA *brna) /* mode */ prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mode"); - RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_enum_items(prop, rna_enum_space_graph_mode_items); RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update"); -- cgit v1.2.3