Extracting Wrapped Objects
You can get MAX objects out of MAXScript wrapper values in several ways.
- Using one of the
Valuecoercion virtual functions :Value::to_node()Value::to_mtl()Value::to_texmap()Value::to_modifier()Value::to_controller()
- Using the following member function:
ReferenceTarget* MAXWrapper::get_max_object() - This function will retrieve the base object in a node inside aMAXNodewrapper value, rather than theINodeitself.
- Using the
ReferenceMaker::GetReference()function. AllMAXWrapperobjects store their MAX-side object reference as reference 0. For example:
ReferenceTarget* Get3dsMaxObject(MaxWrapper* wrapper) {
return maxwrapper->GetReference(0);
}
