Skip to content

Commit

Permalink
clear some pep8 complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
ideasman42 committed Jan 1, 2011
1 parent 01b2f67 commit c651948
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
1 change: 0 additions & 1 deletion io_anim_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def writeCameras(context, filepath, frame_start, frame_end, only_selected=False)
fw("cameras['%s'] = obj\n" % obj.name)
fw("\n")


for f in frame_range:
scene.frame_set(f)
fw("# new frame\n")
Expand Down
2 changes: 2 additions & 0 deletions io_import_scene_lwo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1242,9 +1242,11 @@ def invoke(self, context, event):
def menu_func(self, context):
self.layout.operator(IMPORT_OT_lwo.bl_idname, text="LightWave Object (.lwo)")


def register():
bpy.types.INFO_MT_file_import.append(menu_func)


def unregister():
bpy.types.INFO_MT_file_import.remove(menu_func)

Expand Down
21 changes: 11 additions & 10 deletions modules/add_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import mathutils
from bpy.props import FloatVectorProperty


class AddObjectHelper:
'''Helper Class for Add Object Operators'''
location = FloatVectorProperty(name='Location', description='Location of new Object')
Expand Down Expand Up @@ -66,11 +67,11 @@ def add_object_align_init(context, operator):

def add_object_data(context, obdata, operator=None):
'''Create Object from data
context: Blender Context
obdata: Object data (mesh, curve, camera,...)
operator: the active operator (self)
Returns the Object
'''

Expand Down Expand Up @@ -115,26 +116,26 @@ def flatten_vector_list(list):
'''flatten a list of vetcors to use in foreach_set and the like'''
if not list:
return None
result=[]

result = []
for vec in list:
result.extend([i for i in vec])

return result


def list_to_vector_list(list, dimension=3):
'''make Vector objects out of a list'''
#test if list contains right number of elements

result = []
for i in range(0, len(list), dimension):
try:
vec = mathutils.Vector( [list[i+ind] for ind in range(dimension)] )
vec = mathutils.Vector([list[i + ind] for ind in range(dimension)])
except:
print('Number of elemnts doesnt match into the vectors.')
return None

result.append(vec)

return result
10 changes: 5 additions & 5 deletions space_view3d_copy_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def getmat(bone, active, context, ignoreparent):
'''
data_bone = context.active_object.data.bones[bone.name]
#all matrices are in armature space unless commented otherwise
otherloc = active.matrix #final 4x4 mat of target, location.
bonemat_local = Matrix(data_bone.matrix_local) #self rest matrix
otherloc = active.matrix # final 4x4 mat of target, location.
bonemat_local = Matrix(data_bone.matrix_local) # self rest matrix
if data_bone.parent:
parentposemat = Matrix(
context.active_object.pose.bones[data_bone.parent.name].matrix)
Expand Down Expand Up @@ -253,7 +253,7 @@ def execute(self, context):
generic_copy(old_constraint, new_constraint)
return {'FINISHED'}

pose_ops = [] #list of pose mode copy operators
pose_ops = [] # list of pose mode copy operators

genops(pose_copies, pose_ops, "pose.copy_", pose_poll_func, pLoopExec)

Expand Down Expand Up @@ -387,7 +387,7 @@ def obWei(ob, active, context):
for i in range(0, len(active.vertex_groups)):
groups = active.vertex_groups[i]
vgroups_IndexName[groups.index] = groups.name
data = {} # vert_indices, [(vgroup_index, weights)]
data = {} # vert_indices, [(vgroup_index, weights)]
for v in me_source.vertices:
vg = v.groups
vi = v.index
Expand Down Expand Up @@ -728,7 +728,7 @@ def register():
kc = bpy.context.window_manager.keyconfigs['Blender']
km = kc.keymaps.get("Object Mode")
if km is None:
km = kc.keymaps.new(name="Object Mode")
km = kc.keymaps.new(name="Object Mode")
kmi = km.items.new('wm.call_menu', 'C', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_copypopup'
km = kc.keymaps.get("Pose")
Expand Down

0 comments on commit c651948

Please sign in to comment.