diff options
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_boolean_util.c | 10 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_cloth.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_mirror.c | 8 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_ocean.c | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean_util.c b/source/blender/modifiers/intern/MOD_boolean_util.c index a3d93b5437e..c9a7dc9a73d 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.c +++ b/source/blender/modifiers/intern/MOD_boolean_util.c @@ -76,7 +76,7 @@ static void VertexIt_Destruct(CSG_VertexIteratorDescriptor *iterator) if (iterator->it) { /* deallocate memory for iterator */ MEM_freeN(iterator->it); - iterator->it = 0; + iterator->it = NULL; } iterator->Done = NULL; iterator->Fill = NULL; @@ -127,11 +127,11 @@ static void VertexIt_Construct(CSG_VertexIteratorDescriptor *output, DerivedMesh { VertexIt *it; - if (output == 0) return; + if (output == NULL) return; /* allocate some memory for blender iterator */ it = (VertexIt *)(MEM_mallocN(sizeof(VertexIt), "Boolean_VIt")); - if (it == 0) { + if (it == NULL) { return; } /* assign blender specific variables */ @@ -221,11 +221,11 @@ static void FaceIt_Construct( CSG_FaceIteratorDescriptor *output, DerivedMesh *dm, int offset, Object *ob) { FaceIt *it; - if (output == 0) return; + if (output == NULL) return; /* allocate some memory for blender iterator */ it = (FaceIt *)(MEM_mallocN(sizeof(FaceIt), "Boolean_FIt")); - if (it == 0) { + if (it == NULL) { return; } /* assign blender specific variables */ diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 808dfbae810..da0758a09d0 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -155,6 +155,7 @@ static void copyData(ModifierData *md, ModifierData *target) if (clmd->sim_parms->effector_weights) tclmd->sim_parms->effector_weights = MEM_dupallocN(clmd->sim_parms->effector_weights); tclmd->coll_parms = MEM_dupallocN(clmd->coll_parms); + tclmd->point_cache = BKE_ptcache_add(&tclmd->ptcaches); tclmd->clothObject = NULL; } diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 83c678db7b3..2b29f2afb9a 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -111,7 +111,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, MLoop *ml; MPoly *mp; float mtx[4][4]; - int i, j; + int i; int a, totshape; int *vtargetmap = NULL, *vtmap_a = NULL, *vtmap_b = NULL; @@ -221,7 +221,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, ml = CDDM_get_loops(result); for (i = 0; i < maxPolys; i++, mp++) { MLoop *ml2; - int e; + int j, e; /* reverse the loop, but we keep the first vertex in the face the same, * to ensure that quads are split the same way as on the other side */ @@ -249,8 +249,8 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, /* handle uvs, * let tessface recalc handle updating the MTFace data */ if (mmd->flag & (MOD_MIR_MIRROR_U | MOD_MIR_MIRROR_V)) { - const int do_mirr_u = (mmd->flag & MOD_MIR_MIRROR_U) != 0; - const int do_mirr_v = (mmd->flag & MOD_MIR_MIRROR_V) != 0; + const bool do_mirr_u = (mmd->flag & MOD_MIR_MIRROR_U) != 0; + const bool do_mirr_v = (mmd->flag & MOD_MIR_MIRROR_V) != 0; const int totuv = CustomData_number_of_layers(&result->loopData, CD_MLOOPUV); diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 77250ec4025..338771f7746 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -169,6 +169,7 @@ static void copyData(ModifierData *md, ModifierData *target) OceanModifierData *omd = (OceanModifierData *) md; OceanModifierData *tomd = (OceanModifierData *) target; + tomd->geometry_mode = omd->geometry_mode; tomd->resolution = omd->resolution; tomd->spatial_size = omd->spatial_size; @@ -191,7 +192,6 @@ static void copyData(ModifierData *md, ModifierData *target) tomd->refresh = 0; - tomd->size = omd->size; tomd->repeat_x = omd->repeat_x; tomd->repeat_y = omd->repeat_y; |