- 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.
This commit is contained in:
2011-12-18 09:36:47 +00:00
parent 9c9099a805
commit 8ed5fdde1d
3 changed files with 10 additions and 29 deletions

View 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 */
}
}

View 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++;
}
}
}
}

View 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)