code cleanup: unnecessary shadowing and some minor pep8 edits.
This commit is contained in:
@@ -949,7 +949,6 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
|
||||
layout.prop(settings, "input_samples")
|
||||
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
|
||||
bl_label = "Curve"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@@ -3449,7 +3449,6 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
|
||||
{
|
||||
KDTree *tree = NULL;
|
||||
unsigned int tot = 0;
|
||||
float co[3];
|
||||
|
||||
switch (ob->type) {
|
||||
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 */
|
||||
for (i = 0; i < totvert; i++) {
|
||||
if (index[i] != ORIGINDEX_NONE) {
|
||||
float co[3];
|
||||
mul_v3_m4v3(co, ob->obmat, mvert[i].co);
|
||||
BLI_kdtree_insert(tree, index[i], co, NULL);
|
||||
tot++;
|
||||
@@ -3484,6 +3484,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
|
||||
tree = BLI_kdtree_new(tot);
|
||||
|
||||
for (i = 0; i < tot; i++) {
|
||||
float co[3];
|
||||
mul_v3_m4v3(co, ob->obmat, mvert[i].co);
|
||||
BLI_kdtree_insert(tree, i, co, NULL);
|
||||
}
|
||||
@@ -3513,6 +3514,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
|
||||
bezt = nu->bezt;
|
||||
a = nu->pntsu;
|
||||
while (a--) {
|
||||
float co[3];
|
||||
mul_v3_m4v3(co, ob->obmat, bezt->vec[1]);
|
||||
BLI_kdtree_insert(tree, i++, co, NULL);
|
||||
bezt++;
|
||||
@@ -3524,6 +3526,7 @@ KDTree *BKE_object_as_kdtree(Object *ob, int *r_tot)
|
||||
bp = nu->bp;
|
||||
a = nu->pntsu * nu->pntsv;
|
||||
while (a--) {
|
||||
float co[3];
|
||||
mul_v3_m4v3(co, ob->obmat, bp->vec);
|
||||
BLI_kdtree_insert(tree, i++, co, NULL);
|
||||
bp++;
|
||||
|
||||
@@ -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;
|
||||
const float crease_weight = 1.0f;
|
||||
|
||||
//CustomData_has_layer(&bm->edata, CD_CREASE);
|
||||
|
||||
const int totvert_orig = bm->totvert;
|
||||
|
||||
BMOIter oiter;
|
||||
|
||||
@@ -3618,7 +3618,6 @@ static int viewroll_exec(bContext *C, wmOperator *op)
|
||||
View3D *v3d;
|
||||
RegionView3D *rv3d;
|
||||
ARegion *ar;
|
||||
float mousevec[3];
|
||||
|
||||
if (op->customdata) {
|
||||
ViewOpsData *vod = op->customdata;
|
||||
@@ -3630,9 +3629,6 @@ static int viewroll_exec(bContext *C, wmOperator *op)
|
||||
v3d = CTX_wm_view3d(C);
|
||||
}
|
||||
|
||||
negate_v3_v3(mousevec, ((RegionView3D *)ar->regiondata)->viewinv[2]);
|
||||
normalize_v3(mousevec);
|
||||
|
||||
rv3d = ar->regiondata;
|
||||
if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) {
|
||||
const float angle = RNA_float_get(op->ptr, "angle");
|
||||
|
||||
@@ -2600,7 +2600,7 @@ static void rna_def_space_text(BlenderRNA *brna)
|
||||
prop = RNA_def_property(srna, "top", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
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);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
|
||||
@@ -264,7 +264,6 @@ void wm_event_do_notifiers(bContext *C)
|
||||
if (note->category == NC_SCREEN) {
|
||||
if (note->data == ND_SCREENBROWSE) {
|
||||
/* free popup handlers only [#35434] */
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
UI_remove_popup_handlers_all(C, &win->modalhandlers);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user