mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 08:55:14 +00:00
New clean wireframes operator to easily apply edge split modifier to nicer drawings
This commit is contained in:
@@ -4845,3 +4845,20 @@ class ExecuteBlenderClash(bpy.types.Operator):
|
||||
blender_clasher = BlenderClasher()
|
||||
blender_clasher.process_clash_set()
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
class CleanWireframes(bpy.types.Operator):
|
||||
bl_idname = "bim.clean_wireframes"
|
||||
bl_label = "Clean Wireframes"
|
||||
|
||||
def execute(self, context):
|
||||
objects = bpy.data.objects
|
||||
if bpy.context.selected_objects:
|
||||
objects = bpy.context.selected_objects
|
||||
for obj in objects:
|
||||
if not isinstance(obj.data, bpy.types.Mesh):
|
||||
continue
|
||||
# TODO: probably breaks i18n
|
||||
if not obj.modifiers.get("EdgeSplit"):
|
||||
obj.modifiers.new("EdgeSplit", "EDGE_SPLIT")
|
||||
return {"FINISHED"}
|
||||
|
||||
Reference in New Issue
Block a user