Hi I am trying to populate a list with a conditional for one of the elements.
I am still new to python.
I’ve seen stuff similar but I can’t get the syntax right.
Any ideas?
Thanks
Yardie
direct_maps = (
( "LATTICE_OT" , "Lattice", 0, 0),
( "PARTICLE_OT" , "Particle", 0, 0),
( "FONT_OT" , "Font", 0, 0),
( "PAINT_OT_face_select" , "Face Mask", 0, 0),
( "PAINT_OT",
if bpy.context.mode == 'PAINT_WEIGHT':
"Weight Paint"
elif bpy.context.mode == 'PAINT_VERTEX':
"Vertex Paint"
elif bpy.context.mode == 'PAINT_TEXTURE':
"Image Paint"
else:
None
, 0 , 0)
),
)