diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-10 17:30:52 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-11-10 17:30:52 +0300 |
commit | 9d276937de26f82a4bbaded388ed474b951f338a (patch) | |
tree | d6aef9e3277d5d162f29644209f79180a6c94c82 /mocap/__init__.py | |
parent | 95a71fb815641a6b55c8d796c0106d1a159fd125 (diff) |
Fix T42476: Mocap addon: "Clean noise" didn't work properly.
Patch by sybrenstuvel (Sybren Stüvel), with own tweaking (main issue was,
fcurve needs to be updated when you have changed their keyframes), thanks!
Diffstat (limited to 'mocap/__init__.py')
-rw-r--r-- | mocap/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mocap/__init__.py b/mocap/__init__.py index 62e3709f..fd69f89f 100644 --- a/mocap/__init__.py +++ b/mocap/__init__.py @@ -579,18 +579,19 @@ class OBJECT_OT_LooperButton(bpy.types.Operator): class OBJECT_OT_DenoiseButton(bpy.types.Operator): #Operator to denoise impluse noise on the active object's fcurves - """Denoise active armature's animation (good for dealing """ \ - """with 'bad' frames inherent in mocap animation)""" + """Removes spikes from all fcurves on the selected object""" bl_idname = "mocap.denoise" bl_label = "Denoise Mocap" def execute(self, context): - mocap_tools.denoise_median() + obj = context.active_object + mocap_tools.denoise(obj, obj.animation_data.action.fcurves) return {'FINISHED'} @classmethod def poll(cls, context): - return context.active_object.animation_data + obj = context.active_object + return obj and obj.animation_data and obj.animation_data.action class OBJECT_OT_LimitDOFButton(bpy.types.Operator): |