diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-24 10:46:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-24 10:46:40 +0300 |
commit | 4d0c10d5ca9f2fb03a6183e77ed0265ed2218cae (patch) | |
tree | 1bbf438029cb2e01bddcdbc0dce093b04489009f /source/blender/windowmanager | |
parent | c0339029c76b53461edad9ab2ebdae4bce61dfee (diff) |
presets for operators, re-using same preset system as render, cloth etc use.
- operators need to enable the option OPTYPE_PRESET or 'PRESET' in python.
- hidden properties are not written.
- currently this only works in the file selector (enabled for FBX/OBJ export)
- currently the menu label doesnt change when presets are selected, this is a TODO, not so simple since the UI is defined in C and the label in python.
- presets save in "scripts/presets/operators/*id*/*.py"
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 0ca8c5e7f4f..bbd22cae0f3 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -55,6 +55,7 @@ struct ImBuf; #define OPTYPE_BLOCKING 4 /* let blender grab all input from the WM (X11) */ #define OPTYPE_MACRO 8 #define OPTYPE_GRAB_POINTER 16 /* */ +#define OPTYPE_PRESET 32 /* show preset menu */ /* context to call operator in for WM_operator_name_call */ /* rna_ui.c contains EnumPropertyItem's of these, keep in sync */ |