~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/src/multires-firstlevel.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: multires-firstlevel.c,v 1.4 2007/01/30 23:07:57 nicholasbishop Exp $
 
2
 * $Id: multires-firstlevel.c,v 1.5 2007/03/08 05:54:39 nicholasbishop Exp $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
346
346
        if(me && me->mr && cd) {
347
347
                MultiresLevel *lvl1= me->mr->levels.first;
348
348
                
349
 
                multires_update_levels(me);
 
349
                multires_update_levels(me, 0);
350
350
                
351
351
                CustomData_set_layer_active(cd, type, n);
352
352
                CustomData_free_layer_active(cd, type, lvl1->totface);
353
353
                
354
 
                multires_level_to_mesh(OBACT, me);
 
354
                multires_level_to_mesh(OBACT, me, 0);
355
355
        }
356
356
}
357
357
 
359
359
void multires_add_layer(Mesh *me, CustomData *cd, const int type, const int n)
360
360
{
361
361
        if(me && me->mr && cd) {
362
 
                multires_update_levels(me);
 
362
                multires_update_levels(me, 0);
363
363
        
364
364
                if(CustomData_has_layer(cd, type))
365
365
                        CustomData_add_layer(cd, type, CD_DUPLICATE, CustomData_get_layer(cd, type),
368
368
                        CustomData_add_layer(cd, type, CD_DEFAULT, NULL, current_level(me->mr)->totface);
369
369
 
370
370
                CustomData_set_layer_active(cd, type, n);
371
 
                multires_level_to_mesh(OBACT, me);
 
371
                multires_level_to_mesh(OBACT, me, 0);
372
372
        }
373
373
}