EnumProperty into UIList

by yhoyo   Last Updated June 30, 2020 02:15 AM

actually I Know how to "insert" or "add" custom properties into UIList in blender 2.8

enter image description here

but actually I's stuck with enum and collection properties. I don't know why I can't display that into UIList, but If I test outside that, that work

enter image description here

process is simple... create some propertyGroup with the enumproperty

class CUSTOM_objectCollection(PropertyGroup):
    #name = StringProperty() -> Instantiated by default
    obj_type = StringProperty()
    obj_name = StringProperty()
    obj_id = IntProperty()
    obj_radio = StringProperty()
    obj_escala = StringProperty()    
    obj_simetria = BoolProperty()
    obj_ejemplo =  EnumProperty(default=None,
        items = [
            ('NONE', 'None', "Flat geometry"),
            ('GEOM', 'Geometry', "Use z value from shape geometry if exists"),
            ('FIELD', 'Field', "Extract z elevation value from an attribute field"),
            ('OBJ', 'Object', "Get z elevation value from an existing ground mesh")
    obj_esquina = BoolProperty()
    obj_borde = BoolProperty()

and add to each iteam in some operator:

                    item = scn.custom.add()
                    item.name = i.name
                    item.obj_type = i.type 
                    item.obj_id = len(scn.custom)
                    item.obj_ejemplo = "NONE" 
                    item.obj_simetria = item.obj_simetria
                    item.obj_escala = str(round(i.scale[0],2))

but don't work the enumproperty and don't get any error

some help

Related Questions

How to create a Folder Dialog?

Updated April 04, 2015 21:06 PM

Mesh's material_index is an index into what?

Updated April 17, 2015 20:06 PM