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:
authorCampbell Barton <ideasman42@gmail.com>2010-05-24 11:14:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-05-24 11:14:55 +0400
commita1ada0f21c5f90d80a7e2b89b9f08fa1e756f675 (patch)
tree327aab9bbc3a3d99611813902bce8ff6a3975fb6 /source/blender/editors/curve
parent5664c0397cb2a2e04092502e81a5cb5e025b4243 (diff)
- remove OBJECT_OT_curve_add
- rename CURVE_OT_primitive_bezier_add --> CURVE_OT_primitive_bezier_curve_add # matches nurbs operator - rename CURVE_OT_primitive_curve_path_add --> CURVE_OT_primitive_nurbs_path_add - fix for warnings from 28923
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/curve_intern.h4
-rw-r--r--source/blender/editors/curve/curve_ops.c8
-rw-r--r--source/blender/editors/curve/editcurve.c26
3 files changed, 17 insertions, 21 deletions
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index bbbab8113b6..ac0825ae612 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -85,11 +85,11 @@ void CURVE_OT_tilt_clear(struct wmOperatorType *ot);
void CURVE_OT_smooth(struct wmOperatorType *ot);
void CURVE_OT_smooth_radius(struct wmOperatorType *ot);
-void CURVE_OT_primitive_bezier_add(struct wmOperatorType *ot);
+void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot);
void CURVE_OT_primitive_bezier_circle_add(struct wmOperatorType *ot);
void CURVE_OT_primitive_nurbs_curve_add(struct wmOperatorType *ot);
void CURVE_OT_primitive_nurbs_circle_add(struct wmOperatorType *ot);
-void CURVE_OT_primitive_curve_path_add(struct wmOperatorType *ot);
+void CURVE_OT_primitive_nurbs_path_add(struct wmOperatorType *ot);
void CURVE_OT_de_select_first(struct wmOperatorType *ot);
void CURVE_OT_de_select_last(struct wmOperatorType *ot);
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 0daa3535f6e..59e4490a63e 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -97,11 +97,11 @@ void ED_operatortypes_curve(void)
WM_operatortype_append(CURVE_OT_shade_flat);
WM_operatortype_append(CURVE_OT_tilt_clear);
- WM_operatortype_append(CURVE_OT_primitive_bezier_add);
+ WM_operatortype_append(CURVE_OT_primitive_bezier_curve_add);
WM_operatortype_append(CURVE_OT_primitive_bezier_circle_add);
WM_operatortype_append(CURVE_OT_primitive_nurbs_curve_add);
WM_operatortype_append(CURVE_OT_primitive_nurbs_circle_add);
- WM_operatortype_append(CURVE_OT_primitive_curve_path_add);
+ WM_operatortype_append(CURVE_OT_primitive_nurbs_path_add);
WM_operatortype_append(CURVE_OT_smooth);
WM_operatortype_append(CURVE_OT_smooth_radius);
@@ -185,8 +185,8 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
/* only set in editmode curve, by space_view3d listener */
keymap= WM_keymap_find(keyconf, "Curve", 0, 0);
keymap->poll= ED_operator_editsurfcurve;
-
- WM_keymap_add_item(keymap, "OBJECT_OT_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0);
+
+ WM_keymap_add_menu(keymap, "INFO_MT_curve_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_vertex_add", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
WM_keymap_add_item(keymap, "CURVE_OT_select_all", AKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 309ed9dadb5..1b1af31095a 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -5256,7 +5256,8 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newname)
return nu;
}
-static int curve_prim_add(bContext *C, wmOperator *op,int type){
+
+static int curve_prim_add(bContext *C, wmOperator *op, int type){
Object *obedit= CTX_data_edit_object(C);
ListBase *editnurb;
@@ -5300,16 +5301,15 @@ static int curve_prim_add(bContext *C, wmOperator *op,int type){
static int add_primitive_bezier_exec(bContext *C, wmOperator *op)
{
- if (curve_prim_add(C,op,CU_BEZIER|CU_PRIM_CURVE))
- return OPERATOR_FINISHED;
+ return curve_prim_add(C, op, CU_BEZIER|CU_PRIM_CURVE);
}
-void CURVE_OT_primitive_bezier_add(wmOperatorType *ot)
+void CURVE_OT_primitive_bezier_curve_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Bezier";
ot->description= "Construct a Bezier Curve";
- ot->idname= "CURVE_OT_primitive_bezier_add";
+ ot->idname= "CURVE_OT_primitive_bezier_curve_add";
/* api callbacks */
ot->invoke= ED_object_add_generic_invoke;
@@ -5324,8 +5324,7 @@ void CURVE_OT_primitive_bezier_add(wmOperatorType *ot)
static int add_primitive_bezier_circle_exec(bContext *C, wmOperator *op)
{
- if(curve_prim_add(C,op,CU_BEZIER|CU_PRIM_CIRCLE))
- return OPERATOR_FINISHED;
+ return curve_prim_add(C, op, CU_BEZIER|CU_PRIM_CIRCLE);
}
void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
@@ -5348,8 +5347,7 @@ void CURVE_OT_primitive_bezier_circle_add(wmOperatorType *ot)
static int add_primitive_nurbs_curve_exec(bContext *C, wmOperator *op)
{
- if(curve_prim_add(C,op,CU_NURBS|CU_PRIM_CURVE))
- return OPERATOR_FINISHED;
+ return curve_prim_add(C, op, CU_NURBS|CU_PRIM_CURVE);
}
void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
@@ -5372,8 +5370,7 @@ void CURVE_OT_primitive_nurbs_curve_add(wmOperatorType *ot)
static int add_primitive_nurbs_circle_exec(bContext *C, wmOperator *op)
{
- if(curve_prim_add(C,op,CU_NURBS|CU_PRIM_CIRCLE))
- return OPERATOR_FINISHED;
+ return curve_prim_add(C, op, CU_NURBS|CU_PRIM_CIRCLE);
}
void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
@@ -5396,16 +5393,15 @@ void CURVE_OT_primitive_nurbs_circle_add(wmOperatorType *ot)
static int add_primitive_curve_path_exec(bContext *C, wmOperator *op)
{
- if(curve_prim_add(C,op,CU_NURBS|CU_PRIM_PATH))
- return OPERATOR_FINISHED;
+ return curve_prim_add(C, op, CU_NURBS|CU_PRIM_PATH);
}
-void CURVE_OT_primitive_curve_path_add(wmOperatorType *ot)
+void CURVE_OT_primitive_nurbs_path_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Path";
ot->description= "Construct a Path";
- ot->idname= "CURVE_OT_primitive_curve_path_add";
+ ot->idname= "CURVE_OT_primitive_nurbs_path_add";
/* api callbacks */
ot->invoke= ED_object_add_generic_invoke;