Skip to content

Commit

Permalink
Merge pull request #173 from abosafia/master
Browse files Browse the repository at this point in the history
remove doubles bfore silhouette
  • Loading branch information
pppalain authored Sep 4, 2024
2 parents f988fae + 462dc98 commit ecf3c3e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/addons/cam/curvecamtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ecf3c3e

Please sign in to comment.