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, bool clear_existing=true) const
 Sets primvar's indices, making it an indexed primvar. More...
 
bool copyProperty (const UT_StringRef &srcprimpath, const UT_StringRef &srcpropertyname, const HUSD_FindPrims &finddestprims, const UT_StringRef &destpropertyname, bool copymetadata, bool blocksource)
 
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_StringHolder::theEmptyString, bool custom=true, bool clear_existing=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_StringHolder::theEmptyString, int elementsize=1, bool clear_existing=true) 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_StringHolder::theEmptyString, bool custom=true, bool clear_existing=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_StringHolder::theEmptyString, int elementsize=1, bool clear_existing=true) const
 
bool setAttributes (const UT_StringRef &primpath, const UT_Options &options, const HUSD_TimeCode &timecode, const UT_StringRef &attrnamespace=UT_StringHolder::theEmptyString, bool clear_existing=true) 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...
 
bool blockAttributeAnimation (const UT_StringRef &primpath, const UT_StringRef &attrname) const
 Blocks animation on an attribute. More...
 
bool connect (const UT_StringRef &src_primpath, const UT_StringRef &src_attrname, const UT_StringRef &dst_primpath, const UT_StringRef &dst_attrname) const
 
bool disconnect (const UT_StringRef &primpath, const UT_StringRef &attrname) const
 Disconnects a shading (ie input or output) attribute from its source. More...
 
bool disconnectIfConnected (const UT_StringRef &primpath, const UT_StringRef &attrname) const
 Disconnects a shading (ie input or output) attribute from its source. More...
 
bool isConnected (const UT_StringRef &primpath, const UT_StringRef &attrname) const
 Disconnects a shading (ie input or output) attribute from its source. 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 35 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::blockAttributeAnimation ( const UT_StringRef &  primpath,
const UT_StringRef &  attrname 
) const

Blocks animation on an attribute.

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.

bool HUSD_SetAttributes::connect ( const UT_StringRef &  src_primpath,
const UT_StringRef &  src_attrname,
const UT_StringRef &  dst_primpath,
const UT_StringRef &  dst_attrname 
) const

Creates a connection between the given shading (ie, input or output) attributes.

bool HUSD_SetAttributes::copyProperty ( const UT_StringRef &  srcprimpath,
const UT_StringRef &  srcpropertyname,
const HUSD_FindPrims &  finddestprims,
const UT_StringRef &  destpropertyname,
bool  copymetadata,
bool  blocksource 
)

Copies an attribute from one primitive to another. This method will copy all values and time samples, ensure matching data types, etc.

bool HUSD_SetAttributes::disconnect ( const UT_StringRef &  primpath,
const UT_StringRef &  attrname 
) const

Disconnects a shading (ie input or output) attribute from its source.

bool HUSD_SetAttributes::disconnectIfConnected ( const UT_StringRef &  primpath,
const UT_StringRef &  attrname 
) const

Disconnects a shading (ie input or output) attribute from its source.

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.

bool HUSD_SetAttributes::isConnected ( const UT_StringRef &  primpath,
const UT_StringRef &  attrname 
) const

Disconnects a shading (ie input or output) attribute from its source.

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_StringHolder::theEmptyString,
bool  custom = true,
bool  clear_existing = 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_StringHolder::theEmptyString,
bool  custom = true,
bool  clear_existing = true 
) const
inline

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

Definition at line 80 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,
bool  clear_existing = true 
) 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_StringHolder::theEmptyString,
int  elementsize = 1,
bool  clear_existing = true 
) 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_StringHolder::theEmptyString,
int  elementsize = 1,
bool  clear_existing = true 
) const
inline

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

Definition at line 93 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,
bool  clear_existing = true 
) const

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


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