BillboardZ bugfix for Max2DTS Exporter
by Paul Dana · 05/02/2003 (1:01 pm) · 0 comments
A BillboardZ is a mesh that rotates to face the viewer, but unlike a regular Billboard, will only rotate about it's Z axis. You flag a mesh as a Z billboard in Max by prefixing it's name with the special flag "BBZ::", but the max exporter fails to export BillboardZ meshes correcty.
This is a one line fix. Open the file ShapeMimic.cc and make the change I have indcated below:
The rest of the code handles BillboardZ meshes just fine but this one bug keeps that code from executing.
This is a one line fix. Open the file ShapeMimic.cc and make the change I have indcated below:
//--------------------------------------------
// get object from object list -- create if not present
ObjectMimic * ShapeMimic::getObject(INode * pNode, char * name, S32 size, S32 * detailNum, F32 multiResPercent, bool matchFull, bool isBone, bool isSkin)
{
// if already encountered an error, then
// we'll just go through the motions
if (isError()) return NULL;
S32 i;
// if this is a billboard object, detect that now and adjust name accordingly
// Note: billboard objects are named BB::* (the BB:: is dropped from here on).
// phdana BBZ fix ->
bool billboard = pNode ? (SceneEnumProc::isBillboard(pNode)||SceneEnumProc::isBillboardZAxis(pNode)) : false;
// <- phdana BBZ fix
bool sortedObject = pNode ? SceneEnumProc::isSortedObject(pNode) : false;
...more codeThe rest of the code handles BillboardZ meshes just fine but this one bug keeps that code from executing.
