mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Editing the representation of an opening now updates the gpu shader accordingly
This commit is contained in:
@@ -305,8 +305,6 @@ def load_post(scene):
|
||||
# After appending the workspace to ensure BIM viewport is affected.
|
||||
subscribe_to_viewport_shading_changes()
|
||||
|
||||
bpy.ops.bim.override_escape("INVOKE_DEFAULT")
|
||||
|
||||
# To improve usability for new users, we hijack the scene properties
|
||||
# tab. We override default scene properties panels with our own poll
|
||||
# to hide them unless the user has chosen to view Blender properties.
|
||||
|
||||
@@ -1023,6 +1023,8 @@ class DecorationsHandler:
|
||||
batch.draw(shader)
|
||||
|
||||
def __call__(self, context):
|
||||
if not context.scene.BIMModelProperties.openings:
|
||||
return
|
||||
self.addon_prefs = tool.Blender.get_addon_preferences()
|
||||
selected_elements_color = self.addon_prefs.decorator_color_selected
|
||||
unselected_elements_color = self.addon_prefs.decorator_color_unselected
|
||||
@@ -1038,6 +1040,12 @@ class DecorationsHandler:
|
||||
|
||||
for opening in context.scene.BIMModelProperties.openings:
|
||||
obj = opening.obj
|
||||
if context.scene.BIMGeometryProperties.representation_obj == obj:
|
||||
# We are editing the representation of the opening :
|
||||
for item in context.scene.BIMGeometryProperties.item_objs:
|
||||
if item.obj.mode == "EDIT":
|
||||
obj = item.obj
|
||||
break
|
||||
if not obj:
|
||||
continue
|
||||
|
||||
|
||||
@@ -500,7 +500,7 @@ class Model(bonsai.core.tool.Model):
|
||||
has_deleted_opening = True
|
||||
while has_deleted_opening:
|
||||
has_deleted_opening = False
|
||||
for i, opening in enumerate(props.openings):
|
||||
for i, opening in enumerate(list(props.openings)):
|
||||
if not opening.obj:
|
||||
props.openings.remove(i)
|
||||
has_deleted_opening = True
|
||||
|
||||
Reference in New Issue
Block a user