Put lattice deform operation in a custom menu I created a menu class and now filling the menu with operations,But when I tried to use the lattice deform operation it didn't show up,

Here is the script I used:

layout.operator("object.parent_set(type='LATTICE')")


But as I said,it never show up in the menu,while other operations appear normally.
To pass arguments to operators via the layout.

op = layout.operator("object.parent_set")
op.type = 'LATTICE'


can also use

layout.operator("blah.blah").prop = value


I prefer the former stylewise.