New include file to share enum types between RNA and operators

Start with proportional falloff modes.
This commit is contained in:
Martin Poirier
2009-03-07 10:26:29 +00:00
parent 63456cefda
commit dfe94557a9
2 changed files with 48 additions and 9 deletions

View File

@@ -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 */

View File

@@ -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", ""},