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

#include <HUSD_SetAttributes.h>

Public Member Functions

 HUSD_SetAttributes (HUSD_AutoWriteLock &lock)
 
 ~HUSD_SetAttributes ()
 
bool setPrimvarIndices (const UT_StringRef &primpath, const UT_StringRef &primvar_name, const UT_ExintArray &indices, const HUSD_TimeCode &timecode) const
 Sets primvar's indices, making it an indexed primvar. More...
 
bool addAttribute (const UT_StringRef &primpath, const UT_StringRef &attrname, const UT_StringRef &type, bool custom=true) const
 Create an attribute or primvar on a primitive. More...
 
bool addPrimvar (const UT_StringRef &primpath, const UT_StringRef &primvarname, const UT_StringRef &interpolation, const UT_StringRef &type) const
 Create an attribute or primvar on a primitive. More...
 
template<typename UtValueType >
bool setAttribute (const UT_StringRef &primpath, const UT_StringRef &attrname, const UtValueType &value, const HUSD_TimeCode &timecode, const UT_StringRef &valueType=UT_String::getEmptyString(), bool custom=true) const
 Set an attribute or primvar value on a primitive. More...
 
template<typename UtValueType >
bool setPrimvar (const UT_StringRef &primpath, const UT_StringRef &primvarname, const UT_StringRef &interpolation, const UtValueType &value, const HUSD_TimeCode &timecode, const UT_StringRef &valueType=UT_String::getEmptyString(), int elementsize=1) const
 Set an attribute or primvar value on a primitive. More...
 
template<typename UtValueType >
bool setAttributeArray (const UT_StringRef &primpath, const UT_StringRef &attrname, const UT_Array< UtValueType > &value, const HUSD_TimeCode &timecode, const UT_StringRef &valueType=UT_String::getEmptyString(), bool custom=true) const
 
template<typename UtValueType >
bool setPrimvarArray (const UT_StringRef &primpath, const UT_StringRef &primvarname, const UT_StringRef &interpolation, const UT_Array< UtValueType > &value, const HUSD_TimeCode &timecode, const UT_StringRef &valueType=UT_String::getEmptyString(), int elementsize=1) const
 
bool setAttributes (const UT_StringRef &primpath, const UT_Options &options, const HUSD_TimeCode &timecode, const UT_StringRef &attrnamespace=UT_StringHolder::theEmptyString) const
 Set attributes for every entry in a UT_Options object. More...
 
bool blockAttribute (const UT_StringRef &primpath, const UT_StringRef &attrname) const
 Blocks an attribute or primvar. More...
 
bool blockPrimvar (const UT_StringRef &primpath, const UT_StringRef &primvarname) const
 Blocks an attribute or primvar. More...
 
bool blockPrimvarIndices (const UT_StringRef &primpath, const UT_StringRef &primvarname) const
 Blocks an attribute or primvar. More...
 
HUSD_TimeCode getAttribEffectiveTimeCode (const UT_StringRef &primpath, const UT_StringRef &attribname, const HUSD_TimeCode &timecode) const
 
HUSD_TimeCode getPrimvarEffectiveTimeCode (const UT_StringRef &primpath, const UT_StringRef &primvarname, const HUSD_TimeCode &timecode) const
 
HUSD_TimeCode getPrimvarIndicesEffectiveTimeCode (const UT_StringRef &primpath, const UT_StringRef &primvarname, const HUSD_TimeCode &timecode) const
 

Detailed Description

Definition at line 28 of file HUSD_SetAttributes.h.

Constructor & Destructor Documentation

HUSD_SetAttributes::HUSD_SetAttributes ( HUSD_AutoWriteLock lock)
HUSD_SetAttributes::~HUSD_SetAttributes ( )

Member Function Documentation

bool HUSD_SetAttributes::addAttribute ( const UT_StringRef primpath,
const UT_StringRef attrname,
const UT_StringRef type,
bool  custom = true 
) const

Create an attribute or primvar on a primitive.

bool HUSD_SetAttributes::addPrimvar ( const UT_StringRef primpath,
const UT_StringRef primvarname,
const UT_StringRef interpolation,
const UT_StringRef type 
) const

Create an attribute or primvar on a primitive.

bool HUSD_SetAttributes::blockAttribute ( const UT_StringRef primpath,
const UT_StringRef attrname 
) const

Blocks an attribute or primvar.

bool HUSD_SetAttributes::blockPrimvar ( const UT_StringRef primpath,
const UT_StringRef primvarname 
) const

Blocks an attribute or primvar.

bool HUSD_SetAttributes::blockPrimvarIndices ( const UT_StringRef primpath,
const UT_StringRef primvarname 
) const

Blocks an attribute or primvar.

HUSD_TimeCode HUSD_SetAttributes::getAttribEffectiveTimeCode ( const UT_StringRef primpath,
const UT_StringRef attribname,
const HUSD_TimeCode timecode 
) const

Returns effective time code at which the value should be set. Eg, if attribute has time samples and the given time code is default, it needs to be "promoted" to time code for the specific frame/time. Otherwise, setting value at default time will not take effect, if there is already a value at that specific frame/time. This ensures that getAttribute() returns the same value as set here.

HUSD_TimeCode HUSD_SetAttributes::getPrimvarEffectiveTimeCode ( const UT_StringRef primpath,
const UT_StringRef primvarname,
const HUSD_TimeCode timecode 
) const

Returns effective time code at which the value should be set. Eg, if attribute has time samples and the given time code is default, it needs to be "promoted" to time code for the specific frame/time. Otherwise, setting value at default time will not take effect, if there is already a value at that specific frame/time. This ensures that getAttribute() returns the same value as set here.

HUSD_TimeCode HUSD_SetAttributes::getPrimvarIndicesEffectiveTimeCode ( const UT_StringRef primpath,
const UT_StringRef primvarname,
const HUSD_TimeCode timecode 
) const

Returns effective time code at which the value should be set. Eg, if attribute has time samples and the given time code is default, it needs to be "promoted" to time code for the specific frame/time. Otherwise, setting value at default time will not take effect, if there is already a value at that specific frame/time. This ensures that getAttribute() returns the same value as set here.

template<typename UtValueType >
bool HUSD_SetAttributes::setAttribute ( const UT_StringRef primpath,
const UT_StringRef attrname,
const UtValueType &  value,
const HUSD_TimeCode timecode,
const UT_StringRef valueType = UT_String::getEmptyString(),
bool  custom = true 
) const

Set an attribute or primvar value on a primitive.

template<typename UtValueType >
bool HUSD_SetAttributes::setAttributeArray ( const UT_StringRef primpath,
const UT_StringRef attrname,
const UT_Array< UtValueType > &  value,
const HUSD_TimeCode timecode,
const UT_StringRef valueType = UT_String::getEmptyString(),
bool  custom = true 
) const
inline

Set an attribute or primvar value on a primitive, but accept the subclasses of the UT_Array.

Definition at line 71 of file HUSD_SetAttributes.h.

bool HUSD_SetAttributes::setAttributes ( const UT_StringRef primpath,
const UT_Options options,
const HUSD_TimeCode timecode,
const UT_StringRef attrnamespace = UT_StringHolder::theEmptyString 
) const

Set attributes for every entry in a UT_Options object.

template<typename UtValueType >
bool HUSD_SetAttributes::setPrimvar ( const UT_StringRef primpath,
const UT_StringRef primvarname,
const UT_StringRef interpolation,
const UtValueType &  value,
const HUSD_TimeCode timecode,
const UT_StringRef valueType = UT_String::getEmptyString(),
int  elementsize = 1 
) const

Set an attribute or primvar value on a primitive.

template<typename UtValueType >
bool HUSD_SetAttributes::setPrimvarArray ( const UT_StringRef primpath,
const UT_StringRef primvarname,
const UT_StringRef interpolation,
const UT_Array< UtValueType > &  value,
const HUSD_TimeCode timecode,
const UT_StringRef valueType = UT_String::getEmptyString(),
int  elementsize = 1 
) const
inline

Set an attribute or primvar value on a primitive, but accept the subclasses of the UT_Array.

Definition at line 82 of file HUSD_SetAttributes.h.

bool HUSD_SetAttributes::setPrimvarIndices ( const UT_StringRef primpath,
const UT_StringRef primvar_name,
const UT_ExintArray indices,
const HUSD_TimeCode timecode 
) const

Sets primvar's indices, making it an indexed primvar.


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