def execute(self, context):
addon_prefs = context.user_preferences.addons[__package__].preferences
smooth = addon_prefs.npfp_smooth
dist = NP020FP.dist # is this used ?
polyob = NP020FP.polyob
polyme = polyob.data
bm = bmesh.new()
bm.from_mesh(polyme)
bmesh.ops.contextual_create(bm, geom=bm.edges)
bm.to_mesh(polyme)
bm.free()
bpy.ops.object.select_all(action='DESELECT')
polyob.select = True
if smooth:
bpy.ops.object.shade_smooth()
np_print('smooth ON')
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
bpy.ops.object.select_all(action='DESELECT')
NP020FP.flag = 'EXTRUDE'
NP020FP.phase = 3
return {'FINISHED'}
评论列表
文章目录