I want to show enums up to 5 items.
Is it possible?
import bpy class HelloWorldPanel(bpy.types.Panel): """Creates a Panel in the Object properties window""" bl_label = "Hello World Panel" bl_idname = "OBJECT_PT_hello" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_category = "Test" def draw(self, context): layout = self.layout layout.use_property_split = True layout.use_property_decorate = False col = layout.column() col.prop(context.scene, 'enum_type', expand=True) # I want like this: if context.scene.enum_type == 'FIRST': col.prop(context.scene, 'enum', text='Enum 1-5', expand=True) elif context.scene.enum_type == 'LAST': col.prop(context.scene, 'enum', text='Enum 6-10', expand=True) enum_type = ( ('FIRST', 'First', ''), ('LAST', 'Last', ''), ) enum_items = ( ('1', '1', ''), ('2', '2', ''), ('3', '3', ''), ('4', '4', ''), ('5', '5', ''), (None), ('6', '6', ''), ('7', '7', ''), ('8', '8', ''), ('9', '9', ''), ('10', '10', ''), ) def register(): bpy.utils.register_class(HelloWorldPanel) bpy.types.Scene.enum = bpy.props.EnumProperty(name='Enums', items=enum_items) bpy.types.Scene.enum_type = bpy.props.EnumProperty(name='Types', items=enum_type) def unregister(): bpy.utils.unregister_class(HelloWorldPanel) del bpy.types.Scene.enum del bpy.types.Scene.enum_type if __name__ == "__main__": register() 



items=enum_items[:5]enough for you? Or do you want to show all enum items untilNoneis encountered, wherever it may be placed in your tuple? $\endgroup$None, I updated my code. $\endgroup$indexproperty do inlayout.prop()? $\endgroup$