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

FIX: Method get_obj_material #4603

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions pyaedt/modeler/cad/Primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,13 +1103,13 @@ def get_objects_by_material(self, material=None):
if material is not None:
for obj in self.object_list:
if obj and ("[" in obj.material_name or "(" in obj.material_name) and obj.object_type == "Solid":
material = (
found_material = (
self._app.odesign.GetChildObject("3D Modeler")
.GetChildObject(obj.name)
.GetPropEvaluatedValue("Material")
.lower()
)
if material.lower() == material:
if found_material.lower() == material:
obj_lst.append(obj)
elif obj and (obj.material_name == material or obj.material_name == material.lower()):
obj_lst.append(obj)
Expand Down
Loading