dyntopo_menu.py 文件源码

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

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
def draw(self, context):
        menu = utils_core.Menu(self)
        refine_path = "tool_settings.sculpt.detail_refine_method"
        type_path = "tool_settings.sculpt.detail_type_method"

        refine_items = [["Subdivide Edges", 'SUBDIVIDE'],
                        ["Collapse Edges", 'COLLAPSE'],
                        ["Subdivide Collapse", 'SUBDIVIDE_COLLAPSE']]

        type_items = [["Relative Detail", 'RELATIVE'],
                      ["Constant Detail", 'CONSTANT']]

        menu.add_item().label("Refine")
        menu.add_item().separator()

        # add the refine menu items
        for item in refine_items:
            utils_core.menuprop(
                    menu.add_item(), item[0], item[1],
                    refine_path, disable=True,
                    icon='RADIOBUT_OFF',
                    disable_icon='RADIOBUT_ON'
                    )

        menu.add_item().label("")

        menu.add_item().label("Type")
        menu.add_item().separator()

        # add the type menu items
        for item in type_items:
            utils_core.menuprop(
                    menu.add_item(), item[0], item[1],
                    type_path, disable=True,
                    icon='RADIOBUT_OFF', disable_icon='RADIOBUT_ON'
                    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号