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