diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-03-07 13:26:29 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-03-07 13:26:29 +0300 |
commit | dfe94557a926f79fbfbf476318ea21528c15b381 (patch) | |
tree | 926260343814a017ff21f6ad8dcd033ba844b370 /source/blender | |
parent | 63456cefdade407fa2d1b3ee8e481eb1408023a3 (diff) |
New include file to share enum types between RNA and operators
Start with proportional falloff modes.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 37 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 20 |
2 files changed, 48 insertions, 9 deletions
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h new file mode 100644 index 00000000000..9cb49fcaf60 --- /dev/null +++ b/source/blender/makesrna/RNA_enum_types.h @@ -0,0 +1,37 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation (2008). + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#ifndef RNA_ENUM_TYPES +#define RNA_ENUM_TYPES + +#include "RNA_types.h" + +/* Types */ + +extern EnumPropertyItem prop_mode_items[]; + +#endif /* RNA_ENUM_TYPES */ + + + diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 281ab5b097b..2797f22daf8 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -33,6 +33,17 @@ #include "WM_types.h" +/* prop_mode needs to be accessible from transform operator */ +EnumPropertyItem prop_mode_items[] ={ + {PROP_SMOOTH, "SMOOTH", "Smooth", ""}, + {PROP_SPHERE, "SPHERE", "Sphere", ""}, + {PROP_ROOT, "ROOT", "Root", ""}, + {PROP_SHARP, "SHARP", "Sharp", ""}, + {PROP_LIN, "LINEAR", "Linear", ""}, + {PROP_CONST, "CONSTANT", "Constant", ""}, + {PROP_RANDOM, "RANDOM", "Random", ""}, + {0, NULL, NULL, NULL}}; + #ifdef RNA_RUNTIME #include "BKE_context.h" @@ -360,15 +371,6 @@ void RNA_def_scene(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem prop_mode_items[] ={ - {PROP_SMOOTH, "SMOOTH", "Smooth", ""}, - {PROP_SPHERE, "SPHERE", "Sphere", ""}, - {PROP_ROOT, "ROOT", "Root", ""}, - {PROP_SHARP, "SHARP", "Sharp", ""}, - {PROP_LIN, "LINEAR", "Linear", ""}, - {PROP_CONST, "CONSTANT", "Constant", ""}, - {PROP_RANDOM, "RANDOM", "Random", ""}, - {0, NULL, NULL, NULL}}; static EnumPropertyItem unwrapper_items[] = { {0, "CONFORMAL", "Conformal", ""}, {1, "ANGLEBASED", "Angle Based", ""}, |