MaxScript Guides Interface
This interface is used to operate on core guides structure used by Ornatrix. Guides are same as hair except that they hold extra data and provide more functions. When using a guide interface you can use guides.AsHair()
to obtain their MaxScript hair interface.
Guide interface to any Ornatrix hair object is obtained through object.GetGuides()
command on any baked guides object or other object derived from class GuidesObject
. Once you have the guides interface you can use the following functions to access and manipulate it:
/* Gets the hair interface which can be used to manipulate the guides topology, geometry, and channel data among other things.
returns: Hair interface
*/
myGuides.AsHair()
/* Sets the total number of strands thus resizing the guides object
count Root count
keep If true any previous roots will be kept if possible
*/
myGuides.SetNumRoots count keep
/* Deletes specified strands from the guides object
set Roots to delete
*/
myGuides.DeleteRootSet set
/* Sets the total number of vertices in guides
count Vertex count
keep If true previous vertices will be kept when possible
*/
myGuides.SetNumVerts count keep
/* Appends specified vertices to the vertex array
vertices Vertices to append
count Vertex count
*/
myGuides.AppendVerts vertices count
/* Deletes specified vertices
set Vertices to delete
*/
myGuides.DeleteVertSet set
/* Sets the number of per-vertex channels
count Per-vertex channel count
@bool keep If true, previous channel data will be kept when possible
*/
myGuides.VertexDataCount count keep
/* Gets single vertex data for specified channel and vertex.
channelIndex Channel index
vertexIndex Vertex index
returns: Channel value
*/
channelValue = myGuides.GetVertData channelIndex vertexIndex
/* Sets single vertex data for specified channel and vertex
channelIndex Channel index
vertexIndex Vertex index
value Channel value
*/
myGuides.SetVertData channelIndex vertexIndex value
/* Gets a single vertex data for specified channel, root, and point
channelIndex Channel index
rootIndex Strand index
pointIndex Index of point on strand
*/
channelValue = myGuides.GetPointData channelIndex rootIndex pointIndex
/* Sets a single vertex data for specified channel, root, and point
channelIndex Channel index
rootIndex Strand index
pointIndex Index of point on strand
value Channel value
*/
myGuides.SetPointData channelIndex rootIndex pointIndex value
/* Sets the vertex channel name for specified channel. This name appears in the UI.
channelIndex Channel index
name Name to assign
*/
myGuides.SetVertChanName channelIndex name
/* Gets the vertex channel name for specified channel. This name appears in the UI.
channelIndex Channel index
returns: Channel name
*/
channelName = myGuides.GetVertChanName channelIndex
/* Delete a set of channels based on a bit array
set Channels to delete
*/
myGuides.DeleteVertChanSet set
/* Sets the number of per-root channels
count Per-root channel count
@bool keep If true, previous channel data will be kept when possible
*/
myGuides.RootDataCount count keep
/* Gets single root data for specified channel and root.
channelIndex Channel index
rootIndex Root index
returns: Channel value
*/
value = myGuides.GetRootData channelIndex rootIndex
/* Sets single root data for specified channel and root
channelIndex Channel index
rootIndex Root index
value Channel value
*/
myGuides.SetRootData channelIndex rootIndex value
/* Sets the root channel name for specified channel. This name appears in the UI.
channelIndex Channel index
name Name to assign
*/
myGuides.SetRootChanName channelIndex name
/* Gets the root channel name for specified channel. This name appears in the UI.
channelIndex Channel index
returns: Channel name
*/
channelName = myGuides.GetRootChanName channelIndex
/* Delete a set of channels based on a bit array
set Channels to delete
*/
myGuides.DeleteRootChanSe set
/* Gets root selection value
rootIndex Root index
returns: Selection value
*/
selectionValue = myGuides.GetRootSel rootIndex
/* Sets root selection value
rootIndex Root index
selection Selection value
*/
myGuides.SetRootSel rootIndex selection
/* Gets a vertex weight value. This may be used when editing or brushing guides to affect points differently.
vertexIndex Vertex index
returns: Vertex weight
*/
weight = myGuides.GetWeight vertexIndex
/* Sets a vertex weight value. This may be used when editing or brushing guides to affect points differently.
vertexIndex Vertex index
weight Vertex weight
*/
myGuides.SetWeight vertexIndex weight
/* Sets a display flag
flag Display flag
*/
myGuides.SetDispFlag flag
/* Gets a display flag
flag Display flag
returns: Flag value
*/
isOn = myGuides.GetDispFlag flag
/* Clears a display flag
flag Display flag
*/
myGuides.ClearDispFlag flag
/* Gets the current binary selection state of strands
returns: Strand selection
*/
selection = myGuides.GetStrandSelection()
/* Sets the current binary selection state of strands
selection Strand selection
*/
myGuides.SetStrandSelection selection
Missing Something? Let us know if this page needs more information about the topic.