# SPDX-License-Identifier: GPL-2.0-or-later bl_info = { "name": "Auto Walk", "description": "Develop a walk/run cycles along a curve and pin feets", "author": "Samuel Bernou", "version": (1, 8, 1), "blender": (3, 0, 0), "location": "View3D", "warning": "", "doc_url": "https://gitlab.com/autour-de-minuit/blender/auto_walk", "category": "Object"} if 'bpy' in locals(): import importlib as imp imp.reload(properties) imp.reload(preferences) imp.reload(OP_setup) imp.reload(OP_setup_curve_path) imp.reload(OP_setup_curve_a_to_b) imp.reload(OP_animate_path) imp.reload(OP_expand_cycle_step) imp.reload(OP_snap_contact) imp.reload(OP_world_copy_paste) imp.reload(OP_wrap_anim) imp.reload(OP_nla_tweak) imp.reload(panels) else: from . import properties from . import preferences from . import OP_setup from . import OP_setup_curve_path from . import OP_setup_curve_a_to_b from . import OP_animate_path from . import OP_expand_cycle_step from . import OP_snap_contact from . import OP_world_copy_paste from . import OP_wrap_anim from . import OP_nla_tweak from . import panels import bpy from . import fn mods = ( properties, preferences, OP_setup, OP_setup_curve_path, OP_setup_curve_a_to_b, OP_animate_path, OP_expand_cycle_step, OP_snap_contact, OP_world_copy_paste, OP_wrap_anim, OP_nla_tweak, panels, ) from bpy.app.handlers import persistent ## Not # @persistent # def set_target_bone(scene): # # prefill constrained bone field # settings = bpy.context.scene.anim_cycle_settings # if not settings.tgt_bone: # settings.tgt_bone = fn.get_addon_prefs().tgt_bone def register(): if bpy.app.background: return for module in mods: module.register() prefs = fn.get_addon_prefs() panels.update_panel(prefs, bpy.context) # bpy.app.handlers.load_post.append(set_target_bone) def unregister(): if bpy.app.background: return # bpy.app.handlers.load_post.remove(set_target_bone) for module in reversed(mods): module.unregister() if __name__ == "__main__": register()