From 462dc98a9cf79c083c47a6c82d892c0a6f89a711 Mon Sep 17 00:00:00 2001 From: abosafia Date: Wed, 4 Sep 2024 21:15:40 +0300 Subject: [PATCH] remove_doubles before silhuette --- scripts/addons/cam/curvecamtools.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/addons/cam/curvecamtools.py b/scripts/addons/cam/curvecamtools.py index 534c10a0d..05839c27d 100644 --- a/scripts/addons/cam/curvecamtools.py +++ b/scripts/addons/cam/curvecamtools.py @@ -626,7 +626,7 @@ def execute(self, context): bpy.ops.object.convert(target='MESH') bpy.ops.object.editmode_toggle() bpy.ops.mesh.select_all(action='TOGGLE') - bpy.ops.mesh.remove_doubles() + bpy.ops.mesh.remove_doubles(threshold= self.merg_distance) bpy.ops.object.editmode_toggle() bpy.ops.object.convert(target='CURVE') if mode: @@ -638,8 +638,7 @@ def draw(self, context): obj = context.active_object if obj.type == 'CURVE' and obj.data.splines[0].type == 'BEZIER': layout.prop(self, "keep_bezier", text="Keep Bezier") - if self.keep_bezier: - layout.prop(self, "merg_distance", text="Merge Distance") + layout.prop(self, "merg_distance", text="Merge Distance") def invoke(self, context, event): return context.window_manager.invoke_props_dialog(self) @@ -801,6 +800,11 @@ def poll(cls, context): def execute(self, context): # bpy.ops.object.curve_remove_doubles() ob = context.active_object + if ob.type == 'CURVE': + if ob.data.splines[0].type == 'BEZIER': + bpy.ops.object.curve_remove_doubles(merg_distance=0.0001, keep_bezier=True) + else: + bpy.ops.object.curve_remove_doubles() if self.opencurve and ob.type == 'CURVE': bpy.ops.object.duplicate() obj = context.active_object