auto_walk/properties.py

84 lines
3.1 KiB
Python

import bpy
from bpy.props import (
IntProperty,
BoolProperty,
StringProperty,
FloatProperty,
EnumProperty,
)
class UAC_PG_settings(bpy.types.PropertyGroup) :
## HIDDEN to hide the animatable dot thing
path_to_follow : bpy.props.PointerProperty(type=bpy.types.Object,
name="Path", description="Curve object used")
gnd : bpy.props.PointerProperty(type=bpy.types.Object,
name="Ground", description="Choose the ground object to use")
expand_on_selected_bones : bpy.props.BoolProperty(
name="On selected", description="Expand on selected bones",
default=False, options={'HIDDEN'})
linear : bpy.props.BoolProperty(
name="Linear", description="keep the animation path linear\
\nElse step the path usings follow path cycle keys)",
default=True, options={'HIDDEN'})
start_frame : bpy.props.IntProperty(
name="Start Frame", description="Starting frame for animation path",
default=100,
min=0, max=2**31-1, soft_min=0, soft_max=2**31-1, step=1, options={'HIDDEN'})#, subtype='PIXEL'
forward_axis : bpy.props.EnumProperty(
name='Forward Axis',
default='TRACK_NEGATIVE_Y', # Modifier default is FORWARD_X
description='Local axis of the "root" bone that point forward',
items=(
('FORWARD_X', 'X', ''),
('FORWARD_Y', 'Y', ''),
('FORWARD_Z', 'Z', ''),
('TRACK_NEGATIVE_X', '-X', ''),
('TRACK_NEGATIVE_Y', '-Y', ''),
('TRACK_NEGATIVE_Z', '-Z', ''),
),
)
"""
## foot axis not needed (not always aligned with character direction)
foot_axis : EnumProperty(
name="Foot Axis", description="Foot forward axis",
default='Y', options={'HIDDEN', 'SKIP_SAVE'},
items=(
('X', 'X', '', 0),
('Y', 'Y', '', '', 1),
('Z', 'Z', '', '', 2),
# ('-X', '-X', '', 3),
# ('-Y', '-Y', '', '', 4),
# ('-Z', '-Z', '', '', 5),
))
"""
# someBool : BoolProperty(
# name="", description="",
# default=True,
# options={'HIDDEN'})
# keyframe_type : EnumProperty(
# name="Keyframe Filter", description="Only jump to defined keyframe type",
# default='ALL', options={'HIDDEN', 'SKIP_SAVE'},
# items=(
# ('ALL', 'All', '', 0), # 'KEYFRAME'
# ('KEYFRAME', 'Keyframe', '', 'KEYTYPE_KEYFRAME_VEC', 1),
# ('BREAKDOWN', 'Breakdown', '', 'KEYTYPE_BREAKDOWN_VEC', 2),
# ('MOVING_HOLD', 'Moving Hold', '', 'KEYTYPE_MOVING_HOLD_VEC', 3),
# ('EXTREME', 'Extreme', '', 'KEYTYPE_EXTREME_VEC', 4),
# ('JITTER', 'Jitter', '', 'KEYTYPE_JITTER_VEC', 5),
# ))
def register():
bpy.utils.register_class(UAC_PG_settings)
bpy.types.Scene.anim_cycle_settings = bpy.props.PointerProperty(type = UAC_PG_settings)
def unregister():
bpy.utils.unregister_class(UAC_PG_settings)
del bpy.types.Scene.anim_cycle_settings