Skip to content

Commit

Permalink
Add underscores to material names (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
corycrean committed Jan 13, 2022
1 parent 42ccd25 commit ca59b6f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ void RobotLink::assignMaterialsToEntities(
default_material_ = getMaterialForLink(link);

std::string cloned_name =
default_material_->getName() + std::to_string(material_count++) + "Robot";
default_material_->getName() + "_" + std::to_string(material_count++) + "Robot";

default_material_ = default_material_->clone(cloned_name);
default_material_name_ = default_material_->getName();
Expand All @@ -724,7 +724,7 @@ void RobotLink::assignMaterialsToEntities(
for (uint32_t i = 0; i < entity->getNumSubEntities(); ++i) {
default_material_ = getMaterialForLink(link, material_name);
std::string cloned_name =
default_material_->getName() + std::to_string(material_count++) + "Robot";
default_material_->getName() + "_" + std::to_string(material_count++) + "Robot";

default_material_ = default_material_->clone(cloned_name);
default_material_name_ = default_material_->getName();
Expand All @@ -741,7 +741,7 @@ void RobotLink::assignMaterialsToEntities(
// Once selection id is done per object and not per material,
// this can go away
std::string sub_cloned_name =
sub_material_name + std::to_string(material_count++) + "Robot";
sub_material_name + "_" + std::to_string(material_count++) + "Robot";
sub->getMaterial()->clone(sub_cloned_name);
sub->setMaterialName(sub_cloned_name);
}
Expand Down

0 comments on commit ca59b6f

Please sign in to comment.