reverting change made r20939 with custom data layer merging.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 May 2011 08:43:39 +0000 (08:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 May 2011 08:43:39 +0000 (08:43 +0000)
if this is really a fix it should be made in trunk first, but looks like it was committed by accident.

source/blender/blenkernel/intern/customdata.c

index 9c3771a68425d7a494d7a880a4f847b824390fda..83533d239db370d2ecaa0d44e823e44b2c8933b7 100644 (file)
@@ -1058,7 +1058,7 @@ void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
 
                if(lastflag & CD_FLAG_NOCOPY) continue;
                else if(!((int)mask & (int)(1 << (int)type))) continue;
-               else if(number+1 < CustomData_number_of_layers(dest, type)) continue;
+               else if(number < CustomData_number_of_layers(dest, type)) continue;
 
                if((alloctype == CD_ASSIGN) && (lastflag & CD_FLAG_NOFREE))
                        newlayer = customData_add_layer__internal(dest, type, CD_REFERENCE,