2021-04-05 01:35:12 +02:00
|
|
|
import bpy
|
|
|
|
|
|
|
|
|
2021-04-05 01:39:27 +02:00
|
|
|
class UAC_PT_walk_cycle_anim_panel(bpy.types.Panel):
|
2021-04-05 01:35:12 +02:00
|
|
|
bl_space_type = "VIEW_3D"
|
|
|
|
bl_region_type = "UI"
|
|
|
|
bl_category = "Anim"
|
|
|
|
bl_label = "Walk Cycle anim"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.operator('anim.create_curve_path', text='Create Curve at Root Position', icon='CURVE_BEZCURVE')
|
|
|
|
#-# path and ground objects
|
|
|
|
layout.prop_search(context.scene.anim_cycle_settings, "path_to_follow", context.scene, "objects")
|
|
|
|
layout.prop_search(context.scene.anim_cycle_settings, "gnd", context.scene, "objects")
|
|
|
|
layout.operator('anim.snap_curve_to_ground', text='Snap curve to ground', icon='SNAP_ON')
|
|
|
|
layout.operator('anim.animate_path', text='Animate Path (select foot)', icon='ANIM')
|
|
|
|
layout.operator('anim.adjust_animation_length', icon='MOD_TIME')
|
|
|
|
# layout.label(text='Loop cycle')
|
|
|
|
|
|
|
|
## Créer automatiquement le follow path et l'anim de base
|
|
|
|
|
|
|
|
## Bake cycle (on selected)
|
|
|
|
|
|
|
|
## Expand Cycle
|
|
|
|
|
|
|
|
|
|
|
|
# expand cycle
|
|
|
|
# layout.prop(context.scene.anim_cycle_settings, "expand_on_selected_boned")
|
|
|
|
|
|
|
|
# Pin feet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes=(
|
2021-04-05 01:39:27 +02:00
|
|
|
UAC_PT_walk_cycle_anim_panel,
|
2021-04-05 01:35:12 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
def register():
|
|
|
|
for cls in classes:
|
|
|
|
bpy.utils.register_class(cls)
|
|
|
|
|
|
|
|
def unregister():
|
|
|
|
for cls in reversed(classes):
|
|
|
|
bpy.utils.unregister_class(cls)
|