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
评论列表
文章目录