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:
authorMartin Poirier <theeth@yahoo.com>2009-07-16 07:16:03 +0400
committerMartin Poirier <theeth@yahoo.com>2009-07-16 07:16:03 +0400
commit111be5ea2aa227cc93c9fc57750e463c55056673 (patch)
tree8c2c4579544cf9dd86e525ad0187b1986d99fb97 /source/blender/editors/transform
parent2b99cdd5cab1c833ac79a2e96db70d6fe79aed13 (diff)
Extrude along normals.
Note that this is on in all cases now, it needs to be restricted to face extrude only. Some slight transform operator cleanup too.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/transform/transform_generics.c2
-rw-r--r--source/blender/editors/transform/transform_ops.c21
3 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index d45a6f42232..c62ea07e398 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1170,7 +1170,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if (RNA_struct_find_property(op->ptr, "constraint_axis"))
{
- RNA_int_set(op->ptr, "constraint_orientation", t->current_orientation);
+ RNA_enum_set(op->ptr, "constraint_orientation", t->current_orientation);
if (t->con.mode & CON_APPLY)
{
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 560b37caf0a..d1394d65f96 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -886,7 +886,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
if (op && RNA_struct_find_property(op->ptr, "constraint_axis") && RNA_property_is_set(op->ptr, "constraint_orientation"))
{
- t->current_orientation = RNA_int_get(op->ptr, "constraint_orientation");
+ t->current_orientation = RNA_enum_get(op->ptr, "constraint_orientation");
if (t->current_orientation >= V3D_MANIP_CUSTOM + BIF_countTransformOrientation(C) - 1)
{
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index f2630f40c9c..f817776dbd8 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -81,6 +81,13 @@ EnumPropertyItem proportional_falloff_types[] = {
{0, NULL, 0, NULL, NULL}
};
+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", ""},
+ {0, NULL, 0, NULL, NULL}};
+
char OP_TRANSLATION[] = "TFM_OT_translation";
char OP_ROTATION[] = "TFM_OT_rotation";
char OP_TOSPHERE[] = "TFM_OT_tosphere";
@@ -137,12 +144,6 @@ static EnumPropertyItem *select_orientation_itemf(bContext *C, PointerRNA *ptr,
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", ""},
- {0, NULL, 0, NULL, NULL}};
/* identifiers */
ot->name = "Select Orientation";
@@ -293,8 +294,11 @@ void Properties_Snapping(struct wmOperatorType *ot, short align)
void Properties_Constraints(struct wmOperatorType *ot)
{
+ PropertyRNA *prop;
+
RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
- RNA_def_int(ot->srna, "constraint_orientation", 0, 0, INT_MAX, "Constraint Orientation", "", 0, INT_MAX);
+ prop= RNA_def_enum(ot->srna, "constraint_orientation", orientation_items, V3D_MANIP_GLOBAL, "Orientation", "DOC_BROKEN");
+ RNA_def_enum_funcs(prop, select_orientation_itemf);
}
void TFM_OT_translation(struct wmOperatorType *ot)
@@ -558,8 +562,7 @@ void TFM_OT_transform(struct wmOperatorType *ot)
Properties_Proportional(ot);
RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", "");
- RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
- RNA_def_int(ot->srna, "constraint_orientation", 0, 0, INT_MAX, "Constraint Orientation", "", 0, INT_MAX);
+ Properties_Constraints(ot);
}
void transform_operatortypes(void)