Implement InMemoryFile for memory caching for fileIO plugin.
Support SDF loading through fileIO plugin. Replace strcspn by C code (not crossplatform) Add flag for loadURDF to use color from MTL file (instead from URDF link material) pybullet.URDF_USE_MATERIAL_COLORS_FROM_MTL and pybullet.URDF_USE_MATERIAL_TRANSPARANCY_FROM_MTL
This commit is contained in:
@@ -149,7 +149,14 @@ struct b3BulletDefaultFileIO : public CommonFileIOInterface
|
||||
if (f)
|
||||
{
|
||||
char* txt = ::fgets(destBuffer, numBytes, m_fileHandles[fileHandle]);
|
||||
destBuffer[strcspn(destBuffer, "\r\n")] = 0;
|
||||
for (int i=0;i<numBytes;i++)
|
||||
{
|
||||
if (destBuffer[i]=='\r'||destBuffer[i]=='\n' || destBuffer[i]==0)
|
||||
{
|
||||
destBuffer[i] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return txt;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user