code cleanup: set enums as static or add RNA_enum_types.h where they are used elsewhere.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Sep 2013 21:27:14 +0000 (21:27 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Sep 2013 21:27:14 +0000 (21:27 +0000)
also minor style cleanup.

31 files changed:
source/blender/blenkernel/intern/navmesh_conversion.c
source/blender/blenkernel/intern/tracking.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_mask.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_packedfile.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_property.c
source/blender/makesrna/intern/rna_rigidbody.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/makesrna/intern/rna_wm.c

index 68564a1e298283bbe87a425000e74c0b5837522f..3c499908bf74b610e720779993de2d984169a1b1 100644 (file)
@@ -367,7 +367,7 @@ int buildNavMeshData(const int nverts, const float *verts,
        /* create detailed mesh triangles  - copy only valid triangles
         * and reserve memory for adjacency info */
        dtris = MEM_callocN(sizeof(unsigned short) * 3 * 2 * ndtris, "buildNavMeshData dtris");
-       memset(dtris, 0xffff, sizeof(unsigned short) * 3 * 2 * ndtris);
+       memset(dtris, 0xff, sizeof(unsigned short) * 3 * 2 * ndtris);
        for (i = 0; i < ndtris; i++) {
                memcpy(dtris + 3 * 2 * i, tris + 3 * dtrisToTrisMap[i], sizeof(unsigned short) * 3);
        }
index 1525ded0dd8a43be7ef86b7aab3f39a957276aad..2c84fbd86809f320fee33efd805d876dedcfe78a 100644 (file)
@@ -3363,10 +3363,10 @@ static void track_plane_from_existing_motion(MovieTrackingPlaneTrack *plane_trac
                    next_plane_marker &&
                    (plane_track->flag & PLANE_TRACK_AUTOKEY))
                {
-                       float fac = ((float) next_plane_marker->framenr - start_plane_marker->framenr)
-                                 / ((float) keyframe_plane_marker->framenr - start_plane_marker->framenr);
+                       float fac = ((float) next_plane_marker->framenr - start_plane_marker->framenr) /
+                                   ((float) keyframe_plane_marker->framenr - start_plane_marker->framenr);
 
-                       fac = 3*fac*fac - 2*fac*fac*fac;
+                       fac = 3 * fac * fac - 2 * fac * fac * fac;
 
                        for (i = 0; i < 4; i++) {
                                interp_v2_v2v2(new_plane_marker.corners[i], new_plane_marker.corners[i],
index 26febf217a6b5d30bef2fa86037ace18ea7eac10..0bce3ac29074dc94aaf834a69c5e380cd90e112a 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "RNA_access.h"
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "WM_types.h"
 
index 44ce081f68fa6d14e1c0e47d55501231947a6cc9..c008ac90e386ce9dc3f06ec00f31e38afca88d9c 100644 (file)
@@ -490,7 +490,7 @@ static void rna_def_action_group(BlenderRNA *brna)
        prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
        RNA_def_property_struct_type(prop, "FCurve");
-       RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", NULL, NULL, NULL, NULL, NULL, NULL);
+       RNA_def_property_collection_funcs(prop, NULL, "rna_ActionGroup_channels_next", NULL, NULL, NULL, NULL, NULL, NULL);
        RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group");
        
        prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
index d6e6786800b04c6a81f045fe3cf85c06f5470487..a07a000dacb6764810bae6a19ff5712752cc3d81 100644 (file)
@@ -45,7 +45,7 @@
 #include "WM_types.h"
 
 /* Always keep in alphabetical order */
-EnumPropertyItem actuator_type_items[] = {
+static EnumPropertyItem actuator_type_items[] = {
        {ACT_ACTION, "ACTION", 0, "Action", ""},
        {ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
        {ACT_CAMERA, "CAMERA", 0, "Camera", ""},
index 9f8f30b00a7cdcb0ef4642c45a324bbba43883d7..ee107fdfe9ff6fd7908073ffba73a96c88f5c4c2 100644 (file)
@@ -26,8 +26,6 @@
 
 #include <stdlib.h>
 
-#include "RNA_define.h"
-
 #include "DNA_anim_types.h"
 #include "DNA_action_types.h"
 #include "DNA_scene_types.h"
@@ -36,6 +34,9 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "RNA_define.h"
+#include "RNA_enum_types.h"
+
 #include "rna_internal.h"
 
 #include "WM_types.h"
index a832a8cdf964a6cccd858f5da81ab7f7e2b846a9..b9cbbdb32f78eafd1b1fcb51c52908b999932c3f 100644 (file)
@@ -921,7 +921,7 @@ static void rna_def_armature(BlenderRNA *brna)
        /* Collections */
        prop = RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "bonebase", NULL);
-       RNA_def_property_collection_funcs(prop, 0, "rna_Armature_bones_next", NULL, NULL, NULL, NULL, NULL, NULL);
+       RNA_def_property_collection_funcs(prop, NULL, "rna_Armature_bones_next", NULL, NULL, NULL, NULL, NULL, NULL);
        RNA_def_property_struct_type(prop, "Bone");
        RNA_def_property_ui_text(prop, "Bones", "");
        rna_def_armature_bones(brna, prop);
index 9b2ce86310867d1c7612ab3c2a8d57e0bfae4ab0..1dcc35c8fb38c665761ea0aebbf002836a2026eb 100644 (file)
@@ -41,6 +41,7 @@
 #include "BLI_utildefines.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
@@ -69,7 +70,8 @@ EnumPropertyItem boidrule_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem boidruleset_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem boidruleset_type_items[] = {
        {eBoidRulesetType_Fuzzy, "FUZZY", 0, "Fuzzy",
                                 "Rules are gone through top to bottom (only the first rule which effect is above "
                                 "fuzziness threshold is evaluated)"},
@@ -77,6 +79,7 @@ EnumPropertyItem boidruleset_type_items[] = {
        {eBoidRulesetType_Average, "AVERAGE", 0, "Average", "All rules are averaged"},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 
 #ifdef RNA_RUNTIME
index 5d68a6905a31dfa206228e88beccb79975a70a22..405d38e9683060fcd24666c3e98f0a0fc34bc518 100644 (file)
@@ -27,8 +27,6 @@
 #include <stdlib.h>
 #include <assert.h>
 
-#include "RNA_define.h"
-
 #include "DNA_brush_types.h"
 #include "DNA_texture_types.h"
 #include "DNA_scene_types.h"
@@ -36,6 +34,9 @@
 
 #include "BLI_math.h"
 
+#include "RNA_define.h"
+#include "RNA_enum_types.h"
+
 #include "rna_internal.h"
 
 #include "IMB_imbuf.h"
index 8c7857a3f0ba669d503c323800d5669416e96357..1034974871365ba4b82a3798a671fe326b41392b 100644 (file)
@@ -465,7 +465,7 @@ static void rna_Constraint_objectSolver_camera_set(PointerRNA *ptr, PointerRNA v
 
 #else
 
-EnumPropertyItem constraint_distance_items[] = {
+static EnumPropertyItem constraint_distance_items[] = {
        {LIMITDIST_INSIDE, "LIMITDIST_INSIDE", 0, "Inside",
                           "The object is constrained inside a virtual sphere around the target object, "
                           "with a radius defined by the limit distance"},
index 28a2ca7cb75a4cc0034c900694ebdb7a1ea2492f..3b789b16f52b0b9f1ef4705235455f237204dc21 100644 (file)
@@ -34,6 +34,7 @@
 #include "BLF_translation.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index 9773e7a340b6b4f3e6b212e4bac771bc04b4c938..cd3b30687b345b09b5f1cd3227c09410626dd76e 100644 (file)
 #include "BKE_curve.h"
 #include "ED_curve.h"
 
-EnumPropertyItem beztriple_handle_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem beztriple_handle_type_items[] = {
        {HD_FREE, "FREE", 0, "Free", ""},
        {HD_VECT, "VECTOR", 0, "Vector", ""},
        {HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
        {HD_AUTO, "AUTO", 0, "Auto", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
                
 EnumPropertyItem keyframe_handle_type_items[] = {
        {HD_FREE, "FREE", 0, "Free", ""},
@@ -70,7 +72,8 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem curve_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem curve_type_items[] = {
        {CU_POLY, "POLY", 0, "Poly", ""},
        {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
        {CU_BSPLINE, "BSPLINE", 0, "BSpline", ""},
@@ -78,6 +81,7 @@ EnumPropertyItem curve_type_items[] = {
        {CU_NURBS, "NURBS", 0, "Ease", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 static const EnumPropertyItem curve3d_fill_mode_items[] = {
        {0, "FULL", 0, "Full", ""},
@@ -1488,7 +1492,7 @@ static void rna_def_curve(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "Material");
        RNA_def_property_ui_text(prop, "Materials", "");
        RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
-       RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+       RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
 
        prop = RNA_def_property(srna, "bevel_factor_start", PROP_FLOAT, PROP_FACTOR);
        RNA_def_property_float_sdna(prop, NULL, "bevfac1");
index c716c3263d106484dbb6dcd9569f95995e5d88db..ffcd1f823b2a8b9f6132c0d9e55c7df233c67797 100644 (file)
@@ -39,6 +39,7 @@
 #include "DNA_scene_types.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index 49d760adb326eb67761fd4cd8e365d50e3ce7f63..d5c9ec53b20c5f228beccdd08323a3e53ad13d14 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "RNA_access.h"
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index 6a5fc3932696f0c36e4a454581cad27b2811bda6..77d593b67b6b81e3ba62616cbc2e4c0aac34a9a7 100644 (file)
@@ -516,7 +516,7 @@ static void rna_MaskSpline_point_remove(ID *id, MaskSpline *spline, ReportList *
 }
 
 #else
- void rna_def_maskParent(BlenderRNA *brna)
+static void rna_def_maskParent(BlenderRNA *brna)
 {
        StructRNA *srna;
        PropertyRNA *prop;
@@ -827,7 +827,7 @@ static void rna_def_mask_layer(BlenderRNA *brna)
 
        /* splines */
        prop = RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
-       RNA_def_property_collection_funcs(prop, "rna_MaskLayer_splines_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
+       RNA_def_property_collection_funcs(prop, "rna_MaskLayer_splines_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
        RNA_def_property_struct_type(prop, "MaskSpline");
        RNA_def_property_ui_text(prop, "Splines", "Collection of splines which defines this layer");
        RNA_def_property_srna(prop, "MaskSplines");
@@ -937,7 +937,7 @@ static void rna_def_mask(BlenderRNA *brna)
 
        /* mask layers */
        prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
-       RNA_def_property_collection_funcs(prop, "rna_Mask_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0);
+       RNA_def_property_collection_funcs(prop, "rna_Mask_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
        RNA_def_property_struct_type(prop, "MaskLayer");
        RNA_def_property_ui_text(prop, "Layers", "Collection of layers which defines this mask");
        rna_def_masklayers(brna, prop);
index b30bdaf9009598b395f00d6f275337ad52d892d2..ed2dba907e81d8d97e796ee18da4ecb9453ea278 100644 (file)
@@ -31,6 +31,7 @@
 #include "DNA_texture_types.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index 2820a7a3aa9e3a8858e78eb9c23104e12f54762a..1376eccb44822ca7734e5c98b4ef7f545ffe1028 100644 (file)
@@ -2430,7 +2430,7 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
        RNA_def_property_struct_type(prop, "Material");
        RNA_def_property_ui_text(prop, "Materials", "");
        RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
-       RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+       RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
 }
 
 
index 49b63933ae925b3617dc245abb0c1808a57cbe41..f01b5af7aaa038d82158b89e05ebdac965b8914d 100644 (file)
@@ -371,7 +371,7 @@ static void rna_def_metaball(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "Material");
        RNA_def_property_ui_text(prop, "Materials", "");
        RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
-       RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+       RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
        
        prop = RNA_def_property(srna, "is_editmode", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_funcs(prop, "rna_Meta_is_editmode_get", NULL);
index 399131bbd6153f6bce41b0bf406781c725f503a8..d2dea03b29bfebe961088b4b30ba895023bc2b9c 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "RNA_access.h"
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
@@ -415,7 +416,9 @@ EnumPropertyItem nla_mode_blend_items[] = {
                                 "Weighted result of strip is removed from the accumulated results"},
        {NLASTRIP_MODE_MULTIPLY, "MULITPLY", 0, "Multiply",
                                 "Weighted result of strip is multiplied with the accumulated results"},
-       {0, NULL, 0, NULL, NULL}};
+       {0, NULL, 0, NULL, NULL}
+};
+
 EnumPropertyItem nla_mode_extend_items[] = {
        {NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents"},
        {NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold",
index eb18f791b045c16bd25023686fbf48b6bacdbec1..3f094e6131b59c803b60ad400ae1ade54f189176 100644 (file)
@@ -70,7 +70,8 @@ EnumPropertyItem node_socket_in_out_items[] = {
        { 0, NULL, 0, NULL, NULL }
 };
 
-EnumPropertyItem node_socket_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem node_socket_type_items[] = {
        {SOCK_CUSTOM,  "CUSTOM",    0,    "Custom",    ""},
        {SOCK_FLOAT,   "VALUE",     0,    "Value",     ""},
        {SOCK_INT,     "INT",       0,    "Int",       ""},
@@ -82,14 +83,14 @@ EnumPropertyItem node_socket_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem node_quality_items[] = {
+static EnumPropertyItem node_quality_items[] = {
        {NTREE_QUALITY_HIGH,   "HIGH",     0,    "High",     "High quality"},
        {NTREE_QUALITY_MEDIUM, "MEDIUM",   0,    "Medium",   "Medium quality"},
        {NTREE_QUALITY_LOW,    "LOW",      0,    "Low",      "Low quality"},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem node_chunksize_items[] = {
+static EnumPropertyItem node_chunksize_items[] = {
        {NTREE_CHUNCKSIZE_32,   "32",     0,    "32x32",     "Chunksize of 32x32"},
        {NTREE_CHUNCKSIZE_64,   "64",     0,    "64x64",     "Chunksize of 64x64"},
        {NTREE_CHUNCKSIZE_128,  "128",    0,    "128x128",   "Chunksize of 128x128"},
@@ -98,6 +99,7 @@ EnumPropertyItem node_chunksize_items[] = {
        {NTREE_CHUNCKSIZE_1024, "1024",   0,    "1024x1024", "Chunksize of 1024x1024"},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 #define DEF_ICON_BLANK_SKIP
 #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
@@ -152,30 +154,14 @@ EnumPropertyItem node_filter_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem node_sampler_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem node_sampler_type_items[] = {
        {0, "NEAREST",   0, "Nearest",   ""},
        {1, "BILINEAR",   0, "Bilinear",   ""},
        {2, "BICUBIC", 0, "Bicubic", ""},
        {0, NULL, 0, NULL, NULL}
 };
-
-EnumPropertyItem prop_noise_basis_items[] = {
-       {SHD_NOISE_PERLIN, "PERLIN", 0, "Perlin", ""},
-       {SHD_NOISE_VORONOI_F1, "VORONOI_F1", 0, "Voronoi F1", ""},
-       {SHD_NOISE_VORONOI_F2, "VORONOI_F2", 0, "Voronoi F2", ""},
-       {SHD_NOISE_VORONOI_F3, "VORONOI_F3", 0, "Voronoi F3", ""},
-       {SHD_NOISE_VORONOI_F4, "VORONOI_F4", 0, "Voronoi F4", ""},
-       {SHD_NOISE_VORONOI_F2_F1, "VORONOI_F2_F1", 0, "Voronoi F2-F1", ""},
-       {SHD_NOISE_VORONOI_CRACKLE, "VORONOI_CRACKLE", 0, "Voronoi Crackle", ""},
-       {SHD_NOISE_CELL_NOISE, "CELL_NOISE", 0, "Cell Noise", ""},
-       {0, NULL, 0, NULL, NULL}
-};
-
-EnumPropertyItem prop_noise_type_items[] = {
-       {SHD_NOISE_SOFT, "SOFT", 0, "Soft", ""},
-       {SHD_NOISE_HARD, "HARD", 0, "Hard", ""},
-       {0, NULL, 0, NULL, NULL}
-};
+#endif
 
 #ifdef RNA_RUNTIME
 
@@ -5340,7 +5326,7 @@ static void dev_cmd_transform(StructRNA *srna)
 
 /* -- Compositor Nodes ------------------------------------------------------ */
 
-EnumPropertyItem node_masktype_items[] = {
+static EnumPropertyItem node_masktype_items[] = {
        {0, "ADD",           0, "Add",           ""},
        {1, "SUBTRACT",      0, "Subtract",      ""},
        {2, "MULTIPLY",      0, "Multiply",      ""},
index 9bf9bc1deac2e272800a42486b0ec604c53381ce..9cba4d0958be8cd7fb08cfa7ff4772250de00fda 100644 (file)
@@ -2350,7 +2350,7 @@ static void rna_def_object(BlenderRNA *brna)
        prop = RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Constraint");
        RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object");
-/*     RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove"); */
+/*     RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "constraints__add", "constraints__remove"); */
        rna_def_object_constraints(brna, prop);
 
        /* game engine */
index a72188591a1b88331abe58f9beeadda7c1f991ab..365ad5fdb9ae5f72b6ba2cc85f22112a91d0e5cf 100644 (file)
@@ -31,6 +31,7 @@
 #include "DNA_packedFile_types.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index b966a7d7f2c60c659fe5b9ce1af4d7b304a53fcf..7d30194277b61d3ccc2b888b2de498bf2e5d3009 100644 (file)
 #include "WM_types.h"
 #include "WM_api.h"
 
-EnumPropertyItem part_from_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_from_items[] = {
        {PART_FROM_VERT, "VERT", 0, "Verts", ""},
        {PART_FROM_FACE, "FACE", 0, "Faces", ""},
        {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
-EnumPropertyItem part_reactor_from_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem part_reactor_from_items[] = {
        {PART_FROM_VERT, "VERT", 0, "Verts", ""},
        {PART_FROM_FACE, "FACE", 0, "Faces", ""},
        {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
-EnumPropertyItem part_dist_items[] = {
+static EnumPropertyItem part_dist_items[] = {
        {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
        {PART_DISTR_RAND, "RAND", 0, "Random", ""},
        {PART_DISTR_GRID, "GRID", 0, "Grid", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_hair_dist_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_hair_dist_items[] = {
        {PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
        {PART_DISTR_RAND, "RAND", 0, "Random", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
-EnumPropertyItem part_draw_as_items[] = {
+static EnumPropertyItem part_draw_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
        {PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -89,14 +95,16 @@ EnumPropertyItem part_draw_as_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_hair_draw_as_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_hair_draw_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
        {PART_DRAW_PATH, "PATH", 0, "Path", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
-EnumPropertyItem part_ren_as_items[] = {
+static EnumPropertyItem part_ren_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_HALO, "HALO", 0, "Halo", ""},
        {PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -107,13 +115,15 @@ EnumPropertyItem part_ren_as_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem part_hair_ren_as_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem part_hair_ren_as_items[] = {
        {PART_DRAW_NOT, "NONE", 0, "None", ""},
        {PART_DRAW_PATH, "PATH", 0, "Path", ""},
        {PART_DRAW_OB, "OBJECT", 0, "Object", ""},
        {PART_DRAW_GR, "GROUP", 0, "Group", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 #ifdef RNA_RUNTIME
 
index fc3697633a4c7068503640443e295827ba41bdc2..c6b8e89c282c0358d6bc8a1296126a62deb7f3a4 100644 (file)
 
 #include <stdlib.h>
 
+#include "DNA_property_types.h"
+
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
-#include "DNA_property_types.h"
 
 #include "WM_types.h"
 
index a4e02d6e835c2ae3ccf151911b2798b99c6e1ee2..b1f704551e04b94fe230fbc9b9a6bdaf3aff1d65 100644 (file)
@@ -29,6 +29,7 @@
 #include <string.h>
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
index 5a3ec8f1f1d38d46acdb4aa7054bb67a7d2d0696..71546c7fad4582334b9a62bc8596199e98ff44f8 100644 (file)
@@ -43,7 +43,7 @@
 #include "WM_types.h"
 
 /* Always keep in alphabetical order */
-EnumPropertyItem sensor_type_items[] = {
+static EnumPropertyItem sensor_type_items[] = {
        {SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
        {SENS_ALWAYS, "ALWAYS", 0, "Always", ""},
        {SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
index f8e1ac094aa085d38e045ca5f96e8d72b1cf71ac..bc50be00ddd1f7496b124c53d383eff84ef55bed 100644 (file)
@@ -1298,7 +1298,7 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
        RNA_def_struct_sdna(srna, "StripColorBalance");
 }
 
-EnumPropertyItem blend_mode_items[] = {
+static EnumPropertyItem blend_mode_items[] = {
        {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
        {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
        {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
index 6d0af4ec0580163478718e0b790bfabec7b45e46..ffef17e770a5bbf74fa4dabd8940bac3638fd2b4 100644 (file)
@@ -109,13 +109,15 @@ static EnumPropertyItem transform_orientation_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem autosnap_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem autosnap_items[] = {
        {SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
        {SACTSNAP_STEP, "STEP", 0, "Time Step", "Snap to 1.0 frame/second intervals"},
        {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames/seconds (nla-action time)"},
        {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 EnumPropertyItem viewport_shade_items[] = {
        {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"},
index be6defa11d7142d425342b20c1b2063c17744f70..2c68661f3bdc1843c04ce4fc4efe0c3c94343e33 100644 (file)
 #include "WM_api.h"
 #include "WM_types.h"
 
-EnumPropertyItem texture_filter_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem texture_filter_items[] = {
        {TXF_BOX, "BOX", 0, "Box", ""},
        {TXF_EWA, "EWA", 0, "EWA", ""},
        {TXF_FELINE, "FELINE", 0, "FELINE", ""},
        {TXF_AREA, "AREA", 0, "Area", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 EnumPropertyItem texture_type_items[] = {
        {0, "NONE", 0, "None", ""},
@@ -82,7 +84,8 @@ EnumPropertyItem texture_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem blend_type_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem blend_type_items[] = {
        {MTEX_BLEND, "MIX", 0, "Mix", ""},
        {MTEX_ADD, "ADD", 0, "Add", ""},
        {MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
@@ -101,6 +104,7 @@ EnumPropertyItem blend_type_items[] = {
        {MTEX_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 #ifdef RNA_RUNTIME
 
index f4c003cfe6cf955d132ca0cdc63a4839b636f019..0feaec85e38e66212926af1218757fc870a69cff 100644 (file)
@@ -1061,7 +1061,7 @@ static void rna_def_trackingMarker(BlenderRNA *brna)
        RNA_def_property_int_sdna(prop, NULL, "framenr");
        RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
        RNA_def_property_int_funcs(prop, NULL, "rna_trackingMarker_frame_set", NULL);
-       RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, 0);
+       RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
 
        /* enable */
        prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
@@ -1134,7 +1134,7 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop)
        parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame",
                           "Frame number to insert marker to", MINFRAME, MAXFRAME);
        RNA_def_property_flag(parm, PROP_REQUIRED);
-       RNA_def_float_vector(func, "co", 2, 0, -1.0, 1.0, "Coordinate",
+       RNA_def_float_vector(func, "co", 2, NULL, -1.0, 1.0, "Coordinate",
                             "Place new marker at the given frame using specified in normalized space coordinates",
                             -1.0, 1.0);
        RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -1371,7 +1371,7 @@ static void rna_def_trackingPlaneMarker(BlenderRNA *brna)
        RNA_def_property_int_sdna(prop, NULL, "framenr");
        RNA_def_property_ui_text(prop, "Frame", "Frame number marker is keyframed on");
        RNA_def_property_int_funcs(prop, NULL, "rna_trackingPlaneMarker_frame_set", NULL);
-       RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, 0);
+       RNA_def_property_update(prop, NC_MOVIECLIP | NA_EDITED, NULL);
 
        /* Corners */
        prop = RNA_def_property(srna, "corners", PROP_FLOAT, PROP_MATRIX);
index 8e0e948f04012102dbe4947c8e18dcc1df12dab7..71e3d86387ba4478fd752898f7d22d6cdf6c365b 100644 (file)
@@ -43,7 +43,8 @@
 
 #include "WM_types.h"
 
-EnumPropertyItem event_keymouse_value_items[] = {
+#ifdef RNA_RUNTIME
+static EnumPropertyItem event_keymouse_value_items[] = {
        {KM_ANY, "ANY", 0, "Any", ""},
        {KM_PRESS, "PRESS", 0, "Press", ""},
        {KM_RELEASE, "RELEASE", 0, "Release", ""},
@@ -52,26 +53,8 @@ EnumPropertyItem event_keymouse_value_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem event_tweak_value_items[] = {
-       {KM_ANY, "ANY", 0, "Any", ""},
-       {EVT_GESTURE_N, "NORTH", 0, "North", ""},
-       {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
-       {EVT_GESTURE_E, "EAST", 0, "East", ""},
-       {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
-       {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
-       {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
-       {EVT_GESTURE_W, "WEST", 0, "West", ""},
-       {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
-       {0, NULL, 0, NULL, NULL}
-};
-
-EnumPropertyItem event_value_items[] = {
+static EnumPropertyItem event_tweak_value_items[] = {
        {KM_ANY, "ANY", 0, "Any", ""},
-       {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
-       {KM_PRESS, "PRESS", 0, "Press", ""},
-       {KM_RELEASE, "RELEASE", 0, "Release", ""},
-       {KM_CLICK, "CLICK", 0, "Click", ""},
-       {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
        {EVT_GESTURE_N, "NORTH", 0, "North", ""},
        {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
        {EVT_GESTURE_E, "EAST", 0, "East", ""},
@@ -83,7 +66,7 @@ EnumPropertyItem event_value_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem event_tweak_type_items[] = {
+static EnumPropertyItem event_tweak_type_items[] = {
        {EVT_TWEAK_L, "EVT_TWEAK_L", 0, "Left", ""},
        {EVT_TWEAK_M, "EVT_TWEAK_M", 0, "Middle", ""},
        {EVT_TWEAK_R, "EVT_TWEAK_R", 0, "Right", ""},
@@ -92,7 +75,7 @@ EnumPropertyItem event_tweak_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem event_mouse_type_items[] = {
+static EnumPropertyItem event_mouse_type_items[] = {
        {LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
        {MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
        {RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
@@ -113,7 +96,7 @@ EnumPropertyItem event_mouse_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem event_timer_type_items[] = {
+static EnumPropertyItem event_timer_type_items[] = {
        {TIMER, "TIMER", 0, "Timer", ""},
        {TIMER0, "TIMER0", 0, "Timer 0", ""},
        {TIMER1, "TIMER1", 0, "Timer 1", ""},
@@ -125,12 +108,12 @@ EnumPropertyItem event_timer_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem event_textinput_type_items[] = {
+static EnumPropertyItem event_textinput_type_items[] = {
        {KM_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""},
        {0, NULL, 0, NULL, NULL}
 };
 
-EnumPropertyItem event_ndof_type_items[] = {
+static EnumPropertyItem event_ndof_type_items[] = {
        {NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""},
        /* buttons on all 3dconnexion devices */
        {NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""},
@@ -179,6 +162,7 @@ EnumPropertyItem event_ndof_type_items[] = {
        {NDOF_BUTTON_C, "NDOF_BUTTON_C", 0, "Button C", ""},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 /* not returned: CAPSLOCKKEY, UNKNOWNKEY */
 EnumPropertyItem event_type_items[] = {
@@ -386,6 +370,24 @@ EnumPropertyItem event_type_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
+EnumPropertyItem event_value_items[] = {
+       {KM_ANY, "ANY", 0, "Any", ""},
+       {KM_NOTHING, "NOTHING", 0, "Nothing", ""},
+       {KM_PRESS, "PRESS", 0, "Press", ""},
+       {KM_RELEASE, "RELEASE", 0, "Release", ""},
+       {KM_CLICK, "CLICK", 0, "Click", ""},
+       {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
+       {EVT_GESTURE_N, "NORTH", 0, "North", ""},
+       {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
+       {EVT_GESTURE_E, "EAST", 0, "East", ""},
+       {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
+       {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
+       {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
+       {EVT_GESTURE_W, "WEST", 0, "West", ""},
+       {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
+       {0, NULL, 0, NULL, NULL}
+};
+
 EnumPropertyItem keymap_propvalue_items[] = {
        {0, "NONE", 0, "", ""},
        {0, NULL, 0, NULL, NULL}
@@ -401,7 +403,9 @@ static EnumPropertyItem keymap_modifiers_items[] = {
 };
 #endif
 
-EnumPropertyItem operator_flag_items[] = {
+
+#ifndef RNA_RUNTIME
+static EnumPropertyItem operator_flag_items[] = {
        {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
        {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
        {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
@@ -413,6 +417,7 @@ EnumPropertyItem operator_flag_items[] = {
        {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
        {0, NULL, 0, NULL, NULL}
 };
+#endif
 
 EnumPropertyItem operator_return_items[] = {
        {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},