HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MOT_GeometryChannelsManager Class Reference

#include <MOT_GeometryChannelsManager.h>

Public Member Functions

 MOT_GeometryChannelsManager ()
 
UT_StringHolder scopeGeometryChannels (SOP_Node *node, const UT_StringHolder &pattern="")
 
UT_StringHolder scopeGeometryChannels (const GU_ConstDetailHandle &detail, const UT_StringHolder &collection_name="", const UT_StringHolder &pattern="")
 
void unscopeGeometryChannels (const UT_StringHolder &collection_name)
 Unscope geometry channels with the given collection name. More...
 
void unscopeGeometryChannels (SOP_Node *node)
 Unscope geometry channels from the given node. More...
 
UT_StringHolder reserveNewGeometryCollectionName ()
 
UT_StringArray getChannelNames (const GU_ConstDetailHandle &gdh, UT_StringHolder pattern="")
 
int getCollectionNodeId (const UT_StringHolder &collection_name) const
 
UT_StringHolder getCollectionPattern (const UT_StringHolder &collection_name) const
 
void getGeometryChannels (GU_DetailHandle &gdh, const UT_StringHolder &collection_name, const UT_StringArray &names) const
 
void getGeometryChannels (GU_DetailHandle &gdh, const UT_StringHolder &collection_name) const
 
void setGeometryChannels (const GU_DetailHandle &gdh, const UT_StringHolder &pattern="", const UT_StringHolder &collection_name="")
 
void clear ()
 

Detailed Description

Definition at line 31 of file MOT_GeometryChannelsManager.h.

Constructor & Destructor Documentation

MOT_GeometryChannelsManager::MOT_GeometryChannelsManager ( )

Member Function Documentation

void MOT_GeometryChannelsManager::clear ( )
UT_StringArray MOT_GeometryChannelsManager::getChannelNames ( const GU_ConstDetailHandle gdh,
UT_StringHolder  pattern = "" 
)
int MOT_GeometryChannelsManager::getCollectionNodeId ( const UT_StringHolder collection_name) const
UT_StringHolder MOT_GeometryChannelsManager::getCollectionPattern ( const UT_StringHolder collection_name) const
void MOT_GeometryChannelsManager::getGeometryChannels ( GU_DetailHandle gdh,
const UT_StringHolder collection_name,
const UT_StringArray names 
) const

Write the geometry channels with the given names into the provided geometry

Parameters
gdpThe geometry to fill with the geometry channels
collection_nameName of the collection to get the channels from
namesNames of the channels to fetch.
void MOT_GeometryChannelsManager::getGeometryChannels ( GU_DetailHandle gdh,
const UT_StringHolder collection_name 
) const

Write all geometry channels in the collection into the provided geometry

Parameters
gdpThe geometry to fill with the geometry channels
collection_nameName of the collection to get the channels from
UT_StringHolder MOT_GeometryChannelsManager::reserveNewGeometryCollectionName ( )

Returns a unique name for a new geometry collection, based on the myNextGeometryChannelsId property. This is used both internally when scoping new collections, and when adding geometry collections to the HOM ChannelList. In this second case, the collections are not actually scoped until later setting the channel list, but the name should be reserved ahead of time to prevent possible conflicts.

UT_StringHolder MOT_GeometryChannelsManager::scopeGeometryChannels ( SOP_Node node,
const UT_StringHolder pattern = "" 
)

Extracts geometry channels (channel primitives) from the provided sop node, scoping them into the CH_Manager. Adds listeners to the node to rescope channels when they are modified. SOP_Node to extract the channel primitives from.

Parameters
patternOptional primitive group pattern to extract only certain primitives from the node's geometry.
Returns
name of the collection
UT_StringHolder MOT_GeometryChannelsManager::scopeGeometryChannels ( const GU_ConstDetailHandle detail,
const UT_StringHolder collection_name = "",
const UT_StringHolder pattern = "" 
)

Extracts geometry channels (channel primitives) from the provided geometry handle, scoping them into the CH_Manager.

Parameters
detailGeometry from which to extract the channel primitives
collection_nameOptional name for the collection, used to refer to it for later fetching or updating its channels. If not provided, a unique name will be created. If a collection with the same name already exists, it will be updated instead of a new one being created. In this case, dataid's will be checked to ensure only modified channels are updated. if the name attrib dataid of the detail was changed, the existing collection will be destroyed and a new one created from scratch.
patternOptional primitive group pattern to extract only certain primitives from the geometry.
Returns
name of the collection Also see setGeometryChannels for updating an existing collection.
void MOT_GeometryChannelsManager::setGeometryChannels ( const GU_DetailHandle gdh,
const UT_StringHolder pattern = "",
const UT_StringHolder collection_name = "" 
)

Perform a partial update of a given collection, overwriting channels which match the pattern with the ones in the provided detail.

Parameters
gdhThe geometry used to update the collection's channels.
patternThe primitive group pattern to determine which channel primitives should be updated. Note that this does not overwrite the original pattern used to originally construct the collection in scopeGeometryChannels
collectionname Name of the collection to update.

Note that this method ignores name dataid checks, as the detail used to set geometry channels may be different from the one the channels were originally loaded from. If the given collection does not exist, this method instead creates a new one, using scopeGeometryChannels.

void MOT_GeometryChannelsManager::unscopeGeometryChannels ( const UT_StringHolder collection_name)

Unscope geometry channels with the given collection name.

void MOT_GeometryChannelsManager::unscopeGeometryChannels ( SOP_Node node)

Unscope geometry channels from the given node.


The documentation for this class was generated from the following file: