diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-18 13:36:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-18 13:36:47 +0400 |
commit | 8ed5fdde1d0ffd11cfd0df6d1d54b768e7ac4127 (patch) | |
tree | c28df4d913ee4e971bde2e5b4411f11a114b99e3 /source/blender/makesrna/intern/rna_object_api.c | |
parent | 9c9099a805a1f143ae9916b2b6f03cbfe640bfff (diff) |
- remove rna access to deprecated sequencer attributes x/y offset & zoom.
- Object.to_mesh was still using deprecated colbits variable (object material wouldnt work for any material after 16)
- dont set colbits when setting material slot anymore.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index e06bc206807..877da130357 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -191,13 +191,12 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ if( tmpcu->mat ) { for( i = tmpcu->totcol; i-- > 0; ) { /* are we an object material or data based? */ - if (ob->colbits & 1<<i) - tmpmesh->mat[i] = ob->mat[i]; - else - tmpmesh->mat[i] = tmpcu->mat[i]; - if (tmpmesh->mat[i]) + tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : tmpcu->mat[i]; + + if (tmpmesh->mat[i]) { tmpmesh->mat[i]->id.us++; + } } } break; @@ -230,12 +229,11 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ if( origmesh->mat ) { for( i = origmesh->totcol; i-- > 0; ) { /* are we an object material or data based? */ - if (ob->colbits & 1<<i) - tmpmesh->mat[i] = ob->mat[i]; - else - tmpmesh->mat[i] = origmesh->mat[i]; - if (tmpmesh->mat[i]) + tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : origmesh->mat[i]; + + if (tmpmesh->mat[i]) { tmpmesh->mat[i]->id.us++; + } } } } |