I have this operator
into n panel
and on click appears a redo panel
at the left bottom corner. What I want to do is to keep redo panel
as it is, but to be closed only if I click on specific button (operator
). How can I do that?
import bpy
class FU3DM_OT_accessories_prefs(bpy.types.Operator):
"""Accessories preferences operator"""
bl_idname = "fu3dm.accessories_prefs"
bl_label = "Accessories"
bl_description = "Accessories preferences"
bl_options = {'REGISTER','UNDO'}
def draw(self, context):
accessories_props = context.window_manager.fu3dm_accessories_properties
layout = self.layout
row = layout.row()
row.prop(accessories_props, "finger_tape_left", text="")
def execute(self, context):
accessories_props = context.window_manager.fu3dm_accessories_properties
return {"FINISHED"}
classes = (
FU3DM_OT_accessories_prefs,
)
def register():
from bpy.utils import register_class
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
from bpy.utils import unregister_class
for cls in classes:
unregister_class(cls)