np_float_poly.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
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'}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号