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>2011-08-01 09:25:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-01 09:25:30 +0400
commitaf39f2636019e387dc9f572249c09ad9cf9631bc (patch)
treed509863aca32cb86a570b0c4ace934937938cdbc
parent9da712a581f59fc7794151fe5f07a4fb396881f2 (diff)
fix, uvproject modifier wasn't copying the uv layer name,
also edit var names from recent commit to better fit with other functions.
-rw-r--r--source/blender/blenkernel/intern/curve.c16
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c2
2 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 7aa28c3f681..eb364af6ff8 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -580,19 +580,19 @@ void addNurbPointsBezier(Nurb *nu, int number)
/* ~~~~~~~~~~~~~~~~~~~~Non Uniform Rational B Spline calculations ~~~~~~~~~~~ */
-static void calcknots(float *knots, const short tot, const short order, const short flag)
+static void calcknots(float *knots, const short pnts, const short order, const short flag)
{
/* knots: number of pnts NOT corrected for cyclic */
- const int tot_order= tot + order;
+ const int pnts_order= pnts + order;
float k;
int a;
switch(flag & (CU_NURB_ENDPOINT|CU_NURB_BEZIER)) {
case CU_NURB_ENDPOINT:
k= 0.0;
- for(a=1; a <= tot_order; a++) {
+ for(a=1; a <= pnts_order; a++) {
knots[a-1]= k;
- if(a >= order && a <= tot) k+= 1.0f;
+ if(a >= order && a <= pnts) k+= 1.0f;
}
break;
case CU_NURB_BEZIER:
@@ -600,15 +600,15 @@ static void calcknots(float *knots, const short tot, const short order, const sh
* if this is not enforced, the displist will be corrupt */
if(order==4) {
k= 0.34;
- for(a=0; a < tot_order; a++) {
+ for(a=0; a < pnts_order; a++) {
knots[a]= floorf(k);
k+= (1.0f/3.0f);
}
}
else if(order==3) {
k= 0.6f;
- for(a=0; a < tot_order; a++) {
- if(a >= order && a <= tot) k+= 0.5f;
+ for(a=0; a < pnts_order; a++) {
+ if(a >= order && a <= pnts) k+= 0.5f;
knots[a]= floorf(k);
}
}
@@ -617,7 +617,7 @@ static void calcknots(float *knots, const short tot, const short order, const sh
}
break;
default:
- for(a=0; a < tot_order; a++) {
+ for(a=0; a < pnts_order; a++) {
knots[a]= (float)a;
}
break;
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index a5d2e0b38c7..922ae8c1e92 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -42,6 +42,7 @@
#include "DNA_object_types.h"
#include "BLI_math.h"
+#include "BLI_string.h"
#include "BLI_uvproject.h"
#include "BLI_utildefines.h"
@@ -83,6 +84,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tumd->aspecty = umd->aspecty;
tumd->scalex = umd->scalex;
tumd->scaley = umd->scaley;
+ BLI_strncpy(tumd->uvlayer_name, umd->uvlayer_name, sizeof(umd->uvlayer_name));
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md))