diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 44942db95b9..17543fa2ed1 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1581,7 +1581,7 @@ static void rna_def_space_view3d(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; const int matrix_dimsize[] = {4, 4}; - + static EnumPropertyItem pivot_items[] = { {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", "Pivot around bounding box center of selected object(s)"}, @@ -1594,6 +1594,16 @@ static void rna_def_space_view3d(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem manipulators_items[] = { + {V3D_MANIP_TRANSLATE, "TRANSLATE", ICON_MAN_TRANS, "Manipulator Translate", + "Use the manipulator for movement transformations"}, + {V3D_MANIP_ROTATE, "ROTATE", ICON_MAN_ROT, "Manipulator Rotate", + "Use the manipulator for rotation transformations"}, + {V3D_MANIP_SCALE, "SCALE", ICON_MAN_SCALE, "Manipulator Scale", + "Use the manipulator for scale transformations"}, + {0, NULL, 0, NULL, NULL} + }; + static EnumPropertyItem rv3d_persp_items[] = { {RV3D_PERSP, "PERSP", 0, "Perspective", ""}, {RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""}, @@ -1866,23 +1876,12 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Manipulator", "Use a 3D manipulator widget for controlling transforms"); RNA_def_property_ui_icon(prop, ICON_MANIPUL, 0); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - - prop = RNA_def_property(srna, "use_manipulator_translate", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_TRANSLATE); - RNA_def_property_ui_text(prop, "Manipulator Translate", "Use the manipulator for movement transformations"); - RNA_def_property_ui_icon(prop, ICON_MAN_TRANS, 0); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - - prop = RNA_def_property(srna, "use_manipulator_rotate", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_ROTATE); - RNA_def_property_ui_text(prop, "Manipulator Rotate", "Use the manipulator for rotation transformations"); - RNA_def_property_ui_icon(prop, ICON_MAN_ROT, 0); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - - prop = RNA_def_property(srna, "use_manipulator_scale", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "twtype", V3D_MANIP_SCALE); - RNA_def_property_ui_text(prop, "Manipulator Scale", "Use the manipulator for scale transformations"); - RNA_def_property_ui_icon(prop, ICON_MAN_SCALE, 0); + + prop = RNA_def_property(srna, "transform_manipulators", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "twtype"); + RNA_def_property_enum_items(prop, manipulators_items); + RNA_def_property_flag(prop, PROP_ENUM_FLAG); + RNA_def_property_ui_text(prop, "Transform Manipulators", "Transformation manipulators"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "transform_orientation", PROP_ENUM, PROP_NONE); |