2

Can a pop-up menu be made for this list ? I know how to make popup menus but I cant seem to find a operator that can be directly applied in the pop-up.enter image description here

Retrax
  • 1,480
  • 13
  • 32

1 Answers1

2

you can add anything to your pop-up

you should check this thread

here a little example:

import bpy


def draw(self, context):

    ob = context.object
    rows=4

    layout = self.layout
    row = layout.row(align=True)

    row.operator("object.material_slot_add", icon='ZOOMIN', text="Add slot")   

    row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)

bpy.context.window_manager.popup_menu(draw, title="Material", icon='INFO')

pop up example

yhoyo
  • 2,285
  • 13
  • 32