Skip to content

Commit

Permalink
Fix animation stutter in any Source game by adding an "idle" sequence…
Browse files Browse the repository at this point in the history
…, like the original vactube animations (#252)

* Add "idle" sequence
* Use "ref.smd" as default sequence
  • Loading branch information
karl-police committed Nov 18, 2023
1 parent a1efec0 commit 47afc57
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion transforms/vactubes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
$definebone "root" "" 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
$attachment "move" "root" 0.0 0.0 0.0
$sequence "ref" {{
"ref.smd"
fps {fps}
snap
}}
'''

SEQ_TEMPLATE = '''\
Expand Down Expand Up @@ -231,7 +237,10 @@ async def vactube_transform(ctx: Context) -> None:
mesh.export(mesh_file)

with open(temp_dir + '/prop.qc', 'w') as qc_file:
qc_file.write(QC_TEMPLATE.format(path=anim_mdl_name.as_posix()))
qc_file.write(QC_TEMPLATE.format(
path=anim_mdl_name.as_posix(),
fps=animations.FPS,
))

for i, anim in enumerate(all_anims):
anim.name = anim_name = f'anim_{i:03x}'
Expand Down

0 comments on commit 47afc57

Please sign in to comment.