Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-12 01:27:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-12 01:27:14 +0400
commit202109a8f5a8a1f82de6d765476ded85fe15ea59 (patch)
tree577e69ec0b42c15c7738e550c089be3ce84f0133 /source
parenta144793af1456d39f5d0218529215e64dda3dfc7 (diff)
code cleanup: set enums as static or add RNA_enum_types.h where they are used elsewhere.
also minor style cleanup.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/navmesh_conversion.c2
-rw-r--r--source/blender/blenkernel/intern/tracking.c6
-rw-r--r--source/blender/makesrna/intern/rna_ID.c1
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c2
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c5
-rw-r--r--source/blender/makesrna/intern/rna_armature.c2
-rw-r--r--source/blender/makesrna/intern/rna_boid.c5
-rw-r--r--source/blender/makesrna/intern/rna_brush.c5
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c1
-rw-r--r--source/blender/makesrna/intern/rna_curve.c10
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c1
-rw-r--r--source/blender/makesrna/intern/rna_key.c1
-rw-r--r--source/blender/makesrna/intern/rna_mask.c6
-rw-r--r--source/blender/makesrna/intern/rna_material.c1
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c2
-rw-r--r--source/blender/makesrna/intern/rna_meta.c2
-rw-r--r--source/blender/makesrna/intern/rna_nla.c5
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c32
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c1
-rw-r--r--source/blender/makesrna/intern/rna_particle.c26
-rw-r--r--source/blender/makesrna/intern/rna_property.c4
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c1
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c4
-rw-r--r--source/blender/makesrna/intern/rna_texture.c8
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c6
-rw-r--r--source/blender/makesrna/intern/rna_wm.c57
31 files changed, 117 insertions, 89 deletions
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
index 68564a1e298..3c499908bf7 100644
--- a/source/blender/blenkernel/intern/navmesh_conversion.c
+++ b/source/blender/blenkernel/intern/navmesh_conversion.c
@@ -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);
}
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 1525ded0dd8..2c84fbd8680 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -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],
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 26febf217a6..0bce3ac2907 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -36,6 +36,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "WM_types.h"
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 44ce081f68f..c008ac90e38 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index d6e6786800b..a07a000dacb 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -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", ""},
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index 9f8f30b00a7..ee107fdfe9f 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -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"
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index a832a8cdf96..b9cbbdb32f7 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index 9b2ce863108..1dcc35c8fb3 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -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
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 5d68a6905a3..405d38e9683 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -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"
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 8c7857a3f0b..10349748713 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -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"},
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 28a2ca7cb75..3b789b16f52 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -34,6 +34,7 @@
#include "BLF_translation.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 9773e7a340b..cd3b30687b3 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -46,13 +46,15 @@
#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");
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index c716c3263d1..ffcd1f823b2 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -39,6 +39,7 @@
#include "DNA_scene_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 49d760adb32..d5c9ec53b20 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -39,6 +39,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index 6a5fc393269..77d593b67b6 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index b30bdaf9009..ed2dba907e8 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -31,6 +31,7 @@
#include "DNA_texture_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 2820a7a3aa9..1376eccb448 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -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");
}
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 49b63933ae9..f01b5af7aaa 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 399131bbd61..d2dea03b29b 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -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",
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index eb18f791b04..3f094e6131b 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -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", ""},
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 9bf9bc1deac..9cba4d0958b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -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 */
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index a72188591a1..365ad5fdb9a 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -31,6 +31,7 @@
#include "DNA_packedFile_types.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index b966a7d7f2c..7d30194277b 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -52,34 +52,40 @@
#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
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index fc3697633a4..c6b8e89c282 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -27,11 +27,13 @@
#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"
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index a4e02d6e835..b1f704551e0 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -29,6 +29,7 @@
#include <string.h>
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h"
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 5a3ec8f1f1d..71546c7fad4 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -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", ""},
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index f8e1ac094aa..bc50be00ddd 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -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", ""},
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 6d0af4ec058..ffef17e770a 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -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"},
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index be6defa11d7..2c68661f3bd 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -51,13 +51,15 @@
#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
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index f4c003cfe6c..0feaec85e38 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 8e0e948f040..71e3d86387b 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -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"},