45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
|
import bpy
|
||
|
|
||
|
|
||
|
class WCA_PT_walk_cycle_anim_panel(bpy.types.Panel):
|
||
|
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=(
|
||
|
WCA_PT_walk_cycle_anim_panel,
|
||
|
)
|
||
|
|
||
|
def register():
|
||
|
for cls in classes:
|
||
|
bpy.utils.register_class(cls)
|
||
|
|
||
|
def unregister():
|
||
|
for cls in reversed(classes):
|
||
|
bpy.utils.unregister_class(cls)
|