Home Reference HScript commands 

chrefit hscript command

Refits the channels using cubic interpolation.

Usages

  1. chrefit [-v] [-l] [-r|-R start end] [-t tolerance] channel_patterns

Refits the channels using cubic interpolation, deletes keys and inserts new ones where appropriate.

This is useful when a channel has too many keys and needs to be simplified by approximating it with a cubic interpolation. This command obtains the channel values for each frame and fits curve segments through them within a given tolerance.

The key are inserted at the boundaries of the approximating curve segments. If option -l is specified, keys are inserted at the local maxima and minima.

If the range is specified with either -r or -R option, the channel is refitted only within this interval. These options can be also used to extend the channel length, which is useful for channels that contain expressions such as 'sin($F)'.

Options

-v

Print verbose output.

-l

Key local maxima and minima.

-t tolerance

The tolerance for fitting the existing channel data to the new curve. If you don’t specify a tolerance, the command defaults to 0.01.

-r start end

Defines a time interval within which to refit the channel.

-R start end

Defines a frame range within which to refit the channel.

Examples

chrefit /obj/model/tx
Refits tx channel for /obj/model/.

chrefit -t 1.0 /obj/model/t?
Refits all translates (and two-letter channels that start with t) with the tolerance of 1.0

chrefit -v -t 0.0001 /obj/obj1/*
Refits all channels in /obj/obj1 with the tolerance of 0.0001 and requesting the verbose report on the operation

chrefit -R 10 20 /obj/obj1/rz
Refits a rotation around z (rz) channel of obj1 object between frame 10 and frame 20

Replaced by

Replaced by hou.Parm.refit