forked from bartvdbraak/blender
quiet some warnings and logical errors.
- curve map insert point had a nested loop which used the same value to index different arrays. - dynamic paint used ternary operator where both outcomes were the same.
This commit is contained in:
parent
1ca7c2e4f3
commit
a2e1060862
@ -1693,7 +1693,7 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
|
||||
}
|
||||
|
||||
/* apply weights into a vertex group, if doesnt exists add a new layer */
|
||||
if (defgrp_index >= 0 && !dvert && strlen(surface->output_name)>0)
|
||||
if (defgrp_index >= 0 && !dvert && (surface->output_name[0] != '\0'))
|
||||
dvert = CustomData_add_layer_named(&result->vertData, CD_MDEFORMVERT, CD_CALLOC,
|
||||
NULL, sData->total_points, surface->output_name);
|
||||
if (defgrp_index >= 0 && dvert) {
|
||||
@ -2282,7 +2282,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
|
||||
tPoint->quad = (isInside == 2) ? 1 : 0; /* quad or tri part*/
|
||||
|
||||
/* save vertex indexes */
|
||||
tPoint->v1 = (isInside == 2) ? mface[i].v1 : mface[i].v1;
|
||||
tPoint->v1 = mface[i].v1; /* (isInside == 2) ? mface[i].v1 : mface[i].v1; */ /* same! */
|
||||
tPoint->v2 = (isInside == 2) ? mface[i].v3 : mface[i].v2;
|
||||
tPoint->v3 = (isInside == 2) ? mface[i].v4 : mface[i].v3;
|
||||
|
||||
|
@ -3795,6 +3795,8 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
|
||||
}
|
||||
|
||||
if (sel == -1) {
|
||||
int i;
|
||||
|
||||
/* if the click didn't select anything, check if it's clicked on the
|
||||
* curve itself, and if so, add a point */
|
||||
fx= ((float)mx - but->x1)/zoomx + offsx;
|
||||
@ -3804,8 +3806,10 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt
|
||||
|
||||
/* loop through the curve segment table and find what's near the mouse.
|
||||
* 0.05 is kinda arbitrary, but seems to be what works nicely. */
|
||||
for(a=0; a<=CM_TABLE; a++) {
|
||||
if ( ( fabs(fx - cmp[a].x) < (0.05) ) && ( fabs(fy - cmp[a].y) < (0.05) ) ) {
|
||||
for(i=0; i<=CM_TABLE; i++) {
|
||||
if ( (fabsf(fx - cmp[i].x) < 0.05f) &&
|
||||
(fabsf(fy - cmp[i].y) < 0.05f))
|
||||
{
|
||||
|
||||
curvemap_insert(cuma, fx, fy);
|
||||
curvemapping_changed(cumap, 0);
|
||||
|
@ -309,8 +309,9 @@ static int add_name(const char *str)
|
||||
if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
|
||||
j++;
|
||||
}
|
||||
if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
|
||||
if (debugSDNA > 3) printf("special after offset %d\n", j);
|
||||
if (debugSDNA > 3) printf("seen %c ( %d) \n"
|
||||
"special after offset%d\n",
|
||||
str[j], str[j], j);
|
||||
|
||||
if (!isfuncptr) {
|
||||
/* multidimensional array pointer case */
|
||||
|
@ -572,6 +572,7 @@ DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene,
|
||||
/* unused */
|
||||
(void)fluidmd;
|
||||
(void)scene;
|
||||
(void)ob;
|
||||
(void)dm;
|
||||
(void)useRenderParams;
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user