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>2005-06-11 06:01:26 +0400
committerMartin Poirier <theeth@yahoo.com>2005-06-11 06:01:26 +0400
commitac30fd8b3e4aafe2cd2e009ad9735153b2f7e469 (patch)
treed7ffbfdd081f8cc7de9b9cb1a9d0f9f6f77399ed
parent07fb86d355eb6e98f36113fd60b678036e8716b6 (diff)
Fixed crash on transform_conversion with PET and hidden CV in a curve.
It now deals correctly with hidden CVs in Connected mode (creates a "segment" on each side of the hidden CV).
-rwxr-xr-xsource/blender/src/transform_conversions.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index b595bfc8667..4848fc0d5fd 100755
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -733,6 +733,8 @@ static void createTransCurveVerts(TransInfo *t)
td = t->data;
for(nu= editNurb.first; nu; nu= nu->next) {
if((nu->type & 7)==CU_BEZIER) {
+ TransData *head, *tail;
+ head = tail = td;
for(a=0, bezt= nu->bezt; a<nu->pntsu; a++, bezt++) {
if(bezt->hide==0) {
if(propmode || (bezt->f1 & 1)) {
@@ -750,6 +752,7 @@ static void createTransCurveVerts(TransInfo *t)
td++;
count++;
+ tail++;
}
/* THIS IS THE CV, the other two are handles */
if(propmode || (bezt->f2 & 1)) {
@@ -768,6 +771,7 @@ static void createTransCurveVerts(TransInfo *t)
td++;
count++;
+ tail++;
}
if(propmode || (bezt->f3 & 1)) {
VECCOPY(td->iloc, bezt->vec[2]);
@@ -784,13 +788,20 @@ static void createTransCurveVerts(TransInfo *t)
td++;
count++;
+ tail++;
}
}
+ else if (propmode && head != tail) {
+ calc_distanceCurveVerts(head, tail-1);
+ head = tail;
+ }
}
- if (propmode)
- calc_distanceCurveVerts(td-(nu->pntsu*3), td-1);
+ if (propmode && head != tail)
+ calc_distanceCurveVerts(head, tail);
}
else {
+ TransData *head, *tail;
+ head = tail = td;
for(a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) {
if(bp->hide==0) {
if(propmode || (bp->f1 & 1)) {
@@ -809,11 +820,16 @@ static void createTransCurveVerts(TransInfo *t)
td++;
count++;
+ tail++;
}
}
+ else if (propmode && head != tail) {
+ calc_distanceCurveVerts(head, tail-1);
+ head = tail;
+ }
}
- if (propmode)
- calc_distanceCurveVerts(td-(nu->pntsu*nu->pntsv), td-1);
+ if (propmode && head != tail)
+ calc_distanceCurveVerts(head, tail-1);
}
}
}