mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Merge branch 'development' into style-cleanup
Conflicts: Engine/source/console/astNodes.cpp Engine/source/console/codeBlock.cpp Engine/source/console/compiledEval.cpp Engine/source/ts/collada/colladaAppMesh.cpp Engine/source/ts/tsShape.cpp Engine/source/ts/tsShapeConstruct.cpp
This commit is contained in:
commit
33ff180593
2053 changed files with 172002 additions and 69530 deletions
|
|
@ -623,7 +623,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
|
|||
delete meshPrims[iPrim];
|
||||
}
|
||||
|
||||
void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const MatrixF& objectOffset,
|
||||
void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const MatrixF& objOffset,
|
||||
Vector<Point3F>& v_points,
|
||||
Vector<Point3F>& v_norms,
|
||||
Vector<ColorI>& v_colors,
|
||||
|
|
@ -693,7 +693,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
|||
if (mAppNode->invertMeshes)
|
||||
points_array[iVert].z = -points_array[iVert].z;
|
||||
|
||||
objectOffset.mulP(points_array[iVert]);
|
||||
objOffset.mulP(points_array[iVert]);
|
||||
}
|
||||
|
||||
if (appendValues || ((tuple.mUV >= 0) && (tuple.mUV < streams.mUVs.size()))) {
|
||||
|
|
@ -755,7 +755,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
|||
delete meshPrims[iPrim];
|
||||
}
|
||||
|
||||
void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const MatrixF& objectOffset,
|
||||
void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const MatrixF& objOffset,
|
||||
Vector<Point3F>& v_points,
|
||||
Vector<Point3F>& v_norms,
|
||||
Vector<ColorI>& v_colors,
|
||||
|
|
@ -807,7 +807,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
return;
|
||||
|
||||
getPrimitives(baseGeometry);
|
||||
getVertexData(baseGeometry, time, objectOffset, v_points, v_norms, v_colors, v_uvs, v_uv2s, true);
|
||||
getVertexData(baseGeometry, time, objOffset, v_points, v_norms, v_colors, v_uvs, v_uv2s, true);
|
||||
|
||||
// Get pointers to the arrays of base geometry data
|
||||
Point3F* points_array = &v_points[v_points.size() - mVertTuples.size()];
|
||||
|
|
@ -863,7 +863,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
if (uv2s_array)
|
||||
targetUv2s.set(uv2s_array, mVertTuples.size());
|
||||
|
||||
getVertexData(targetGeoms[iTarget], time, objectOffset, targetPoints, targetNorms, targetColors, targetUvs, targetUv2s, false);
|
||||
getVertexData(targetGeoms[iTarget], time, objOffset, targetPoints, targetNorms, targetColors, targetUvs, targetUv2s, false);
|
||||
|
||||
// Combine with base geometry
|
||||
for (S32 iVert = 0; iVert < mVertTuples.size(); iVert++) {
|
||||
|
|
@ -883,7 +883,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
|||
}
|
||||
}
|
||||
|
||||
void ColladaAppMesh::lockMesh(F32 t, const MatrixF& objectOffset)
|
||||
void ColladaAppMesh::lockMesh(F32 t, const MatrixF& objOffset)
|
||||
{
|
||||
// Find the geometry element for this mesh. Could be one of 3 things:
|
||||
// 1) a simple static mesh (Collada <geometry> element)
|
||||
|
|
@ -922,11 +922,10 @@ void ColladaAppMesh::lockMesh(F32 t, const MatrixF& objectOffset)
|
|||
|
||||
// Now get the vertex data at the specified time
|
||||
if (geometry->getElementType() == COLLADA_TYPE::GEOMETRY) {
|
||||
getPrimitives(daeSafeCast<domGeometry>(geometry));
|
||||
getVertexData(daeSafeCast<domGeometry>(geometry), t, objectOffset, mPoints, mNormals, mColors, mUVs, mUV2s, true);
|
||||
getPrimitives(daeSafeCast<domGeometry>(geometry));(daeSafeCast<domGeometry>(geometry), t, objOffset, mPoints, mNormals, mColors, mUVs, mUV2s, true);
|
||||
}
|
||||
else if (geometry->getElementType() == COLLADA_TYPE::MORPH) {
|
||||
getMorphVertexData(daeSafeCast<domMorph>(geometry), t, objectOffset, mPoints, mNormals, mColors, mUVs, mUV2s);
|
||||
getMorphVertexData(daeSafeCast<domMorph>(geometry), t, objOffset, mPoints, mNormals, mColors, mUVs, mUV2s);
|
||||
}
|
||||
else {
|
||||
daeErrorHandler::get()->handleWarning(avar("Unsupported geometry type "
|
||||
|
|
|
|||
|
|
@ -109,11 +109,11 @@ protected:
|
|||
bool checkGeometryType(const daeElement* element);
|
||||
void getPrimitives(const domGeometry* geometry);
|
||||
|
||||
void getVertexData( const domGeometry* geometry, F32 time, const MatrixF& objectOffset,
|
||||
void getVertexData( const domGeometry* geometry, F32 time, const MatrixF& objOffset,
|
||||
Vector<Point3F>& points, Vector<Point3F>& norms, Vector<ColorI>& colors,
|
||||
Vector<Point2F>& uvs, Vector<Point2F>& uv2s, bool appendValues);
|
||||
|
||||
void getMorphVertexData( const domMorph* morph, F32 time, const MatrixF& objectOffset,
|
||||
void getMorphVertexData( const domMorph* morph, F32 time, const MatrixF& objOffset,
|
||||
Vector<Point3F>& points, Vector<Point3F>& norms, Vector<ColorI>& colors,
|
||||
Vector<Point2F>& uvs, Vector<Point2F>& uv2s );
|
||||
|
||||
|
|
@ -211,8 +211,8 @@ public:
|
|||
/// Generate the vertex, normal and triangle data for the mesh.
|
||||
///
|
||||
/// @param time Time at which to generate the mesh data
|
||||
/// @param objectOffset Transform to apply to the generated data (bounds transform)
|
||||
void lockMesh(F32 time, const MatrixF& objectOffset);
|
||||
/// @param objOffset Transform to apply to the generated data (bounds transform)
|
||||
void lockMesh(F32 time, const MatrixF& objOffset);
|
||||
|
||||
/// Get the transform of this mesh at a certain time
|
||||
///
|
||||
|
|
|
|||
|
|
@ -139,13 +139,13 @@ ConsoleFunction( enumColladaForImport, bool, 3, 3,
|
|||
GuiTreeViewCtrl* tree;
|
||||
if (!Sim::findObject(argv[2], tree))
|
||||
{
|
||||
Con::errorf("enumColladaScene::Could not find GuiTreeViewCtrl '%s'", argv[2]);
|
||||
Con::errorf("enumColladaScene::Could not find GuiTreeViewCtrl '%s'", (const char*)argv[2]);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if a cached DTS is available => no need to import the collada file
|
||||
// if we can load the DTS instead
|
||||
Torque::Path path(argv[1]);
|
||||
Torque::Path path((const char*)argv[1]);
|
||||
if (ColladaShapeLoader::canLoadCachedDTS(path))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ ConsoleFunction( loadColladaLights, bool, 2, 4,
|
|||
"@ingroup Editors\n"
|
||||
"@internal")
|
||||
{
|
||||
Torque::Path path(argv[1]);
|
||||
Torque::Path path((const char*)argv[1]);
|
||||
|
||||
// Optional group to add the lights to. Create if it does not exist, and use
|
||||
// the MissionGroup if not specified.
|
||||
|
|
@ -172,7 +172,7 @@ ConsoleFunction( loadColladaLights, bool, 2, 4,
|
|||
if (!Sim::findObject(argv[2], group)) {
|
||||
// Create the group if it could not be found
|
||||
group = new SimGroup;
|
||||
if (group->registerObject(argv[2])) {
|
||||
if (group->registerObject((const char*)argv[2])) {
|
||||
if (missionGroup)
|
||||
missionGroup->addObject(group);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,15 @@
|
|||
#include "core/util/zip/zipVolume.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
|
||||
MODULE_BEGIN( ColladaShapeLoader )
|
||||
MODULE_INIT_AFTER( ShapeLoader )
|
||||
MODULE_INIT
|
||||
{
|
||||
TSShapeLoader::addFormat("Collada", "dae");
|
||||
TSShapeLoader::addFormat("Google Earth", "kmz");
|
||||
}
|
||||
MODULE_END;
|
||||
|
||||
//
|
||||
static DAE sDAE; // Collada model database (holds the last loaded file)
|
||||
static Torque::Path sLastPath; // Path of the last loaded Collada file
|
||||
|
|
|
|||
|
|
@ -430,6 +430,8 @@ public:
|
|||
class BasePrimitive
|
||||
{
|
||||
public:
|
||||
virtual ~BasePrimitive() { }
|
||||
|
||||
/// Return true if the element is a geometric primitive type
|
||||
static bool isPrimitive(const daeElement* element)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "platform/platform.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "ts/loader/tsShapeLoader.h"
|
||||
|
||||
#include "core/volume.h"
|
||||
|
|
@ -30,6 +31,14 @@
|
|||
#include "ts/tsShapeInstance.h"
|
||||
#include "ts/tsMaterialList.h"
|
||||
|
||||
MODULE_BEGIN( ShapeLoader )
|
||||
MODULE_INIT_AFTER( GFX )
|
||||
MODULE_INIT
|
||||
{
|
||||
TSShapeLoader::addFormat("Torque DTS", "dts");
|
||||
TSShapeLoader::addFormat("Torque DSQ", "dsq");
|
||||
}
|
||||
MODULE_END;
|
||||
|
||||
const F32 TSShapeLoader::smDefaultTime = -1.0f;
|
||||
const F64 TSShapeLoader::smMinFrameRate = 15.0f;
|
||||
|
|
@ -37,6 +46,8 @@ const F64 TSShapeLoader::smMaxFrameRate = 60.0f;
|
|||
const F64 TSShapeLoader::smAppGroundFrameRate = 10.0f;
|
||||
Torque::Path TSShapeLoader::smShapePath;
|
||||
|
||||
Vector<TSShapeLoader::ShapeFormat> TSShapeLoader::smFormats;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Utility functions
|
||||
|
||||
|
|
@ -1270,3 +1281,53 @@ TSShapeLoader::~TSShapeLoader()
|
|||
delete mAppSequences[iSeq];
|
||||
mAppSequences.clear();
|
||||
}
|
||||
|
||||
// Static functions to handle supported formats for shape loader.
|
||||
void TSShapeLoader::addFormat(String name, String extension)
|
||||
{
|
||||
ShapeFormat newFormat;
|
||||
newFormat.mName = name;
|
||||
newFormat.mExtension = extension;
|
||||
smFormats.push_back(newFormat);
|
||||
}
|
||||
|
||||
String TSShapeLoader::getFormatExtensions()
|
||||
{
|
||||
// "*.dsq TAB *.dae TAB
|
||||
StringBuilder output;
|
||||
for(U32 n = 0; n < smFormats.size(); ++n)
|
||||
{
|
||||
output.append("*.");
|
||||
output.append(smFormats[n].mExtension);
|
||||
output.append("\t");
|
||||
}
|
||||
return output.end();
|
||||
}
|
||||
|
||||
String TSShapeLoader::getFormatFilters()
|
||||
{
|
||||
// "DSQ Files|*.dsq|COLLADA Files|*.dae|"
|
||||
StringBuilder output;
|
||||
for(U32 n = 0; n < smFormats.size(); ++n)
|
||||
{
|
||||
output.append(smFormats[n].mName);
|
||||
output.append("|*.");
|
||||
output.append(smFormats[n].mExtension);
|
||||
output.append("|");
|
||||
}
|
||||
return output.end();
|
||||
}
|
||||
|
||||
DefineConsoleFunction( getFormatExtensions, const char*, ( ),,
|
||||
"Returns a list of supported shape format extensions separated by tabs."
|
||||
"Example output: *.dsq TAB *.dae TAB")
|
||||
{
|
||||
return Con::getReturnBuffer(TSShapeLoader::getFormatExtensions());
|
||||
}
|
||||
|
||||
DefineConsoleFunction( getFormatFilters, const char*, ( ),,
|
||||
"Returns a list of supported shape formats in filter form.\n"
|
||||
"Example output: DSQ Files|*.dsq|COLLADA Files|*.dae|")
|
||||
{
|
||||
return Con::getReturnBuffer(TSShapeLoader::getFormatFilters());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,19 @@
|
|||
class TSShapeLoader
|
||||
{
|
||||
|
||||
// Supported Format List
|
||||
protected:
|
||||
struct ShapeFormat
|
||||
{
|
||||
String mName;
|
||||
String mExtension;
|
||||
};
|
||||
static Vector<ShapeFormat> smFormats;
|
||||
public:
|
||||
static void addFormat(String name, String extension);
|
||||
static String getFormatExtensions();
|
||||
static String getFormatFilters();
|
||||
|
||||
public:
|
||||
enum eLoadPhases
|
||||
{
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ bool TSMesh::castRayRendered( S32 frame, const Point3F & start, const Point3F &
|
|||
// gonna depend on what kind of primitive it is...
|
||||
if ( (draw.matIndex & TSDrawPrimitive::TypeMask) == TSDrawPrimitive::Triangles )
|
||||
{
|
||||
for ( S32 j = 0; j < draw.numElements-2; j++)
|
||||
for ( S32 j = 0; j < draw.numElements-2; j += 3 )
|
||||
{
|
||||
idx0 = mIndices[drawStart + j + 0];
|
||||
idx1 = mIndices[drawStart + j + 1];
|
||||
|
|
@ -2949,7 +2949,11 @@ inline void TSMesh::findTangent( U32 index1,
|
|||
void TSMesh::createTangents(const Vector<Point3F> &_verts, const Vector<Point3F> &_norms)
|
||||
{
|
||||
U32 numVerts = _verts.size();
|
||||
if ( numVerts == 0 )
|
||||
U32 numNorms = _norms.size();
|
||||
if ( numVerts <= 0 || numNorms <= 0 )
|
||||
return;
|
||||
|
||||
if( numVerts != numNorms)
|
||||
return;
|
||||
|
||||
Vector<Point3F> tan0;
|
||||
|
|
|
|||
|
|
@ -1170,7 +1170,10 @@ void TSShape::assembleShape()
|
|||
skip = true;
|
||||
TSMesh * mesh = TSMesh::assembleMesh(meshType,skip);
|
||||
if (ptr32)
|
||||
{
|
||||
ptr32[i] = skip ? 0 : (S32)mesh;
|
||||
mMeshes.push_back(skip ? 0 : mesh);
|
||||
}
|
||||
|
||||
// fill in location of verts, tverts, and normals for detail levels
|
||||
if (mesh && meshType!=TSMesh::DecalMeshType)
|
||||
|
|
@ -1198,7 +1201,6 @@ void TSShape::assembleShape()
|
|||
}
|
||||
}
|
||||
}
|
||||
mMeshes.set(ptr32,numMeshes);
|
||||
|
||||
tsalloc.checkGuard();
|
||||
|
||||
|
|
@ -1225,7 +1227,7 @@ void TSShape::assembleShape()
|
|||
if (smReadVersion<23)
|
||||
{
|
||||
// get detail information about skins...
|
||||
S32 * detailFirstSkin = tsalloc.getPointer32(numDetails);
|
||||
S32 * detFirstSkin = tsalloc.getPointer32(numDetails);
|
||||
S32 * detailNumSkins = tsalloc.getPointer32(numDetails);
|
||||
|
||||
tsalloc.checkGuard();
|
||||
|
|
@ -1257,7 +1259,7 @@ void TSShape::assembleShape()
|
|||
ptr32 = tsalloc.allocShape32(numSkins);
|
||||
for (i=0; i<numSkins; i++)
|
||||
{
|
||||
bool skip = i<detailFirstSkin[skipDL];
|
||||
bool skip = i<detFirstSkin[skipDL];
|
||||
TSSkinMesh * skin = (TSSkinMesh*)TSMesh::assembleMesh(TSMesh::SkinMeshType,skip);
|
||||
if (mMeshes.address())
|
||||
{
|
||||
|
|
@ -1286,7 +1288,7 @@ void TSShape::assembleShape()
|
|||
tsalloc.checkGuard();
|
||||
|
||||
// we now have skins in mesh list...add skin objects to object list and patch things up
|
||||
fixupOldSkins(numMeshes,numSkins,numDetails,detailFirstSkin,detailNumSkins);
|
||||
fixupOldSkins(numMeshes,numSkins,numDetails,detFirstSkin,detailNumSkins);
|
||||
}
|
||||
|
||||
// allocate storage space for some arrays (filled in during Shape::init)...
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ class TSShape
|
|||
/// mem buffer transfer helper (indicate when we don't want to include a particular mesh/decal)
|
||||
bool checkSkip(S32 meshNum, S32 & curObject, S32 skipDL);
|
||||
|
||||
void fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detailFirstSkin, S32 * detailNumSkins);
|
||||
void fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detFirstSkin, S32 * detailNumSkins);
|
||||
|
||||
/// @name Shape Editing
|
||||
/// @{
|
||||
|
|
|
|||
|
|
@ -1216,8 +1216,9 @@ DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S3
|
|||
|
||||
CHECK_INDEX_IN_RANGE( getMeshName, index, objectDetails.size(), "" );
|
||||
|
||||
char* returnBuffer = Con::getReturnBuffer(256);
|
||||
dSprintf(returnBuffer, 256, "%s %d", name, (S32)mShape->mDetails[objectDetails[index]].size);
|
||||
static const U32 bufSize = 256;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf(returnBuffer, bufSize, "%s %d", name, (S32)mShape->mDetails[objectDetails[index]].size);
|
||||
return returnBuffer;
|
||||
}}
|
||||
|
||||
|
|
@ -1602,8 +1603,9 @@ DefineTSShapeConstructorMethod( getImposterSettings, const char*, ( S32 index ),
|
|||
// Return information about the detail level
|
||||
const TSShape::Detail& det = mShape->mDetails[index];
|
||||
|
||||
char* returnBuffer = Con::getReturnBuffer(512);
|
||||
dSprintf(returnBuffer, 512, "%d\t%d\t%d\t%d\t%d\t%d\t%g",
|
||||
static const U32 bufSize = 512;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf(returnBuffer, bufSize, "%d\t%d\t%d\t%d\t%d\t%d\t%g",
|
||||
(S32)( det.subShapeNum < 0 ), // isImposter
|
||||
det.bbEquatorSteps,
|
||||
det.bbPolarSteps,
|
||||
|
|
@ -1727,8 +1729,9 @@ DefineTSShapeConstructorMethod( getSequenceSource, const char*, ( const char* na
|
|||
GET_SEQUENCE( getSequenceSource, seq, name, "" );
|
||||
|
||||
// Return information about the source data for this sequence
|
||||
char* returnBuffer = Con::getReturnBuffer(512);
|
||||
dSprintf( returnBuffer, 512, "%s\t%d\t%d\t%d",
|
||||
static const U32 bufSize = 512;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf( returnBuffer, bufSize, "%s\t%d\t%d\t%d",
|
||||
seq->sourceData.from.c_str(), seq->sourceData.start,
|
||||
seq->sourceData.end, seq->sourceData.total );
|
||||
return returnBuffer;
|
||||
|
|
@ -1802,8 +1805,9 @@ DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const cha
|
|||
rot = mat.toEuler();
|
||||
}
|
||||
|
||||
char* returnBuffer = Con::getReturnBuffer(256);
|
||||
dSprintf( returnBuffer, 256, "%g %g %g %g %g %g",
|
||||
static const U32 bufSize = 256;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf( returnBuffer, bufSize, "%g %g %g %g %g %g",
|
||||
trans.x, trans.y, trans.z, rot.x, rot.y, rot.z );
|
||||
return returnBuffer;
|
||||
}}
|
||||
|
|
@ -1896,8 +1900,9 @@ DefineTSShapeConstructorMethod( getSequenceBlend, const char*, ( const char* nam
|
|||
GET_SEQUENCE( getSequenceBlend, seq, name, "0" );
|
||||
|
||||
// Return the blend information (flag reference_sequence reference_frame)
|
||||
char* returnBuffer = Con::getReturnBuffer(512);
|
||||
dSprintf( returnBuffer, 512, "%d\t%s\t%d", (int)seq->isBlend(),
|
||||
static const U32 bufSize = 512;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf( returnBuffer, bufSize, "%d\t%s\t%d", (int)seq->isBlend(),
|
||||
seq->sourceData.blendSeq.c_str(), seq->sourceData.blendFrame );
|
||||
return returnBuffer;
|
||||
}}
|
||||
|
|
@ -2038,8 +2043,9 @@ DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32
|
|||
if (!(trig.state & TSShape::Trigger::StateOn))
|
||||
state = -state;
|
||||
|
||||
char* returnBuffer = Con::getReturnBuffer(32);
|
||||
dSprintf(returnBuffer, 32, "%d %d", frame, state);
|
||||
static const U32 bufSize = 32;
|
||||
char* returnBuffer = Con::getReturnBuffer(bufSize);
|
||||
dSprintf(returnBuffer, bufSize, "%d %d", frame, state);
|
||||
return returnBuffer;
|
||||
}}
|
||||
|
||||
|
|
|
|||
|
|
@ -485,8 +485,8 @@ protected:
|
|||
|
||||
/// @}
|
||||
|
||||
virtual void render( const TSRenderState &rdata );
|
||||
virtual void render( const TSRenderState &rdata, S32 dl, F32 intraDL = 0.0f );
|
||||
void render( const TSRenderState &rdata );
|
||||
void render( const TSRenderState &rdata, S32 dl, F32 intraDL = 0.0f );
|
||||
|
||||
void animate() { animate( mCurrentDetailLevel ); }
|
||||
void animate(S32 dl);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
// put old skins into object list
|
||||
//-------------------------------------------------
|
||||
|
||||
void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detailFirstSkin, S32 * detailNumSkins)
|
||||
void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detFirstSkin, S32 * detailNumSkins)
|
||||
{
|
||||
#if !defined(TORQUE_MAX_LIB)
|
||||
// this method not necessary in exporter, and a couple lines won't compile for exporter
|
||||
|
|
@ -63,9 +63,9 @@ void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * d
|
|||
// find one mesh per detail to add to this object
|
||||
// don't really need to be versions of the same object
|
||||
i = 0;
|
||||
while (i<detailFirstSkin[dl] || detailFirstSkin[dl]<0)
|
||||
while (i<detFirstSkin[dl] || detFirstSkin[dl]<0)
|
||||
i++;
|
||||
for (; i<numSkins && i<detailFirstSkin[dl]+detailNumSkins[dl]; i++)
|
||||
for (; i<numSkins && i<detFirstSkin[dl]+detailNumSkins[dl]; i++)
|
||||
{
|
||||
if (skins[i])
|
||||
{
|
||||
|
|
@ -77,7 +77,7 @@ void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * d
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (i==numSkins || i==detailFirstSkin[dl]+detailNumSkins[dl])
|
||||
if (i==numSkins || i==detFirstSkin[dl]+detailNumSkins[dl])
|
||||
{
|
||||
skinsCopy.push_back(NULL);
|
||||
object.numMeshes++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue