diff options
Diffstat (limited to 'mocap/__init__.py')
-rw-r--r-- | mocap/__init__.py | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/mocap/__init__.py b/mocap/__init__.py index 99a9d4a8..5a2405e4 100644 --- a/mocap/__init__.py +++ b/mocap/__init__.py @@ -50,11 +50,9 @@ else: PointerProperty, StringProperty, ) - from bpy import * from . import mocap_constraints from . import retarget from . import mocap_tools - from .mocap_constraints import * # MocapConstraint class # Defines MocapConstraint datatype, used to add and configute mocap constraints @@ -65,66 +63,66 @@ class MocapConstraint(bpy.types.PropertyGroup): name = StringProperty(name="Name", default="Mocap Fix", description="Name of Mocap Fix", - update=setConstraint) + update=mocap_constraints.setConstraint) constrained_bone = StringProperty(name="Bone", default="", description="Constrained Bone", - update=updateConstraintBoneType) + update=mocap_constraints.updateConstraintBoneType) constrained_boneB = StringProperty(name="Bone (2)", default="", description="Other Constrained Bone (optional, depends on type)", - update=setConstraint) + update=mocap_constraints.setConstraint) s_frame = IntProperty(name="S", default=0, description="Start frame of Fix", - update=setConstraint) + update=mocap_constraints.setConstraint) e_frame = IntProperty(name="E", default=100, description="End frame of Fix", - update=setConstraint) + update=mocap_constraints.setConstraint) smooth_in = IntProperty(name="In", default=10, description="Amount of frames to smooth in", - update=setConstraint, + update=mocap_constraints.setConstraint, min=0) smooth_out = IntProperty(name="Out", default=10, description="Amount of frames to smooth out", - update=setConstraint, + update=mocap_constraints.setConstraint, min=0) targetMesh = StringProperty(name="Mesh", default="", description="Target of Fix - Mesh (optional, depends on type)", - update=setConstraint) + update=mocap_constraints.setConstraint) active = BoolProperty(name="Active", default=True, description="Fix is active", - update=setConstraint) + update=mocap_constraints.setConstraint) show_expanded = BoolProperty(name="Show Expanded", default=True, description="Fix is fully shown") targetPoint = FloatVectorProperty(name="Point", size=3, subtype="XYZ", default=(0.0, 0.0, 0.0), description="Target of Fix - Point", - update=setConstraint) + update=mocap_constraints.setConstraint) targetDist = FloatProperty(name="Offset", default=0.0, description="Distance and Floor Fixes - Desired offset", - update=setConstraint) + update=mocap_constraints.setConstraint) targetSpace = EnumProperty( items=[("WORLD", "World Space", "Evaluate target in global space"), ("LOCAL", "Object space", "Evaluate target in object space"), ("constrained_boneB", "Other Bone Space", "Evaluate target in specified other bone space")], name="Space", description="In which space should Point type target be evaluated", - update=setConstraint) + update=mocap_constraints.setConstraint) type = EnumProperty(name="Type of constraint", items=[("point", "Maintain Position", "Bone is at a specific point"), ("freeze", "Maintain Position at frame", "Bone does not move from location specified in target frame"), ("floor", "Stay above", "Bone does not cross specified mesh object eg floor"), ("distance", "Maintain distance", "Target bones maintained specified distance")], description="Type of Fix", - update=updateConstraintBoneType) + update=mocap_constraints.updateConstraintBoneType) real_constraint = StringProperty() real_constraint_bone = StringProperty() @@ -704,8 +702,8 @@ class OBJECT_OT_RemoveMocapConstraint(bpy.types.Operator): m_constraint = m_constraints[self.constraint] if m_constraint.real_constraint: bone = enduser_obj.pose.bones[m_constraint.real_constraint_bone] - cons_obj = getConsObj(bone) - removeConstraint(m_constraint, cons_obj) + cons_obj = mocap_constraints.getConsObj(bone) + mocap_constraints.removeConstraint(m_constraint, cons_obj) m_constraints.remove(self.constraint) return {"FINISHED"} @@ -722,7 +720,7 @@ class OBJECT_OT_BakeMocapConstraints(bpy.types.Operator): bl_label = "Bake all fixes to target armature" def execute(self, context): - bakeConstraints(context) + mocap_constraints.bakeConstraints(context) return {"FINISHED"} @classmethod @@ -738,7 +736,7 @@ class OBJECT_OT_UnbakeMocapConstraints(bpy.types.Operator): bl_label = "Unbake all fixes to target armature" def execute(self, context): - unbakeConstraints(context) + mocap_constraints.unbakeConstraints(context) return {"FINISHED"} @classmethod @@ -755,7 +753,7 @@ class OBJECT_OT_UpdateMocapConstraints(bpy.types.Operator): bl_label = "Updates all fixes to target armature - neccesary to take under consideration changes to armature object or pose" def execute(self, context): - updateConstraints(context.active_object, context) + mocap_constraints.updateConstraints(context.active_object, context) return {"FINISHED"} @classmethod |