code cleanup: unnecessary shadowing and some minor pep8 edits.

This commit is contained in:
2013-09-12 19:51:31 +00:00
parent 679609fbed
commit ec2464ac5f
8 changed files with 11 additions and 16 deletions

View File

@@ -949,7 +949,6 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
layout.prop(settings, "input_samples") layout.prop(settings, "input_samples")
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel): class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
bl_label = "Curve" bl_label = "Curve"
bl_options = {'DEFAULT_CLOSED'} bl_options = {'DEFAULT_CLOSED'}

View File

@@ -3449,7 +3449,6 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
{ {
KDTree *tree = NULL; KDTree *tree = NULL;
unsigned int tot = 0; unsigned int tot = 0;
float co[3];
switch (ob->type) { switch (ob->type) {
case OB_MESH: case OB_MESH:
@@ -3471,6 +3470,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
/* we don't how how many verts from the DM we can use */ /* we don't how how many verts from the DM we can use */
for (i = 0; i < totvert; i++) { for (i = 0; i < totvert; i++) {
if (index[i] != ORIGINDEX_NONE) { if (index[i] != ORIGINDEX_NONE) {
float co[3];
mul_v3_m4v3(co, ob->obmat, mvert[i].co); mul_v3_m4v3(co, ob->obmat, mvert[i].co);
BLI_kdtree_insert(tree, index[i], co, NULL); BLI_kdtree_insert(tree, index[i], co, NULL);
tot++; tot++;
@@ -3484,6 +3484,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
tree = BLI_kdtree_new(tot); tree = BLI_kdtree_new(tot);
for (i = 0; i < tot; i++) { for (i = 0; i < tot; i++) {
float co[3];
mul_v3_m4v3(co, ob->obmat, mvert[i].co); mul_v3_m4v3(co, ob->obmat, mvert[i].co);
BLI_kdtree_insert(tree, i, co, NULL); BLI_kdtree_insert(tree, i, co, NULL);
} }
@@ -3513,6 +3514,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
bezt = nu->bezt; bezt = nu->bezt;
a = nu->pntsu; a = nu->pntsu;
while (a--) { while (a--) {
float co[3];
mul_v3_m4v3(co, ob->obmat, bezt->vec[1]); mul_v3_m4v3(co, ob->obmat, bezt->vec[1]);
BLI_kdtree_insert(tree, i++, co, NULL); BLI_kdtree_insert(tree, i++, co, NULL);
bezt++; bezt++;
@@ -3524,6 +3526,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
bp = nu->bp; bp = nu->bp;
a = nu->pntsu * nu->pntsv; a = nu->pntsu * nu->pntsv;
while (a--) { while (a--) {
float co[3];
mul_v3_m4v3(co, ob->obmat, bp->vec); mul_v3_m4v3(co, ob->obmat, bp->vec);
BLI_kdtree_insert(tree, i++, co, NULL); BLI_kdtree_insert(tree, i++, co, NULL);
bp++; bp++;

View File

@@ -165,8 +165,6 @@ void bmo_wireframe_exec(BMesh *bm, BMOperator *op)
int cd_edge_crease_offset = use_crease ? CustomData_get_offset(&bm->edata, CD_CREASE) : -1; int cd_edge_crease_offset = use_crease ? CustomData_get_offset(&bm->edata, CD_CREASE) : -1;
const float crease_weight = 1.0f; const float crease_weight = 1.0f;
//CustomData_has_layer(&bm->edata, CD_CREASE);
const int totvert_orig = bm->totvert; const int totvert_orig = bm->totvert;
BMOIter oiter; BMOIter oiter;

View File

@@ -3618,7 +3618,6 @@ static int viewroll_exec(bContext *C, wmOperator *op)
View3D *v3d; View3D *v3d;
RegionView3D *rv3d; RegionView3D *rv3d;
ARegion *ar; ARegion *ar;
float mousevec[3];
if (op->customdata) { if (op->customdata) {
ViewOpsData *vod = op->customdata; ViewOpsData *vod = op->customdata;
@@ -3630,9 +3629,6 @@ static int viewroll_exec(bContext *C, wmOperator *op)
v3d = CTX_wm_view3d(C); v3d = CTX_wm_view3d(C);
} }
negate_v3_v3(mousevec, ((RegionView3D *)ar->regiondata)->viewinv[2]);
normalize_v3(mousevec);
rv3d = ar->regiondata; rv3d = ar->regiondata;
if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) { if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
const float angle = RNA_float_get(op->ptr, "angle"); const float angle = RNA_float_get(op->ptr, "angle");

View File

@@ -2600,7 +2600,7 @@ static void rna_def_space_text(BlenderRNA *brna)
prop = RNA_def_property(srna, "top", PROP_INT, PROP_NONE); prop = RNA_def_property(srna, "top", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_int_sdna(prop, NULL, "top"); RNA_def_property_int_sdna(prop, NULL, "top");
RNA_def_property_ui_text(prop, "Top Line", "Top line visible."); RNA_def_property_ui_text(prop, "Top Line", "Top line visible");
prop = RNA_def_property(srna, "visible_lines", PROP_INT, PROP_NONE); prop = RNA_def_property(srna, "visible_lines", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_clear_flag(prop, PROP_EDITABLE);

View File

@@ -264,7 +264,6 @@ void wm_event_do_notifiers(bContext *C)
if (note->category == NC_SCREEN) { if (note->category == NC_SCREEN) {
if (note->data == ND_SCREENBROWSE) { if (note->data == ND_SCREENBROWSE) {
/* free popup handlers only [#35434] */ /* free popup handlers only [#35434] */
wmWindow *win = CTX_wm_window(C);
UI_remove_popup_handlers_all(C, &win->modalhandlers); UI_remove_popup_handlers_all(C, &win->modalhandlers);