Home Reference HScript commands 

chread hscript command

Reads channel data from a file.

Usages

  1. chread [-f fstart fend | -o fstart | -n] parameter_name_patterns chan_or_bchan_filename

  2. chread [-f fstart fend | -o fstart | -n] [-r src_pat dest_pat] chn_or_bchn_filename

  3. chread -i filename

  • If the filename ends in .chan or .bchan:

    The specified file is assumed to be a raw channel data file and column data from the file will be read and matched with the parameters listed in the order specified. For non-animated parameters, new channels will be created as needed.

    The -f option gives the frame range to load the data into. Raw data will be scaled if the frame range is greater than the number of available data frames. Otherwise, no scaling will occur.

    Unlike the -f option, the -o option simply gives the starting frame for loading the data (no scaling will be done).

    If the -f and -o options are omitted, loading will start at the global animation start time.

    If the -n option is specified, any previous animation on a channel will be deleted before loading.

  • If the filename ends in .chn or .bchn:

    The specified file is assumed to be a keyframe data channel file and loaded into the current hip file.

    The -f option gives the frame range to load the data into. Keys will be scaled into the frame range if the file’s range does not match.

    The -o option gives the starting frame to load the data into (no scaling will be done).

    If the -f and -o options are omitted, then the file’s frame range is used.

    If there are existing channels, then any animation outside the frame range will be preserved with keys set at the beginning and end of the frame range. If the -n option is specified, then any previous animation will be deleted first.

    The -r option allows renaming of channel node paths before the channels are loaded from file. In the chwrite command, full paths of the nodes are saved out. This option allows the mapping of animation from one set of nodes into a different set. This renaming function will rename nodes from the data file in the same manner as how the Rename CHOP functions.

    For any nodes that do not match the src_pat (source pattern), then will be loaded into their original path. Note that if the destination node is not found, then loading will stop.

  • If you specify the -i option:

    The command takes specified file (.chn, .bchn, .chan, or .bchan extension) and gives information regarding the file. This option is similar in output to the command line “chinfo” program.

Note

This command is not undoable.

Replaced by