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:
@@ -74,16 +74,8 @@ static bool UrdfFindMeshFile(
|
||||
|
||||
std::string existing_file;
|
||||
|
||||
{
|
||||
std::string attempt = fn;
|
||||
int f = fileIO->fileOpen(attempt.c_str(), "rb");
|
||||
if (f>=0)
|
||||
{
|
||||
existing_file = attempt;
|
||||
fileIO->fileClose(f);
|
||||
}
|
||||
}
|
||||
if (existing_file.empty())
|
||||
|
||||
|
||||
{
|
||||
for (std::list<std::string>::iterator x = shorter.begin(); x != shorter.end(); ++x)
|
||||
{
|
||||
@@ -100,6 +92,16 @@ static bool UrdfFindMeshFile(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (existing_file.empty())
|
||||
{
|
||||
std::string attempt = fn;
|
||||
int f = fileIO->fileOpen(attempt.c_str(), "rb");
|
||||
if (f>=0)
|
||||
{
|
||||
existing_file = attempt;
|
||||
fileIO->fileClose(f);
|
||||
}
|
||||
}
|
||||
|
||||
if (existing_file.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user