Skip to content

Commit 285effa

Browse files
authored
Merge pull request #1213 from Ziachnix/iss_1212_create_ceiling_bug
fix: add delete of created ceiling if `create_ceiling=False`
2 parents e769ad7 + 994550a commit 285effa

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

blenderproc/python/constructor/RandomRoomConstructor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,12 @@ def extract_plane_from_room(obj: MeshObject, used_split_height: float, up_vec: m
446446
if "Floor" == used_split_height[1]:
447447
floor_obj = created_obj
448448
elif "Ceiling" == used_split_height[1]:
449-
ceiling_obj = created_obj
449+
if create_ceiling:
450+
ceiling_obj = created_obj
451+
else:
452+
# delete the created ceiling if it should not be created
453+
created_obj.delete()
454+
450455
elif create_ceiling:
451456
# there is no ceiling -> create one
452457
wall_obj.edit_mode()

0 commit comments

Comments
 (0)