I have an operator that has properties like below
class WM_OT_SceneOpen(bpy.types.Operator):
bl_idname = "wm.sceneopen"
bl_label = "Scene Open"
f_path=StringProperty(default="")
mybool=BoolProperty(default=True)
def execute(self,context):
#some stuff
Now I call this in a panel like this and works
layout.operator("wm.sceneopen").f_path=str(file)
However I also want to be able to pass/modify the mybool property as well during the panel execution but I cant find a way to do that.
This must be possible. But how?
Thanks
op = layout.operator("foo.bar")can then useop.x = 2followed byop.name = "foo"for each property. – batFINGER Feb 19 '19 at 04:32