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>2017-03-30 04:27:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-03-30 04:27:36 +0300
commitf53017167bdd9854a65690c23cbc90cf1f9d37ea (patch)
tree75da45a520bed7e8464c255fb2cf5952c767bd34 /oscurart_tools/oscurart_animation.py
parentfba8c3db998fb8deb2e85037581b748ee895952c (diff)
Cleanup: warnings in descriptions (end with '.')
Diffstat (limited to 'oscurart_tools/oscurart_animation.py')
-rw-r--r--oscurart_tools/oscurart_animation.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/oscurart_tools/oscurart_animation.py b/oscurart_tools/oscurart_animation.py
index 0a771aea..16806690 100644
--- a/oscurart_tools/oscurart_animation.py
+++ b/oscurart_tools/oscurart_animation.py
@@ -25,8 +25,8 @@ from mathutils import Matrix
def DefQuickParent(inf, out):
- if bpy.context.object.type == "ARMATURE":
- ob = bpy.context.object
+ ob = bpy.context.object
+ if ob.type == "ARMATURE":
target = [object for object in bpy.context.selected_objects if object != ob][0]
ob = bpy.context.active_pose_bone if bpy.context.object.type == 'ARMATURE' else bpy.context.object
target.select = False
@@ -39,7 +39,6 @@ def DefQuickParent(inf, out):
ob.matrix = target.matrix_world * a * i
bpy.ops.anim.keyframe_insert(type="LocRotScale")
else:
- ob = bpy.context.object
target = [object for object in bpy.context.selected_objects if object != ob][0]
ob = bpy.context.active_pose_bone if bpy.context.object.type == 'ARMATURE' else bpy.context.object
target.select = False
@@ -53,8 +52,8 @@ def DefQuickParent(inf, out):
bpy.ops.anim.keyframe_insert(type="LocRotScale")
-class QuickParent (bpy.types.Operator):
- """Creates a parent from one object to other in a selected frame range."""
+class QuickParent(bpy.types.Operator):
+ """Creates a parent from one object to other in a selected frame range"""
bl_idname = "anim.quick_parent_osc"
bl_label = "Quick Parent"
bl_options = {"REGISTER", "UNDO"}
@@ -62,5 +61,6 @@ class QuickParent (bpy.types.Operator):
def execute(self, context):
DefQuickParent(
bpy.context.scene.quick_animation_in,
- bpy.context.scene.quick_animation_out)
+ bpy.context.scene.quick_animation_out,
+ )
return {'FINISHED'}