2

Is there a way to use Blender's preset system for operator attributes? I. e. preset menu inside operator redo panel (F6).

ideasman42
  • 47,387
  • 10
  • 141
  • 223
Mikhail Rachinskiy
  • 1,069
  • 8
  • 22

1 Answers1

3

You can enable presets for an operator using the PRESET option.

eg:

class SomeTool(bpy.types.Operator):
    bl_idname = "object.some_tool"
    bl_label = "Some Tool"
    bl_options = {'PRESET'}

    # - snip -

The preset directory will be set based on the operator name and created on demand.

p2or
  • 15,860
  • 10
  • 83
  • 143
ideasman42
  • 47,387
  • 10
  • 141
  • 223