2
$\begingroup$

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.

$\endgroup$

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ What language is this? Is it Python or Opengl? $\endgroup$ May 17, 2019 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .