Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-07-11 07:23:45 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-11 07:23:45 +0400
commit576a642ff9b5ca5094f5bb84ada3c5639ae01a92 (patch)
tree950a5f5ce861a8fa04fb2727e0e65a464ccbab9c /source/blender/editors/transform/transform_ops.c
parent1105ee701ed20d6301a174fc4285de00f8e0f95e (diff)
parentb80b581bc03b6df28bd3a10118d85b78d5ca011b (diff)
NLA SoC: Merge from 2.5 soc-2009-aligorith
21470 to 21512 Next up, NLA-branch to 2.5 :)
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r--source/blender/editors/transform/transform_ops.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index d77f38967b0..ee4f1b90451 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -109,10 +109,6 @@ TransformModeItem transform_modes[] =
static int select_orientation_exec(bContext *C, wmOperator *op)
{
int orientation = RNA_enum_get(op->ptr, "orientation");
- int custom_index= RNA_int_get(op->ptr, "custom_index");;
-
- if(orientation == V3D_MANIP_CUSTOM)
- orientation += custom_index;
BIF_selectTransformOrientationValue(C, orientation);
@@ -126,20 +122,26 @@ static int select_orientation_invoke(bContext *C, wmOperator *op, wmEvent *event
pup= uiPupMenuBegin(C, "Orientation", 0);
layout= uiPupMenuLayout(pup);
- BIF_menuTransformOrientation(C, layout, NULL);
+ uiItemsEnumO(layout, "TFM_OT_select_orientation", "orientation");
uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
}
+static EnumPropertyItem *select_orientation_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ *free= 1;
+ return BIF_enumTransformOrientation(C);
+}
+
void TFM_OT_select_orientation(struct wmOperatorType *ot)
{
+ PropertyRNA *prop;
static EnumPropertyItem orientation_items[]= {
{V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", ""},
{V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", ""},
{V3D_MANIP_LOCAL, "LOCAL", 0, "Local", ""},
{V3D_MANIP_VIEW, "VIEW", 0, "View", ""},
- {V3D_MANIP_CUSTOM, "CUSTOM", 0, "Custom", ""},
{0, NULL, 0, NULL, NULL}};
/* identifiers */
@@ -151,8 +153,8 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot)
ot->exec = select_orientation_exec;
ot->poll = ED_operator_areaactive;
- RNA_def_enum(ot->srna, "orientation", orientation_items, V3D_MANIP_CUSTOM, "Orientation", "DOC_BROKEN");
- RNA_def_int(ot->srna, "custom_index", 0, 0, INT_MAX, "Custom Index", "", 0, INT_MAX);
+ prop= RNA_def_enum(ot->srna, "orientation", orientation_items, V3D_MANIP_GLOBAL, "Orientation", "DOC_BROKEN");
+ RNA_def_enum_funcs(prop, select_orientation_itemf);
}
static void transformops_exit(bContext *C, wmOperator *op)