diff options
Diffstat (limited to 'release/scripts/op/object.py')
-rw-r--r-- | release/scripts/op/object.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/release/scripts/op/object.py b/release/scripts/op/object.py index b5123776047..8575f0f9243 100644 --- a/release/scripts/op/object.py +++ b/release/scripts/op/object.py @@ -117,8 +117,7 @@ class SelectHierarchy(bpy.types.Operator): def execute(self, context): select_new = [] act_new = None - - + selected_objects = context.selected_objects obj_act = context.object @@ -153,7 +152,7 @@ class SelectHierarchy(bpy.types.Operator): context.scene.objects.active = act_new return {'FINISHED'} - + return {'CANCELLED'} @@ -179,7 +178,7 @@ class SubdivisionSet(bpy.types.Operator): relative = self.properties.relative if relative and level == 0: - return {'CANCELLED'} # nothing to do + return {'CANCELLED'} # nothing to do def set_object_subd(obj): for mod in obj.modifiers: @@ -253,7 +252,7 @@ class ShapeTransfer(bpy.types.Operator): key = ob.add_shape_key(from_mix=False) if len(me.shape_keys.keys) == 1: key.name = "Basis" - key = ob.add_shape_key(from_mix=False) # we need a rest + key = ob.add_shape_key(from_mix=False) # we need a rest key.name = name ob.active_shape_key_index = len(me.shape_keys.keys) - 1 ob.show_shape_key = True @@ -345,7 +344,6 @@ class ShapeTransfer(bpy.types.Operator): n1loc = v1 + orig_normals[i1] * edge_length n2loc = v2 + orig_normals[i2] * edge_length - # now get the target nloc's v1_to, v2_to = target_coords[i1], target_coords[i2] edlen_to = (v1_to - v2_to).length @@ -392,7 +390,7 @@ class ShapeTransfer(bpy.types.Operator): ob_act = C.active_object objects = [ob for ob in C.selected_editable_objects if ob != ob_act] - if 1: # swap from/to, means we cant copy to many at once. + if 1: # swap from/to, means we cant copy to many at once. if len(objects) != 1: self.report({'ERROR'}, "Expected one other selected mesh object to copy from") return {'CANCELLED'} @@ -432,7 +430,7 @@ class JoinUVs(bpy.types.Operator): else: len_faces = len(mesh.faces) - uv_array = array.array('f', [0.0] * 8) * len_faces # seems to be the fastest way to create an array + uv_array = array.array('f', [0.0] * 8) * len_faces # seems to be the fastest way to create an array mesh.uv_textures.active.data.foreach_get("uv_raw", uv_array) objects = context.selected_editable_objects[:] @@ -453,7 +451,7 @@ class JoinUVs(bpy.types.Operator): else: uv_other = mesh_other.uv_textures.active if not uv_other: - uv_other = mesh_other.uv_textures.new() # should return the texture it adds + uv_other = mesh_other.uv_textures.new() # should return the texture it adds # finally do the copy uv_other.data.foreach_set("uv_raw", uv_array) @@ -487,7 +485,7 @@ class MakeDupliFace(bpy.types.Operator): def matrix_to_quat(matrix): # scale = matrix.median_scale trans = matrix.translation_part() - rot = matrix.rotation_part() # also contains scale + rot = matrix.rotation_part() # also contains scale return [(rot * b) + trans for b in base_tri] scene = bpy.context.scene @@ -508,7 +506,7 @@ class MakeDupliFace(bpy.types.Operator): mesh.vertices.foreach_set("co", face_verts) mesh.faces.foreach_set("vertices_raw", faces) - mesh.update() # generates edge data + mesh.update() # generates edge data # pick an object to use obj = objects[0] @@ -552,7 +550,9 @@ class IsolateTypeRender(bpy.types.Operator): obj.hide_render = True return {'FINISHED'} - + + + class ClearAllRestrictRender(bpy.types.Operator): '''Reveal all render objects by setting the hide render flag''' bl_idname = "object.hide_render_clear_all" @@ -561,7 +561,7 @@ class ClearAllRestrictRender(bpy.types.Operator): def execute(self, context): for obj in context.scene.objects: - obj.hide_render = False + obj.hide_render = False return {'FINISHED'} |