- remove rna access to deprecated sequencer attributes x/y offset & zoom.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 18 Dec 2011 09:36:47 +0000 (09:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 18 Dec 2011 09:36:47 +0000 (09:36 +0000)
- 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.

source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_space.c

index 9109c8fc0231e52c08d7fd28ab081b4eb0f4a322..f9bb0b36a3f14103f14f597e0b3ae9bee648aacc 100644 (file)
@@ -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 */
        }
 }
 
index e06bc206807a3b9efe51063e529095d1b37abca7..877da130357b2d7c48db7147da5685e9eea92adf 100644 (file)
@@ -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++;
+                                       }
                                }
                        }
                }
index f0a008b4939fb3a0fa306a367282a1fe9fd0db8a..a7f45d867dd3dfafbbf96b75a5ec86951979f3ec 100644 (file)
@@ -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)