archipack_progressbar.py 文件源码

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

项目:archipack 作者: s-leger 项目源码 文件源码
def register():
    Scene.archipack_progress = FloatProperty(
                                    options={'SKIP_SAVE'},
                                    default=-1,
                                    subtype='PERCENTAGE',
                                    precision=1,
                                    min=-1,
                                    soft_min=0,
                                    soft_max=100,
                                    max=101,
                                    update=update)

    Scene.archipack_progress_text = StringProperty(
                                    options={'SKIP_SAVE'},
                                    default="Progress",
                                    update=update)

    global info_header_draw
    info_header_draw = bpy.types.INFO_HT_header.draw

    def info_draw(self, context):
        global info_header_draw
        info_header_draw(self, context)
        if (context.scene.archipack_progress > -1 and
                context.scene.archipack_progress < 101):
            self.layout.separator()
            text = context.scene.archipack_progress_text
            self.layout.prop(context.scene,
                                "archipack_progress",
                                text=text,
                                slider=True)

    bpy.types.INFO_HT_header.draw = info_draw
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号