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/space_view3d
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/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 3b6ca455b48..220952d190f 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1392,7 +1392,7 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb
int i;
for (nu= cu->editnurb->first; nu; nu=nu->next) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
for (i=0; i<nu->pntsu; i++) {
BezTriple *bezt = &nu->bezt[i];
@@ -3888,7 +3888,7 @@ static void tekenhandlesN(Nurb *nu, short sel)
glBegin(GL_LINES);
- if( (nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
if(sel) col= nurbcol+4;
else col= nurbcol;
@@ -3945,7 +3945,7 @@ static void tekenvertsN(Nurb *nu, short sel)
bglBegin(GL_POINTS);
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
@@ -3986,7 +3986,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel)
nu= nurb;
while(nu) {
if(nu->hide==0) {
- switch(nu->type & 7) {
+ switch(nu->type) {
case CU_POLY:
cpack(nurbcol[3]);
bp= nu->bp;
@@ -4094,7 +4094,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* first non-selected handles */
for(nu=nurb; nu; nu=nu->next) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
tekenhandlesN(nu, 0);
}
}
@@ -4102,7 +4102,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
draw_editnurb(ob, nurb, 1);
/* selected handles */
for(nu=nurb; nu; nu=nu->next) {
- if((nu->type & 7)==1) tekenhandlesN(nu, 1);
+ if(nu->type == CU_BEZIER) tekenhandlesN(nu, 1);
tekenvertsN(nu, 0);
}
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 39e90a37b3f..2bef37e43e6 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -226,7 +226,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
nu= cu->editnurb->first;
while(nu) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
@@ -409,7 +409,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
nu= cu->editnurb->first;
while(nu) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
bezt= nu->bezt;
a= nu->pntsu;
while(a--) {
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 73b70ccb532..b4b54cd1d88 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -302,7 +302,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
int totmalloc= 0;
for(nu= cu->editnurb->first; nu; nu= nu->next) {
- if((nu->type & 7)==CU_BEZIER)
+ if(nu->type == CU_BEZIER)
totmalloc += 3*nu->pntsu;
else
totmalloc += nu->pntsu*nu->pntsv;
@@ -311,7 +311,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
nu= cu->editnurb->first;
while(nu) {
- if((nu->type & 7)==CU_BEZIER) {
+ if(nu->type == CU_BEZIER) {
a= nu->pntsu;
bezt= nu->bezt;
while(a--) {