achm_shelves_maker.py 文件源码

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

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
def draw(self, context):
        layout = self.layout
        space = bpy.context.space_data
        if not space.local_view:
            # Imperial units warning
            if bpy.context.scene.unit_settings.system == "IMPERIAL":
                row = layout.row()
                row.label("Warning: Imperial units not supported", icon='COLOR_RED')

            box = layout.box()
            row = box.row()
            row.prop(self, 'thickness')
            row.prop(self, 'sthickness')
            row = box.row()
            row.prop(self, 'depth')
            row.prop(self, 'height')
            row = box.row()
            row.prop(self, 'top')
            row.prop(self, 'bottom')
            row = box.row()
            row.prop(self, 'stype')
            row.prop(self, 'fitZ')

            # Furniture number
            row = layout.row()
            row.prop(self, 'shelves_num')
            # Add menu for shelves
            if self.shelves_num > 0:
                for idx in range(0, self.shelves_num):
                    box = layout.box()
                    add_shelves(self, box, idx + 1, self.shelves[idx])

            box = layout.box()
            if not context.scene.render.engine == 'CYCLES':
                box.enabled = False
            box.prop(self, 'crt_mat')
        else:
            row = layout.row()
            row.label("Warning: Operator does not work in local view mode", icon='ERROR')

    # -----------------------------------------------------
    # Execute
    # -----------------------------------------------------
    # noinspection PyUnusedLocal
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号