HC_Rename_Segment

void HC_Rename_Segment(char const *old_seg_name, char const *new_seg_name)
void HC_Rename_Segment(char const old_seg_name, char const new_seg_name)

Changes the name of a segment, and/or moves it somewhere else in the segment tree.

Rename_Segment() can be used to give a simple name change to a subsegment within a segment. Or can be used to move a segment from one place in the segment tree to somewhere completely different. If moved, the renamed segment behaves as if it were created there. In particular, a Rename can have the effect of moving segments into and out of the current scene.

If the new_seg_name specification contains a wildcard on the end, that wildcard gets matched with the lowest-level name on the incoming segment. For example, a rename from “A/B/C” to “D/\*” results in a segment named “D/C”. More commonly, you would use a wildcard on the new_seg_name segment name only if you were using wildcards on the input name too, such as renaming from “A/B/\*” to “D/\*”.

If wildcards are used on the input side, the search for the qualifying segments is completed before renaming actually begins. Care should be taken if segments being renamed might contain other segments being renamed.

Include_Segment() and Style_Segment() references to a segment being Renamed will be left attached, even though the segment now has a name different from that specified in the original call to Include or Style.

If new_seg_name is a blank or null string, the existing name of old_seg_name, if any, is removed. The segment becomes a “nameless” segment (see Open_Segment() .)

HC_Copy_Segment, HC_Open_Segment, HC_Close_Segment, HC_Delete_Segment.

Parameters

old_seg_name: Segment(s) to be renamed.

new_seg_name: New name to use. May contain a “/\*” on the end, but not any other wildcards.