New include file to share enum types between RNA and operators
authorMartin Poirier <theeth@yahoo.com>
Sat, 7 Mar 2009 10:26:29 +0000 (10:26 +0000)
committerMartin Poirier <theeth@yahoo.com>
Sat, 7 Mar 2009 10:26:29 +0000 (10:26 +0000)
Start with proportional falloff modes.

source/blender/makesrna/RNA_enum_types.h [new file with mode: 0644]
source/blender/makesrna/intern/rna_scene.c

diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
new file mode 100644 (file)
index 0000000..9cb49fc
--- /dev/null
@@ -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 */
+
+
+
index 281ab5b097b5fdb29fdfcac215b0ba670a921c35..2797f22daf8065f79fbf97ec5563bce01ade6732 100644 (file)
 
 #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", ""},