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 | |
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')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 18 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 17 |
3 files changed, 10 insertions, 29 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 9109c8fc023..f9bb0b36a3f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -809,11 +809,11 @@ static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value) if(value) { ob->matbits[index]= 1; - ob->colbits |= (1<<index); + /* ob->colbits |= (1<<index); */ /* DEPRECATED */ } else { ob->matbits[index]= 0; - ob->colbits &= ~(1<<index); + /* ob->colbits &= ~(1<<index); */ /* DEPRECATED */ } } 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++; + } } } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index f0a008b4939..a7f45d867dd 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2000,23 +2000,6 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_enum_items(prop, proxy_render_size_items); RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); - - - /* not sure we need rna access to these but adding anyway */ - prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "xof"); - RNA_def_property_ui_text(prop, "X Offset", "Offset image horizontally from the view center"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); - - prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "yof"); - RNA_def_property_ui_text(prop, "Y Offset", "Offset image vertically from the view center"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); - - prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "zoom"); - RNA_def_property_ui_text(prop, "Zoom", "Display zoom level"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); } static void rna_def_space_text(BlenderRNA *brna) |