Brief Index      Full Index      Events Index      I.M. Reference

Rename_Segment


Functions

void Rename_Segment (const char *old_seg_name, const char *new_seg_name)
void Move_Segment (const char *old_seg_name, const char *new_seg_name)

Function Documentation

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

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

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 (see below).

DETAILS

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/*".

NOTES

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() .)

RESTRICTIONS

See also:
Copy_Segment, Open_Segment, Close_Segment, Delete_Segment.

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

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

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.

DETAILS

No additional details. See Rename_Segment()

NOTES

Move_Segment() is completely identical to Rename_Segment() . It is provided for compatibility with the UNIX style.

Brief Index      Full Index      Events Index      I.M. Reference