Hello.
i created an operator preset system for my addon.
all i want to know is the name is displayed in the active preset info.
(in the first image it’s ‘Very Wow’)
i just want ot write a script like
if active_preset.name = 'Very Wow':
do_this()
this is a part of the menu, i may need the "Scatter_MT_C_Slots_PresetMenu"
bl_idname?
class Scatter_MT_C_Slots_PresetMenu(bpy.types.Menu):
bl_label = "No Presets Chosen (=Addon prefs Values)"
bl_idname = "Scatter_MT_C_Slots_PresetMenu"
preset_subdir = "scatter_presets_custom"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
i’m confused. the only example i could find in blender is
bpy.data.window_managers[“WinMan”].preset_name = “New Preset"
this is lal the api related i could find, but it doesn’t help me in my research.
#call preset menu of nlender ! not my addon
bpy.ops.wm.call_panel(name="CYCLES_PT_sampling_presets")
#add a new preset from my addon
bpy.ops.scatter.custom_slot_preset_add_operator(name="Wow", remove_name=False, remove_active=False)
#execute a preset from my addon
bpy.ops.script.execute_preset(filepath="filepathofthepreset", menu_idname="Scatter_MT_C_Slots_PresetMenu")
#call preset menu from my addon
bpy.ops.wm.call_menu(name="Scatter_MT_C_Slots_PresetMenu")
i think i need a bpy.context.something.something[“Scatter_MT_C_Slots_PresetMenu.”].preset_name ???
i don’t know how to find this. i’ve been searching for two hours. no result yet