mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
bim.update_representation - error if add_representation didn't worked
This commit is contained in:
@@ -400,7 +400,11 @@ class UpdateRepresentation(bpy.types.Operator, Operator):
|
|||||||
representation_data["profile_set_usage"] = tool.Geometry.get_profile_set_usage(product)
|
representation_data["profile_set_usage"] = tool.Geometry.get_profile_set_usage(product)
|
||||||
representation_data["text_literal"] = tool.Geometry.get_text_literal(old_representation)
|
representation_data["text_literal"] = tool.Geometry.get_text_literal(old_representation)
|
||||||
|
|
||||||
|
# TODO: replace with core.add_representation?
|
||||||
new_representation = ifcopenshell.api.run("geometry.add_representation", self.file, **representation_data)
|
new_representation = ifcopenshell.api.run("geometry.add_representation", self.file, **representation_data)
|
||||||
|
if new_representation is None:
|
||||||
|
self.report({"ERROR"}, "Error creating representation for Blender object.")
|
||||||
|
return {"CANCELLED"}
|
||||||
|
|
||||||
if tool.Geometry.is_body_representation(new_representation):
|
if tool.Geometry.is_body_representation(new_representation):
|
||||||
[
|
[
|
||||||
|
|||||||
Reference in New Issue
Block a user