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>2009-09-08 04:23:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-08 04:23:33 +0400
commit8b6b31b41fc6ed07036ea30153131e6824fc7c7e (patch)
tree6e4afbce04f039584cdeea49d3dba3b80b0c822b /source/blender/editors/object/object_edit.c
parent0ab2f675c364f2ca1212b0453bf2ffdce5ebb9ea (diff)
Made Nurb->type only store the type rather then mixing the type with flags.
moved CU_2D to Nurb->flag in do_versions This made simple type checks confusing to read. many... if( (nu->type & 7)==CU_BEZIER) replaced with ... if(nu->type == CU_BEZIER) made setting rna curve_2d clamp the Z values. still more RNA/UI changes to do.
Diffstat (limited to 'source/blender/editors/object/object_edit.c')
-rw-r--r--source/blender/editors/object/object_edit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index d226834bc21..9ef250d7963 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -406,11 +406,11 @@ void OBJECT_OT_mesh_add(wmOperatorType *ot)
}
static EnumPropertyItem prop_curve_types[] = {
- {CU_BEZIER|CU_2D|CU_PRIM_CURVE, "BEZIER_CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", ""},
- {CU_BEZIER|CU_2D|CU_PRIM_CIRCLE, "BEZIER_CIRCLE", ICON_CURVE_BEZCIRCLE, "Bezier Circle", ""},
- {CU_NURBS|CU_2D|CU_PRIM_CURVE, "NURBS_CURVE", ICON_CURVE_NCURVE, "NURBS Curve", ""},
- {CU_NURBS|CU_2D|CU_PRIM_CIRCLE, "NURBS_CIRCLE", ICON_CURVE_NCIRCLE, "NURBS Circle", ""},
- {CU_NURBS|CU_2D|CU_PRIM_PATH, "PATH", ICON_CURVE_PATH, "Path", ""},
+ {CU_BEZIER|CU_PRIM_CURVE, "BEZIER_CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", ""},
+ {CU_BEZIER|CU_PRIM_CIRCLE, "BEZIER_CIRCLE", ICON_CURVE_BEZCIRCLE, "Bezier Circle", ""},
+ {CU_NURBS|CU_PRIM_CURVE, "NURBS_CURVE", ICON_CURVE_NCURVE, "NURBS Curve", ""},
+ {CU_NURBS|CU_PRIM_CIRCLE, "NURBS_CIRCLE", ICON_CURVE_NCIRCLE, "NURBS Circle", ""},
+ {CU_NURBS|CU_PRIM_PATH, "PATH", ICON_CURVE_PATH, "Path", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1064,7 +1064,7 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
int *index, a, nr, totvert=0;
for(nu= editnurb->first; nu; nu= nu->next) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -1091,7 +1091,7 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
cent[0]= cent[1]= cent[2]= 0.0;
for(nu= editnurb->first; nu; nu= nu->next) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -1200,7 +1200,7 @@ static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
int index=0, a, nr=0;
for(nu= editnurb->first; nu; nu= nu->next) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -2795,7 +2795,7 @@ void make_vertex_parent(Scene *scene, Object *obedit, View3D *v3d)
nu= editnurb->first;
while(nu) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -3705,7 +3705,7 @@ static int object_center_set_exec(bContext *C, wmOperator *op)
nu= nu1;
while(nu) {
- if( (nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
a= nu->pntsu;
while (a--) {
VecSubf(nu->bezt[a].vec[0], nu->bezt[a].vec[0], cent);
@@ -5742,7 +5742,7 @@ static void apply_objects_internal(Scene *scene, View3D *v3d, int apply_scale, i
nu= cu->nurb.first;
while(nu) {
- if( (nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {