[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19218] branches/blender2.5/blender/source /blender/makesrna: New include file to share enum types between RNA and operators

Martin Poirier theeth at yahoo.com
Sat Mar 7 11:26:29 CET 2009


Revision: 19218
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19218
Author:   theeth
Date:     2009-03-07 11:26:29 +0100 (Sat, 07 Mar 2009)

Log Message:
-----------
New include file to share enum types between RNA and operators

Start with proportional falloff modes.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c

Added Paths:
-----------
    branches/blender2.5/blender/source/blender/makesrna/RNA_enum_types.h

Added: branches/blender2.5/blender/source/blender/makesrna/RNA_enum_types.h
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/RNA_enum_types.h	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/makesrna/RNA_enum_types.h	2009-03-07 10:26:29 UTC (rev 19218)
@@ -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 */
+
+
+

Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c	2009-03-07 09:46:33 UTC (rev 19217)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c	2009-03-07 10:26:29 UTC (rev 19218)
@@ -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 @@
 {
 	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", ""}, 





More information about the Bf-blender-cvs mailing list