stroke_menu.py 文件源码

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

项目:bpy_lambda 作者: bcongdon 项目源码 文件源码
def draw(self, context):
        brush, path = self.init()
        menu = utils_core.Menu(self)

        menu.add_item().label(text="Stroke Method")
        menu.add_item().separator()

        if brush:
            # add the menu items dynamicaly based on values in enum property
            for tool in brush.bl_rna.properties['stroke_method'].enum_items:
                if tool.identifier in [anchored, drag_dot] and \
                   utils_core.get_mode() in [utils_core.vertex_paint,
                                             utils_core.weight_paint]:
                    continue

                utils_core.menuprop(
                        menu.add_item(), tool.name, tool.identifier, path,
                        icon='RADIOBUT_OFF', disable=True,
                        disable_icon='RADIOBUT_ON'
                        )
        else:
            menu.add_item().label("No Stroke Method available", icon="INFO")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号