forked from bartvdbraak/blender
16e736b7db
Ported joeedh's Euler Filter code from Python to C so that this is more in line with the other Graph Editor tools - i.e. joeedh's version only worked on the active bone's curves, while standard tools could work with multiple bones/objects at the same time. To use this new version of this operator: 1) Select all the F-Curves for all 3 of the components (XYZ) for the euler rotations you wish to clean up. In the Graph Editor, they must be one after the other (i.e. you can't have "RotX, RotY, something else, RotZ") 2) Activate the operator from the Key menu in the Graph Editor In an old test file I have floating around, this method did not appear to be good enough to fix a very clear discontinuity in the middle of the action, so I'll test some additional methods too
58 lines
1.5 KiB
Python
58 lines
1.5 KiB
Python
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#,
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
#
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
# <pep8 compliant>
|
|
|
|
if "bpy" in locals():
|
|
from imp import reload as _reload
|
|
for val in _modules_loaded.values():
|
|
_reload(val)
|
|
_modules = (
|
|
"add_mesh_torus",
|
|
"animsys_update",
|
|
"image",
|
|
"mesh",
|
|
"nla",
|
|
"object_align",
|
|
"object",
|
|
"object_randomize_transform",
|
|
"presets",
|
|
"screen_play_rendered_anim",
|
|
"sequencer",
|
|
"uvcalc_follow_active",
|
|
"uvcalc_lightmap",
|
|
"uvcalc_smart_project",
|
|
"vertexpaint_dirt",
|
|
"wm",
|
|
)
|
|
__import__(name=__name__, fromlist=_modules)
|
|
_namespace = globals()
|
|
_modules_loaded = {name: _namespace[name] for name in _modules}
|
|
del _namespace
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
def register():
|
|
bpy.utils.register_module(__name__)
|
|
|
|
|
|
def unregister():
|
|
bpy.utils.unregister_module(__name__)
|