Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-12 23:51:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-12 23:51:31 +0400
commitec2464ac5f95c93b9da3a1927fda5cd7680c2c85 (patch)
treea7305a5ca326c7975ca8c9abcaccd9a7c5c41da6
parent679609fbede36faf153994c104315eec68f9eadd (diff)
code cleanup: unnecessary shadowing and some minor pep8 edits.
-rw-r--r--release/scripts/startup/bl_operators/add_mesh_torus.py4
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py2
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py7
-rw-r--r--source/blender/blenkernel/intern/object.c5
-rw-r--r--source/blender/bmesh/operators/bmo_wireframe.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c1
8 files changed, 11 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py
index fcb9feab192..aa01e20fc97 100644
--- a/release/scripts/startup/bl_operators/add_mesh_torus.py
+++ b/release/scripts/startup/bl_operators/add_mesh_torus.py
@@ -106,9 +106,9 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
)
mode = bpy.props.EnumProperty(
name="Torus Dimensions",
- items=(("MAJOR_MINOR", "Major/Minor",
+ items=(("MAJOR_MINOR", "Major/Minor",
"Use the major/minor radii for torus dimensions"),
- ("EXT_INT", "Exterior/Interior",
+ ("EXT_INT", "Exterior/Interior",
"Use the exterior/interior radii for torus dimensions")),
update=mode_update_callback,
)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index b1ee7266a10..2ede23325a6 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2614,7 +2614,7 @@ class VIEW3D_PT_view3d_shading(Panel):
bl_region_type = 'UI'
bl_label = "Shading"
bl_options = {'DEFAULT_CLOSED'}
-
+
@classmethod
def poll(cls, context):
view = context.space_data
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index c40b9807f20..d01df810307 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -913,7 +913,7 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
row.prop(brush, "jitter_absolute")
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
-
+
if brush.sculpt_capabilities.has_smooth_stroke:
col = layout.column()
col.separator()
@@ -945,9 +945,8 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
sub.active = brush.use_smooth_stroke
sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
-
- layout.prop(settings, "input_samples")
+ layout.prop(settings, "input_samples")
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
@@ -1217,7 +1216,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel):
row = layout.row()
row.prop(ipaint, "use_normal_falloff")
-
+
sub = row.row()
sub.active = (ipaint.use_normal_falloff)
sub.prop(ipaint, "normal_angle", text="")
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 8ae0187e27d..d7abdbdea0a 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -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++;
diff --git a/source/blender/bmesh/operators/bmo_wireframe.c b/source/blender/bmesh/operators/bmo_wireframe.c
index 6b2fe279b6c..2e5db5210c4 100644
--- a/source/blender/bmesh/operators/bmo_wireframe.c
+++ b/source/blender/bmesh/operators/bmo_wireframe.c
@@ -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;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index f78d8981400..d0d1a48e832 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -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");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index ffef17e770a..c2a8b25013e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -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);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 7ce014855c3..0299ae4c656 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -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);