Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[foxy] Add underscores to material names (#811) #824

Merged
merged 1 commit into from
Feb 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,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 @@ -652,7 +652,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 @@ -669,7 +669,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