hkb_editor.workflows.register_clips
¶
register_clips
¶
register_clips(
behavior: HavokBehavior,
animations: list[str],
*,
playback_mode: hkbClipGenerator_PlaybackMode = PlaybackMode.SINGLE_PLAY,
flags: hkbClipGenerator_Flags = ClipFlags.NONE,
starttime_variable: str = None,
reuse_clips: bool = False,
) -> list[HkbRecord]
Create a ClipGenerator per animation and attach it to matching CMSGs.
CMSGs are matched on animId; animations with no CMSG are skipped with
a warning.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
behavior
|
HavokBehavior
|
Behavior to modify. |
required |
animations
|
list of str
|
Animation names, already validated. |
required |
playback_mode
|
hkbClipGenerator_PlaybackMode
|
Playback mode for the new clips. |
SINGLE_PLAY
|
flags
|
hkbClipGenerator_Flags
|
Clip flags for the new clips. |
NONE
|
starttime_variable
|
str
|
Bind the clips' |
None
|
reuse_clips
|
bool
|
Share one clip instance between CMSGs of the same animation. Rarely useful and can cause self transition problems (e.g. dodge stutter). |
False
|
Returns:
| Type | Description |
|---|---|
list of HkbRecord
|
The clips that were created. |
validate_clip_animations
¶
validate_clip_animations(
animations: list[str],
) -> list[str]
Strip empty lines and verify the animation names.
Raises ValueError if the list is empty or a name is malformed.