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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-27 01:23:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-27 01:23:02 +0400
commit4a3b1aab38cf1f316b6f853a42325efe6b4e67f3 (patch)
treec7825fca046b25177e051dbce9d0e28c5972dfcb
parent25f56f2c9d5afee0a9b1996b7264b0ac474fb5f4 (diff)
pep8 cleanup
-rw-r--r--object_fracture_cell/fracture_cell_calc.py2
-rw-r--r--object_fracture_cell/fracture_cell_setup.py28
-rw-r--r--space_view3d_copy_attributes.py1
-rw-r--r--ui_translate/utils.py2
4 files changed, 13 insertions, 20 deletions
diff --git a/object_fracture_cell/fracture_cell_calc.py b/object_fracture_cell/fracture_cell_calc.py
index 3e0b9b2d..03d27df8 100644
--- a/object_fracture_cell/fracture_cell_calc.py
+++ b/object_fracture_cell/fracture_cell_calc.py
@@ -93,7 +93,7 @@ def points_as_bmesh_cells(verts,
plane.resize_4d()
plane[3] = (-nlength / 2.0) + margin_cell
planes.append(plane)
-
+
vertices[:], plane_indices[:] = mathutils.geometry.points_in_planes(planes)
if len(vertices) == 0:
break
diff --git a/object_fracture_cell/fracture_cell_setup.py b/object_fracture_cell/fracture_cell_setup.py
index 36e8691f..b18bc2cf 100644
--- a/object_fracture_cell/fracture_cell_setup.py
+++ b/object_fracture_cell/fracture_cell_setup.py
@@ -29,7 +29,6 @@ def _redraw_yasiamevil():
_redraw_yasiamevil.opr = bpy.ops.wm.redraw_timer
_redraw_yasiamevil.arg = dict(type='DRAW_WIN_SWAP', iterations=1)
-
def _points_from_object(obj, source):
@@ -83,7 +82,6 @@ def _points_from_object(obj, source):
for psys in obj.particle_systems
for p in psys.particles])
-
# geom own
if 'VERT_OWN' in source:
points_from_verts(obj)
@@ -137,7 +135,7 @@ def cell_fracture_objects(scene, obj,
use_debug_redraw=False,
cell_scale=(1.0, 1.0, 1.0),
):
-
+
from . import fracture_cell_calc
# -------------------------------------------------------------------------
@@ -159,7 +157,6 @@ def cell_fracture_objects(scene, obj,
random.shuffle(points)
points[source_limit:] = []
-
# saddly we cant be sure there are no doubles
from mathutils import Vector
to_tuple = Vector.to_tuple
@@ -179,9 +176,8 @@ def cell_fracture_objects(scene, obj,
scalar = source_noise * ((bb_world[0] - bb_world[6]).length / 2.0)
from mathutils.noise import random_unit_vector
-
- points[:] = [p + (random_unit_vector() * (scalar * random())) for p in points]
+ points[:] = [p + (random_unit_vector() * (scalar * random())) for p in points]
if use_debug_points:
bm = bmesh.new()
@@ -205,9 +201,9 @@ def cell_fracture_objects(scene, obj,
# some hacks here :S
cell_name = obj.name + "_cell"
-
+
objects = []
-
+
for center_point, cell_points in cells:
# ---------------------------------------------------------------------
@@ -215,21 +211,22 @@ def cell_fracture_objects(scene, obj,
# create the convex hulls
bm = bmesh.new()
-
+
# WORKAROUND FOR CONVEX HULL BUG/LIMIT
# XXX small noise
import random
- def R(): return (random.random() - 0.5) * 0.001
+ def R():
+ return (random.random() - 0.5) * 0.001
# XXX small noise
for i, co in enumerate(cell_points):
-
+
# XXX small noise
co.x += R()
co.y += R()
co.z += R()
# XXX small noise
-
+
bm_vert = bm.verts.new(co)
import mathutils
@@ -259,7 +256,6 @@ def cell_fracture_objects(scene, obj,
# ---------------------------------------------------------------------
# MESH
-
mesh_dst = bpy.data.meshes.new(name=cell_name)
bm.to_mesh(mesh_dst)
@@ -294,7 +290,6 @@ def cell_fracture_objects(scene, obj,
scene.update()
-
# move this elsewhere...
for obj_cell in objects:
game = obj_cell.game
@@ -380,7 +375,7 @@ def cell_fracture_boolean(scene, obj, objects,
if obj_cell is not None:
objects_boolean.append(obj_cell)
-
+
if use_debug_redraw:
_redraw_yasiamevil()
@@ -414,7 +409,7 @@ def cell_fracture_interior_handle(objects,
mesh = obj_cell.data
bm = bmesh.new()
bm.from_mesh(mesh)
-
+
if use_interior_vgroup:
for bm_vert in bm.verts:
bm_vert.tag = True
@@ -446,7 +441,6 @@ def cell_fracture_interior_handle(objects,
for bm_face in bm.faces:
bm_face.hide = False
-
bm.to_mesh(mesh)
bm.free()
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py
index ddfcd443..ecc12b92 100644
--- a/space_view3d_copy_attributes.py
+++ b/space_view3d_copy_attributes.py
@@ -748,7 +748,6 @@ class MESH_OT_CopyFaceSettings(bpy.types.Operator):
return self._end(context, {'FINISHED'})
-
def _end(self, context, retval):
if context.mode != 'EDIT_MESH':
# Clean up by returning to edit mode like it was before.
diff --git a/ui_translate/utils.py b/ui_translate/utils.py
index 79344c89..b852f641 100644
--- a/ui_translate/utils.py
+++ b/ui_translate/utils.py
@@ -162,7 +162,7 @@ def find_best_msgs_matches(obj, cache_key, msgmap, msgs, state, rna_ctxt, rstruc
k &= src_to_msg[src_enum]
msgmap["enum_tip"]["key"] = k
rtip = getattr(obj, msgmap["rna_tip"]["msgstr"])
- print("rna tip: %r" % rtip )
+ print("rna tip: %r" % rtip)
if rtip:
k = ctxt_to_msg[BLF_I18NCONTEXT_DEFAULT].copy()
if k and rtip in msgid_to_msg: