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
path: root/rigify
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-01 16:35:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-01 16:35:51 +0400
commit6f2787a32081cbc3515808893dba709b0f79e2f4 (patch)
treeb34df9008076859cfe2cf2f56335d76e840575ea /rigify
parentf6dc4b39f67417ee023787c641ad158be737c214 (diff)
set as pep8, only minor edits
Diffstat (limited to 'rigify')
-rw-r--r--rigify/__init__.py10
-rw-r--r--rigify/generate.py4
-rw-r--r--rigify/metarig_menu.py3
-rw-r--r--rigify/metarigs/human.py3
-rw-r--r--rigify/rig_ui_template.py4
-rw-r--r--rigify/rigs/basic/copy.py4
-rw-r--r--rigify/rigs/basic/copy_chain.py5
-rw-r--r--rigify/rigs/biped/arm/__init__.py3
-rw-r--r--rigify/rigs/biped/arm/deform.py3
-rw-r--r--rigify/rigs/biped/arm/fk.py3
-rw-r--r--rigify/rigs/biped/arm/ik.py3
-rw-r--r--rigify/rigs/biped/leg/__init__.py3
-rw-r--r--rigify/rigs/biped/leg/deform.py2
-rw-r--r--rigify/rigs/biped/leg/fk.py3
-rw-r--r--rigify/rigs/biped/leg/ik.py3
-rw-r--r--rigify/rigs/finger.py3
-rw-r--r--rigify/rigs/misc/delta.py3
-rw-r--r--rigify/rigs/neck_short.py3
-rw-r--r--rigify/rigs/palm.py3
-rw-r--r--rigify/rigs/spine.py7
-rw-r--r--rigify/ui.py2
-rw-r--r--rigify/utils.py6
22 files changed, 53 insertions, 30 deletions
diff --git a/rigify/__init__.py b/rigify/__init__.py
index fc8eb818..8ec26913 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
bl_info = {
"name": "Rigify",
"author": "Nathan Vegdahl",
@@ -24,10 +26,10 @@ bl_info = {
"location": "View3D > Add > Armature",
"description": "Adds various Rig Templates",
"location": "Armature properties",
- "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
- "Scripts/Rigging/Rigify",
- "tracker_url": "http://projects.blender.org/tracker/index.php?"\
- "func=detail&aid=25546",
+ "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"
+ "Scripts/Rigging/Rigify",
+ "tracker_url": "http://projects.blender.org/tracker/index.php?"
+ "func=detail&aid=25546",
"category": "Rigging"}
diff --git a/rigify/generate.py b/rigify/generate.py
index 8f5e012a..2a6bb308 100644
--- a/rigify/generate.py
+++ b/rigify/generate.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
import re
import time
@@ -166,7 +168,7 @@ def generate_rig(context, metarig):
getattr(bone.rigify_parameters[0], prop))
except AttributeError:
print("FAILED TO COPY PARAMETER: " + str(prop))
-
+
# Custom properties
for prop in bone.keys():
try:
diff --git a/rigify/metarig_menu.py b/rigify/metarig_menu.py
index fefb4bd6..d5366480 100644
--- a/rigify/metarig_menu.py
+++ b/rigify/metarig_menu.py
@@ -16,6 +16,8 @@
#
# ##### END GPL LICENSE BLOCK #####
+# <pep8 compliant>
+
import bpy
from rigify.metarigs import human
@@ -53,4 +55,3 @@ def unregister():
bpy.utils.unregister_class(AddHuman)
bpy.types.INFO_MT_armature_add.remove(menu_func)
-
diff --git a/rigify/metarigs/human.py b/rigify/metarigs/human.py
index cfc9f038..23ec2483 100644
--- a/rigify/metarigs/human.py
+++ b/rigify/metarigs/human.py
@@ -16,6 +16,8 @@
#
# ##### END GPL LICENSE BLOCK #####
+# <pep8 compliant>
+
import bpy
@@ -1146,4 +1148,3 @@ def create(obj):
arm.edit_bones.active = bone
arm.layers = [(x in [0, 2, 4, 6, 8, 10, 12]) for x in range(0, 32)]
-
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index f21c4096..c793dade 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
UI_SLIDERS = '''
import bpy
from mathutils import Matrix, Vector
@@ -543,7 +545,6 @@ class RigLayers(bpy.types.Panel):
code += "\n row = col.row()\n"
code += " row.prop(context.active_object.data, 'layers', index=28, toggle=True, text='Root')\n"
-
return code
@@ -567,4 +568,3 @@ def unregister():
register()
'''
-
diff --git a/rigify/rigs/basic/copy.py b/rigify/rigs/basic/copy.py
index 6a8800b2..f0c5c380 100644
--- a/rigify/rigs/basic/copy.py
+++ b/rigify/rigs/basic/copy.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from rigify.utils import copy_bone
from rigify.utils import strip_org, make_deformer_name
@@ -88,7 +90,6 @@ class Rig:
group.make_control = bpy.props.BoolProperty(name="Control", default=True, description="Create a control bone for the copy")
group.make_deform = bpy.props.BoolProperty(name="Deform", default=True, description="Create a deform bone for the copy")
-
@classmethod
def parameters_ui(self, layout, obj, bone):
""" Create the ui for the rig parameters.
@@ -139,4 +140,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
diff --git a/rigify/rigs/basic/copy_chain.py b/rigify/rigs/basic/copy_chain.py
index 937b02f6..eaff060f 100644
--- a/rigify/rigs/basic/copy_chain.py
+++ b/rigify/rigs/basic/copy_chain.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from rigify.utils import MetarigError
from rigify.utils import copy_bone
@@ -127,7 +129,6 @@ class Rig:
group.make_controls = bpy.props.BoolProperty(name="Controls", default=True, description="Create control bones for the copy")
group.make_deforms = bpy.props.BoolProperty(name="Deform", default=True, description="Create deform bones for the copy")
-
@classmethod
def parameters_ui(self, layout, obj, bone):
""" Create the ui for the rig parameters.
@@ -206,5 +207,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
-
diff --git a/rigify/rigs/biped/arm/__init__.py b/rigify/rigs/biped/arm/__init__.py
index 55cd2564..b22be16b 100644
--- a/rigify/rigs/biped/arm/__init__.py
+++ b/rigify/rigs/biped/arm/__init__.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
import imp
from . import fk, ik, deform
@@ -231,4 +233,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
diff --git a/rigify/rigs/biped/arm/deform.py b/rigify/rigs/biped/arm/deform.py
index 112c5550..4ed2cc47 100644
--- a/rigify/rigs/biped/arm/deform.py
+++ b/rigify/rigs/biped/arm/deform.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from math import acos
from mathutils import Vector, Matrix
@@ -227,4 +229,3 @@ class Rig:
con.name = "track_to"
con.target = self.obj
con.subtarget = ftip
-
diff --git a/rigify/rigs/biped/arm/fk.py b/rigify/rigs/biped/arm/fk.py
index 690dab50..77031227 100644
--- a/rigify/rigs/biped/arm/fk.py
+++ b/rigify/rigs/biped/arm/fk.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from rigify.utils import MetarigError
from rigify.utils import copy_bone
@@ -213,4 +215,3 @@ class Rig:
mod.levels = 2
return [uarm, farm, hand]
-
diff --git a/rigify/rigs/biped/arm/ik.py b/rigify/rigs/biped/arm/ik.py
index 55147a47..70720ac9 100644
--- a/rigify/rigs/biped/arm/ik.py
+++ b/rigify/rigs/biped/arm/ik.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from mathutils import Vector
from math import pi, acos
@@ -335,4 +337,3 @@ class Rig:
mod.levels = 2
return [uarm, farm, hand, pole]
-
diff --git a/rigify/rigs/biped/leg/__init__.py b/rigify/rigs/biped/leg/__init__.py
index c80376a8..3827d7cc 100644
--- a/rigify/rigs/biped/leg/__init__.py
+++ b/rigify/rigs/biped/leg/__init__.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
import imp
from . import fk, ik, deform
@@ -268,4 +270,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
diff --git a/rigify/rigs/biped/leg/deform.py b/rigify/rigs/biped/leg/deform.py
index 5ea8cf65..e7cd3194 100644
--- a/rigify/rigs/biped/leg/deform.py
+++ b/rigify/rigs/biped/leg/deform.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from math import acos
from mathutils import Vector, Matrix
diff --git a/rigify/rigs/biped/leg/fk.py b/rigify/rigs/biped/leg/fk.py
index 5ff9d4a9..270fffdb 100644
--- a/rigify/rigs/biped/leg/fk.py
+++ b/rigify/rigs/biped/leg/fk.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from mathutils import Vector
from rigify.utils import MetarigError
@@ -251,4 +253,3 @@ class Rig:
mod.levels = 2
return [thigh, shin, foot, foot_mch]
-
diff --git a/rigify/rigs/biped/leg/ik.py b/rigify/rigs/biped/leg/ik.py
index cfac1430..d114b942 100644
--- a/rigify/rigs/biped/leg/ik.py
+++ b/rigify/rigs/biped/leg/ik.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from mathutils import Vector
from math import pi, acos
@@ -604,4 +606,3 @@ class Rig:
mod.levels = 2
return [thigh, shin, foot, pole, foot_roll, foot_ik_target]
-
diff --git a/rigify/rigs/finger.py b/rigify/rigs/finger.py
index 523a9edd..7961a5fd 100644
--- a/rigify/rigs/finger.py
+++ b/rigify/rigs/finger.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from mathutils import Vector
from rigify.utils import MetarigError
@@ -408,4 +410,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
diff --git a/rigify/rigs/misc/delta.py b/rigify/rigs/misc/delta.py
index 2db278f0..d61cf695 100644
--- a/rigify/rigs/misc/delta.py
+++ b/rigify/rigs/misc/delta.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from math import acos
from rigify.utils import MetarigError
@@ -158,4 +160,3 @@ def set_mat(obj, bone_name, matrix):
a.roll = roll_1
else:
a.roll = roll_2
-
diff --git a/rigify/rigs/neck_short.py b/rigify/rigs/neck_short.py
index edba5c8d..07420875 100644
--- a/rigify/rigs/neck_short.py
+++ b/rigify/rigs/neck_short.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from rigify.utils import MetarigError
from rigify.utils import copy_bone, new_bone, put_bone
@@ -388,4 +390,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
diff --git a/rigify/rigs/palm.py b/rigify/rigs/palm.py
index 1309f626..1d25050a 100644
--- a/rigify/rigs/palm.py
+++ b/rigify/rigs/palm.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from math import cos, pi
from rigify.utils import MetarigError
@@ -270,4 +272,3 @@ class Rig:
bone.select_head = True
bone.select_tail = True
arm.edit_bones.active = bone
-
diff --git a/rigify/rigs/spine.py b/rigify/rigs/spine.py
index 1b77c4c3..cee08615 100644
--- a/rigify/rigs/spine.py
+++ b/rigify/rigs/spine.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
""" TODO:
- Add parameters for bone transform alphas.
"""
@@ -71,8 +73,8 @@ class Rig:
self.control_indices.sort()
self.pivot_rest = self.params.rest_pivot_slide
- self.pivot_rest = max(self.pivot_rest, 1.0/len(self.org_bones))
- self.pivot_rest = min(self.pivot_rest, 1.0-(1.0/len(self.org_bones)))
+ self.pivot_rest = max(self.pivot_rest, 1.0 / len(self.org_bones))
+ self.pivot_rest = min(self.pivot_rest, 1.0 - (1.0 / len(self.org_bones)))
if len(self.org_bones) <= 1:
raise MetarigError("RIGIFY ERROR: Bone '%s': input to rig type must be a chain of 2 or more bones" % (strip_org(bone_name)))
@@ -532,7 +534,6 @@ class Rig:
group.rest_pivot_slide = bpy.props.FloatProperty(name="Rest Pivot Slide", default=0.0, min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, description="The pivot slide value in the rest pose")
group.chain_bone_controls = bpy.props.StringProperty(name="Control bone list", default="", description="Define which bones have controls")
-
@classmethod
def parameters_ui(self, layout, obj, bone):
""" Create the ui for the rig parameters.
diff --git a/rigify/ui.py b/rigify/ui.py
index f187490b..bc5c4d8f 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
from bpy.props import *
import rigify
diff --git a/rigify/utils.py b/rigify/utils.py
index 64b42dcd..197a1a25 100644
--- a/rigify/utils.py
+++ b/rigify/utils.py
@@ -16,6 +16,8 @@
#
#======================= END GPL LICENSE BLOCK ========================
+# <pep8 compliant>
+
import bpy
import imp
import random
@@ -358,6 +360,7 @@ def create_compass_widget(rig, bone_name):
mesh.from_pydata(verts, edges, [])
mesh.update()
+
def create_root_widget(rig, bone_name):
""" Creates a widget for the root bone.
"""
@@ -536,7 +539,7 @@ def write_metarig(obj, layers=False, func_name="create_sample"):
return "\n".join(code)
-def random_id(length = 8):
+def random_id(length=8):
""" Generates a random alphanumeric id string.
"""
tlength = int(length / 2)
@@ -548,4 +551,3 @@ def random_id(length = 8):
text += random.choice(chars)
text += str(hex(int(time.time())))[2:][-tlength:].rjust(tlength, '0')[::-1]
return text
-