[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3554] trunk/py/scripts/addons/ io_import_scene_mhx.py: FK-IK snapping fixed after rig change.
Thomas Larsson
thomas_larsson_01 at hotmail.com
Sat Jun 30 05:39:08 CEST 2012
Revision: 3554
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3554
Author: thomasl
Date: 2012-06-30 03:38:51 +0000 (Sat, 30 Jun 2012)
Log Message:
-----------
FK-IK snapping fixed after rig change.
Modified Paths:
--------------
trunk/py/scripts/addons/io_import_scene_mhx.py
Modified: trunk/py/scripts/addons/io_import_scene_mhx.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_mhx.py 2012-06-29 17:43:46 UTC (rev 3553)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py 2012-06-30 03:38:51 UTC (rev 3554)
@@ -3314,6 +3314,7 @@
class VIEW3D_OT_MhxMakeVisemesButton(bpy.types.Operator):
bl_idname = "mhx.make_visemes"
bl_label = "Generate viseme shapekeys"
+ bl_options = {'UNDO'}
def execute(self, context):
makeVisemes(context.object, context.scene)
@@ -3415,6 +3416,7 @@
class VIEW3D_OT_MhxVisemeButton(bpy.types.Operator):
bl_idname = 'mhx.pose_viseme'
bl_label = 'Viseme'
+ bl_options = {'UNDO'}
viseme = StringProperty()
def invoke(self, context, event):
@@ -3477,6 +3479,7 @@
class VIEW3D_OT_MhxLoadMohoButton(bpy.types.Operator):
bl_idname = "mhx.pose_load_moho"
bl_label = "Moho (.dat)"
+ bl_options = {'UNDO'}
filepath = StringProperty(subtype='FILE_PATH')
startFrame = IntProperty(name="Start frame", description="First frame to import", default=1)
@@ -3580,6 +3583,7 @@
class VIEW3D_OT_MhxResetExpressionsButton(bpy.types.Operator):
bl_idname = "mhx.pose_reset_expressions"
bl_label = "Reset expressions"
+ bl_options = {'UNDO'}
def execute(self, context):
rig,mesh = getMhxRigMesh(context.object)
@@ -3596,6 +3600,7 @@
class VIEW3D_OT_MhxKeyExpressionsButton(bpy.types.Operator):
bl_idname = "mhx.pose_key_expressions"
bl_label = "Key expressions"
+ bl_options = {'UNDO'}
def execute(self, context):
rig,mesh = getMhxRigMesh(context.object)
@@ -3612,6 +3617,7 @@
class VIEW3D_OT_MhxPinExpressionButton(bpy.types.Operator):
bl_idname = "mhx.pose_pin_expression"
bl_label = "Pin"
+ bl_options = {'UNDO'}
expression = StringProperty()
def execute(self, context):
@@ -3759,7 +3765,6 @@
insertRotation(pb, mat, auto)
-
def matchPoseScale(pb, fkPb, auto):
mat = getPoseMatrix(fkPb.matrix, pb)
pb.scale = mat.to_scale()
@@ -3776,11 +3781,11 @@
(uparmIk, loarmIk, elbow, elbowPt, wrist) = getSnapBones(rig, "ArmIK", suffix)
(uparmFk, loarmFk, elbowPtFk, handFk) = getSnapBones(rig, "ArmFK", suffix)
- matchPoseRotation(uparmFk, uparmIk, auto)
- matchPoseScale(uparmFk, uparmIk, auto)
+ matchPoseRotation(uparmFk, uparmFk, auto)
+ matchPoseScale(uparmFk, uparmFk, auto)
- matchPoseRotation(loarmFk, loarmIk, auto)
- matchPoseScale(loarmFk, loarmIk, auto)
+ matchPoseRotation(loarmFk, loarmFk, auto)
+ matchPoseScale(loarmFk, loarmFk, auto)
if rig["&HandFollowsWrist" + suffix]:
matchPoseRotation(handFk, wrist, auto)
@@ -3814,11 +3819,11 @@
(uplegIk, lolegIk, kneePt, ankleIk, legIk, legFk, footIk, toeIk) = getSnapBones(rig, "LegIK", suffix)
(uplegFk, lolegFk, kneePtFk, footFk, toeFk) = getSnapBones(rig, "LegFK", suffix)
- matchPoseRotation(uplegFk, uplegIk, auto)
- matchPoseScale(uplegFk, uplegIk, auto)
+ matchPoseRotation(uplegFk, uplegFk, auto)
+ matchPoseScale(uplegFk, uplegFk, auto)
- matchPoseRotation(lolegFk, lolegIk, auto)
- matchPoseScale(lolegFk, lolegIk, auto)
+ matchPoseRotation(lolegFk, lolegFk, auto)
+ matchPoseScale(lolegFk, lolegFk, auto)
return
@@ -3904,6 +3909,7 @@
bl_idname = "mhx.fix_ankle"
bl_label = "Fix ankle"
bl_description = "Set inverse for ankle Child-of constraints"
+ bl_options = {'UNDO'}
suffix = StringProperty()
def execute(self, context):
@@ -3915,6 +3921,7 @@
bl_idname = "mhx.clear_ankle"
bl_label = "Clear ankle"
bl_description = "Clear inverse for ankle Child-of constraints"
+ bl_options = {'UNDO'}
suffix = StringProperty()
def execute(self, context):
@@ -3944,6 +3951,7 @@
class VIEW3D_OT_MhxSnapFk2IkButton(bpy.types.Operator):
bl_idname = "mhx.snap_fk_ik"
bl_label = "Snap FK"
+ bl_options = {'UNDO'}
data = StringProperty()
def execute(self, context):
@@ -3961,6 +3969,7 @@
class VIEW3D_OT_MhxSnapIk2FkButton(bpy.types.Operator):
bl_idname = "mhx.snap_ik_fk"
bl_label = "Snap IK"
+ bl_options = {'UNDO'}
data = StringProperty()
def execute(self, context):
@@ -4015,6 +4024,7 @@
class VIEW3D_OT_MhxToggleFkIkButton(bpy.types.Operator):
bl_idname = "mhx.toggle_fk_ik"
bl_label = "FK - IK"
+ bl_options = {'UNDO'}
toggle = StringProperty()
def execute(self, context):
@@ -4195,6 +4205,7 @@
class VIEW3D_OT_MhxUpdateTexturesButton(bpy.types.Operator):
bl_idname = "mhx.update_textures"
bl_label = "Update"
+ bl_options = {'UNDO'}
def execute(self, context):
scn = context.scene
@@ -4214,6 +4225,7 @@
class VIEW3D_OT_MhxAddHidersButton(bpy.types.Operator):
bl_idname = "mhx.add_hiders"
bl_label = "Add Hide Property"
+ bl_options = {'UNDO'}
def execute(self, context):
rig = context.object
@@ -4241,6 +4253,7 @@
class VIEW3D_OT_MhxRemoveHidersButton(bpy.types.Operator):
bl_idname = "mhx.remove_hiders"
bl_label = "Remove Hide Property"
+ bl_options = {'UNDO'}
def execute(self, context):
rig = context.object
@@ -4317,6 +4330,7 @@
class VIEW3D_OT_MhxEnableAllLayersButton(bpy.types.Operator):
bl_idname = "mhx.pose_enable_all_layers"
bl_label = "Enable all layers"
+ bl_options = {'UNDO'}
def execute(self, context):
rig,mesh = getMhxRigMesh(context.object)
@@ -4329,6 +4343,7 @@
class VIEW3D_OT_MhxDisableAllLayersButton(bpy.types.Operator):
bl_idname = "mhx.pose_disable_all_layers"
bl_label = "Disable all layers"
+ bl_options = {'UNDO'}
def execute(self, context):
rig,mesh = getMhxRigMesh(context.object)
More information about the Bf-extensions-cvs
mailing list