Changeset 550
- Timestamp:
- 03/27/08 18:58:24 (9 months ago)
- Files:
-
- trunk/bin/win32/release (8.5)/bin/maya2q3.mll (modified) (previous)
- trunk/bin/win32/release (8.5)/bin/maya2q3.pdb (modified) (previous)
- trunk/maya2q3/bsp-colordump.cpp (modified) (2 diffs)
- trunk/maya2q3/bsp.cpp (modified) (3 diffs)
- trunk/maya2q3/maya_entry.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/maya2q3/bsp-colordump.cpp
r549 r550 193 193 check_status( stat ); 194 194 195 bool hasSourceVerts =196 mesh.hasBlindData( MFn::kMeshFaceVertComponent, BdSourceVertexId, &stat );197 check_status( stat );198 199 if( !hasSourceVerts )200 return;201 202 195 MString colorSet( McVertexLightSet ); 203 196 … … 253 246 check_status( stat ); 254 247 255 int blindI dx;256 stat = mesh.getFaceVertexBlindDataIndex( faceId, vertId, blindI dx );248 int blindIndex; 249 stat = mesh.getFaceVertexBlindDataIndex( faceId, vertId, blindIndex ); 257 250 check_status( stat ); 258 251 259 252 int sourceVert; 260 stat = mesh.getIntBlindData( blindI dx, MFn::kMeshFaceVertComponent,253 stat = mesh.getIntBlindData( blindIndex, MFn::kMeshFaceVertComponent, 261 254 BdSourceVertexId, attrName, sourceVert ); 262 check_status( stat ); 263 264 if( sourceVert < 0 ) 255 256 if( !stat || sourceVert < 0 ) 265 257 continue; 266 258 267 259 int colorIdx; 268 260 stat = mesh.getColorIndex( faceId, faceVertId, colorIdx, &colorSet ); 269 check_status( stat ); 270 261 262 if( !stat ) 263 continue; 264 271 265 MColor cl = colors[colorIdx]; 272 266 trunk/maya2q3/bsp.cpp
r549 r550 151 151 MFnMesh mesh; 152 152 153 MStringArray longNames, shortNames, formatNames; 154 155 longNames.append( BdSourceVertexAttr ); 156 shortNames.append( "svi" ); 157 formatNames.append( "int" ); 158 159 stat = mesh.createBlindDataType( BdSourceVertexId, longNames, shortNames, formatNames ); 160 check_status( stat ); 153 bool hasBlindType = mesh.isBlindDataTypeUsed( BdSourceVertexId, &stat ); 154 check_status( stat ); 155 156 if( !hasBlindType ) 157 { 158 MStringArray longNames, shortNames, formatNames; 159 160 longNames.append( BdSourceVertexAttr ); 161 shortNames.append( "svi" ); 162 formatNames.append( "int" ); 163 164 stat = mesh.createBlindDataType( BdSourceVertexId, longNames, shortNames, formatNames ); 165 check_status( stat ); 166 } 161 167 } 162 168 … … 365 371 for( int i = 0; i < numTris; i++ ) 366 372 { 367 int index; 368 369 index = baseVert + indices[firstIndex + i * 3 + 0]; 373 int rawIdx, index; 374 375 rawIdx = indices[firstIndex + i * 3 + 0]; 376 index = baseVert + rawIdx; 370 377 m_faceVertIndices.append( index ); 371 378 m_textureUVIDs.append( index ); 372 379 m_lightmapUVIDs.append( index ); 373 380 m_vertexLightIDs.append( index ); 374 m_sourceVertices.append( generateSourceIDs ? index : -1 );381 m_sourceVertices.append( generateSourceIDs ? firstVert + rawIdx : -1 ); 375 382 376 index = baseVert + indices[firstIndex + i * 3 + 2]; 383 rawIdx = indices[firstIndex + i * 3 + 2]; 384 index = baseVert + rawIdx; 377 385 m_faceVertIndices.append( index ); 378 386 m_textureUVIDs.append( index ); 379 387 m_lightmapUVIDs.append( index ); 380 388 m_vertexLightIDs.append( index ); 381 m_sourceVertices.append( generateSourceIDs ? index : -1 ); 382 383 index = baseVert + indices[firstIndex + i * 3 + 1]; 389 m_sourceVertices.append( generateSourceIDs ? firstVert + rawIdx : -1 ); 390 391 rawIdx = indices[firstIndex + i * 3 + 1]; 392 index = baseVert + rawIdx; 384 393 m_faceVertIndices.append( index ); 385 394 m_textureUVIDs.append( index ); 386 395 m_lightmapUVIDs.append( index ); 387 396 m_vertexLightIDs.append( index ); 388 m_sourceVertices.append( generateSourceIDs ? index : -1 );397 m_sourceVertices.append( generateSourceIDs ? firstVert + rawIdx : -1 ); 389 398 390 399 if( shaderBin != -1 ) … … 561 570 check_status( stat ); 562 571 572 MDagPath parentPath( objPath ); 573 stat = parentPath.pop(); 574 check_status( stat ); 575 576 MFnDagNode fnParent( parentPath, &stat ); 577 check_status( stat ); 578 579 fnParent.setName( MString( "bspSurface" ), &stat ); 580 check_status( stat ); 581 563 582 for( uint i = 0; i < m_shaderFaceNums.size(); i++ ) 564 583 { trunk/maya2q3/maya_entry.cpp
r549 r550 26 26 27 27 static const char *g_vendor = "HermitWorks"; 28 static const char *g_version = "3.3. 4";28 static const char *g_version = "3.3.5"; 29 29 static const char *g_reqVer = "Any"; 30 30
