From 4d0c10d5ca9f2fb03a6183e77ed0265ed2218cae Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 24 Dec 2010 07:46:40 +0000 Subject: 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" --- source/blender/windowmanager/WM_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/windowmanager') 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 */ -- cgit v1.2.3