[Bf-codereview] QuickLattice (issue 9196046)

ideasman42 at gmail.com ideasman42 at gmail.com
Sun May 12 17:04:46 CEST 2013


initial review.


https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py
File release/scripts/addons_contrib/mesh_easylattice.py (right):

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode1
release/scripts/addons_contrib/mesh_easylattice.py:1: bl_info = {
missing GPL2+ license header.

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode26
release/scripts/addons_contrib/mesh_easylattice.py:26:
bpy.ops.object.modifier_remove( modifier = mod.name )
you can remove modifiers like this
obj.modifiers.remove(mod)

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode32
release/scripts/addons_contrib/mesh_easylattice.py:32: if
"LatticeEasytTemp" in ob.name:
using names as ID's like this is a bit weak, could tag with a property
or add to a group.

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode34
release/scripts/addons_contrib/mesh_easylattice.py:34:
bpy.ops.object.delete( use_global = False )
you can do...
scene.objects.unlink(obj)

better then calling operator

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode41
release/scripts/addons_contrib/mesh_easylattice.py:41: loc =
getTransformations( obj )[0]
should only be called once

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode82
release/scripts/addons_contrib/mesh_easylattice.py:82: #    points = [
commenting our large blocks of code, use ''' is nicer (less noisy diffs)

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode99
release/scripts/addons_contrib/mesh_easylattice.py:99:
bpy.ops.object.editmode_toggle()
could add editmode support through bmesh api.

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode135
release/scripts/addons_contrib/mesh_easylattice.py:135: minx =
selvertsarray[0].co.x
nicer to do...
minx, miny, minz = selvertsarray[0].co

https://codereview.appspot.com/9196046/diff/1/release/scripts/addons_contrib/mesh_easylattice.py#newcode181
release/scripts/addons_contrib/mesh_easylattice.py:181: #     middle =
mat_world * mathutils.Vector((x_sum, y_sum, z_sum))/float(c)
no need to convert to float() with python3

https://codereview.appspot.com/9196046/


More information about the Bf-codereview mailing list