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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-18 09:09:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-18 09:09:41 +0300
commitec2bbc90e7c6a7f21da253333a14d49ef1428319 (patch)
tree0ee36fb8e39593f29197d5fae17b885cc1a700e1 /source/blender
parent54f9a6e5da06e671f7640c9ec3ac3c305644beb6 (diff)
parentab7ebf2b10f67b002447fb0e2cb352c2c178e128 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c6
-rw-r--r--source/blender/editors/animation/drivers.c2
-rw-r--r--source/blender/editors/animation/keyframes_general.c4
-rw-r--r--source/blender/editors/animation/keyingsets.c2
-rw-r--r--source/blender/editors/armature/armature_add.c2
-rw-r--r--source/blender/editors/armature/armature_edit.c4
-rw-r--r--source/blender/editors/armature/armature_naming.c2
-rw-r--r--source/blender/editors/armature/armature_relations.c4
-rw-r--r--source/blender/editors/armature/armature_select.c4
-rw-r--r--source/blender/editors/armature/pose_edit.c2
-rw-r--r--source/blender/editors/armature/pose_group.c2
-rw-r--r--source/blender/editors/armature/pose_lib.c4
-rw-r--r--source/blender/editors/armature/pose_select.c4
-rw-r--r--source/blender/editors/armature/pose_slide.c6
-rw-r--r--source/blender/editors/curve/editcurve.c10
-rw-r--r--source/blender/editors/curve/editcurve_select.c4
-rw-r--r--source/blender/editors/curve/editfont.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_convert.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c10
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h18
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c10
-rw-r--r--source/blender/editors/include/ED_keyframing.h2
-rw-r--r--source/blender/editors/include/ED_object.h2
-rw-r--r--source/blender/editors/interface/interface.c23
-rw-r--r--source/blender/editors/interface/interface_eyedropper.c2
-rw-r--r--source/blender/editors/interface/interface_icons.c2
-rw-r--r--source/blender/editors/interface/interface_layout.c32
-rw-r--r--source/blender/editors/interface/interface_templates.c8
-rw-r--r--source/blender/editors/io/io_collada.c4
-rw-r--r--source/blender/editors/mask/mask_ops.c4
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c2
-rw-r--r--source/blender/editors/mesh/editmesh_intersect.c6
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c2
-rw-r--r--source/blender/editors/mesh/editmesh_select.c14
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c24
-rw-r--r--source/blender/editors/metaball/mball_edit.c2
-rw-r--r--source/blender/editors/object/object_add.c6
-rw-r--r--source/blender/editors/object/object_constraint.c2
-rw-r--r--source/blender/editors/object/object_data_transfer.c10
-rw-r--r--source/blender/editors/object/object_edit.c11
-rw-r--r--source/blender/editors/object/object_group.c2
-rw-r--r--source/blender/editors/object/object_hook.c2
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_modifier.c10
-rw-r--r--source/blender/editors/object/object_relations.c12
-rw-r--r--source/blender/editors/object/object_select.c4
-rw-r--r--source/blender/editors/object/object_shapekey.c2
-rw-r--r--source/blender/editors/object/object_transform.c4
-rw-r--r--source/blender/editors/object/object_vgroup.c21
-rw-r--r--source/blender/editors/physics/dynamicpaint_ops.c2
-rw-r--r--source/blender/editors/physics/particle_edit.c4
-rw-r--r--source/blender/editors/physics/particle_object.c2
-rw-r--r--source/blender/editors/physics/rigidbody_object.c2
-rw-r--r--source/blender/editors/render/render_internal.c2
-rw-r--r--source/blender/editors/render/render_shading.c10
-rw-r--r--source/blender/editors/screen/screen_ops.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_hide.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c6
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c2
-rw-r--r--source/blender/editors/sound/sound_ops.c18
-rw-r--r--source/blender/editors/space_action/action_edit.c8
-rw-r--r--source/blender/editors/space_action/action_select.c4
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c12
-rw-r--r--source/blender/editors/space_clip/tracking_ops_detect.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_orient.c4
-rw-r--r--source/blender/editors/space_clip/tracking_select.c2
-rw-r--r--source/blender/editors/space_console/console_ops.c6
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_graph/graph_edit.c10
-rw-r--r--source/blender/editors/space_graph/graph_select.c4
-rw-r--r--source/blender/editors/space_image/image_ops.c4
-rw-r--r--source/blender/editors/space_logic/logic_ops.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c4
-rw-r--r--source/blender/editors/space_nla/nla_select.c2
-rw-r--r--source/blender/editors/space_node/node_add.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c4
-rw-r--r--source/blender/editors/space_node/node_group.c2
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c18
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c8
-rw-r--r--source/blender/editors/space_sequencer/sequencer_modifier.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c4
-rw-r--r--source/blender/editors/space_text/text_ops.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/transform/transform_ops.c2
-rw-r--r--source/blender/editors/util/undo.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c6
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h2
-rw-r--r--source/blender/makesrna/RNA_access.h37
-rw-r--r--source/blender/makesrna/RNA_define.h4
-rw-r--r--source/blender/makesrna/RNA_enum_types.h262
-rw-r--r--source/blender/makesrna/RNA_types.h2
-rw-r--r--source/blender/makesrna/intern/makesrna.c2
-rw-r--r--source/blender/makesrna/intern/rna_ID.c4
-rw-r--r--source/blender/makesrna/intern/rna_access.c117
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c56
-rw-r--r--source/blender/makesrna/intern/rna_animation.c4
-rw-r--r--source/blender/makesrna/intern/rna_animviz.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c6
-rw-r--r--source/blender/makesrna/intern/rna_boid.c4
-rw-r--r--source/blender/makesrna/intern/rna_brush.c50
-rw-r--r--source/blender/makesrna/intern/rna_camera.c12
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c2
-rw-r--r--source/blender/makesrna/intern/rna_color.c30
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c54
-rw-r--r--source/blender/makesrna/intern/rna_context.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c20
-rw-r--r--source/blender/makesrna/intern/rna_define.c20
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c26
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c28
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c8
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c6
-rw-r--r--source/blender/makesrna/intern/rna_image.c6
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h7
-rw-r--r--source/blender/makesrna/intern/rna_key.c2
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c26
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c44
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_mask.c12
-rw-r--r--source/blender/makesrna/intern/rna_material.c44
-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_modifier.c122
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c4
-rw-r--r--source/blender/makesrna/intern/rna_nla.c6
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c171
-rw-r--r--source/blender/makesrna/intern/rna_object.c40
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c30
-rw-r--r--source/blender/makesrna/intern/rna_packedfile.c2
-rw-r--r--source/blender/makesrna/intern/rna_particle.c70
-rw-r--r--source/blender/makesrna/intern/rna_pose.c8
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c6
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c8
-rw-r--r--source/blender/makesrna/intern/rna_rna.c14
-rw-r--r--source/blender/makesrna/intern/rna_scene.c202
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_screen.c4
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c30
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c20
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c10
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c32
-rw-r--r--source/blender/makesrna/intern/rna_space.c121
-rw-r--r--source/blender/makesrna/intern/rna_texture.c75
-rw-r--r--source/blender/makesrna/intern/rna_tracking.c18
-rw-r--r--source/blender/makesrna/intern/rna_ui.c8
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c16
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c66
-rw-r--r--source/blender/makesrna/intern/rna_wm.c36
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_world.c12
-rw-r--r--source/blender/python/intern/bpy_props.c22
-rw-r--r--source/blender/python/intern/bpy_rna.c31
-rw-r--r--source/blender/python/intern/bpy_rna.h11
-rw-r--r--source/blender/python/intern/bpy_rna_callback.c2
-rw-r--r--source/blender/python/intern/bpy_util.c4
-rw-r--r--source/blender/python/intern/bpy_util.h2
-rw-r--r--source/blender/windowmanager/WM_keymap.h2
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c4
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c6
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c38
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
-rw-r--r--source/blender/windowmanager/wm_window.h3
182 files changed, 1411 insertions, 1370 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 051d9377207..26ba61f0f20 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -682,7 +682,7 @@ typedef enum eRearrangeAnimChan_Mode {
} eRearrangeAnimChan_Mode;
/* defines for rearranging channels */
-static EnumPropertyItem prop_animchannel_rearrange_types[] = {
+static const EnumPropertyItem prop_animchannel_rearrange_types[] = {
{REARRANGE_ANIMCHAN_TOP, "TOP", 0, "To Top", ""},
{REARRANGE_ANIMCHAN_UP, "UP", 0, "Up", ""},
{REARRANGE_ANIMCHAN_DOWN, "DOWN", 0, "Down", ""},
@@ -1745,7 +1745,7 @@ static void ANIM_OT_channels_delete(wmOperatorType *ot)
/* ********************** Set Flags Operator *********************** */
/* defines for setting animation-channel flags */
-static EnumPropertyItem prop_animchannel_setflag_types[] = {
+static const EnumPropertyItem prop_animchannel_setflag_types[] = {
{ACHANNEL_SETFLAG_TOGGLE, "TOGGLE", 0, "Toggle", ""},
{ACHANNEL_SETFLAG_CLEAR, "DISABLE", 0, "Disable", ""},
{ACHANNEL_SETFLAG_ADD, "ENABLE", 0, "Enable", ""},
@@ -1755,7 +1755,7 @@ static EnumPropertyItem prop_animchannel_setflag_types[] = {
/* defines for set animation-channel settings */
// TODO: could add some more types, but those are really quite dependent on the mode...
-static EnumPropertyItem prop_animchannel_settings_types[] = {
+static const EnumPropertyItem prop_animchannel_settings_types[] = {
{ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""},
{ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index e686e278740..dde531a6193 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -767,7 +767,7 @@ EnumPropertyItem prop_driver_create_mapping_types[] = {
};
/* Filtering callback for driver mapping types enum */
-static EnumPropertyItem *driver_mapping_type_itemsf(bContext *C, PointerRNA *UNUSED(owner_ptr), PropertyRNA *UNUSED(owner_prop), bool *r_free)
+static const EnumPropertyItem *driver_mapping_type_itemsf(bContext *C, PointerRNA *UNUSED(owner_ptr), PropertyRNA *UNUSED(owner_prop), bool *r_free)
{
EnumPropertyItem *input = prop_driver_create_mapping_types;
EnumPropertyItem *item = NULL;
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 071c5fab9d7..97f53561bfe 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -885,14 +885,14 @@ static void paste_animedit_keys_fcurve(FCurve *fcu, tAnimCopybufItem *aci, float
/* ------------------- */
-EnumPropertyItem rna_enum_keyframe_paste_offset_items[] = {
+const EnumPropertyItem rna_enum_keyframe_paste_offset_items[] = {
{KEYFRAME_PASTE_OFFSET_CFRA_START, "START", 0, "Frame Start", "Paste keys starting at current frame"},
{KEYFRAME_PASTE_OFFSET_CFRA_END, "END", 0, "Frame End", "Paste keys ending at current frame"},
{KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, "RELATIVE", 0, "Frame Relative", "Paste keys relative to the current frame when copying"},
{KEYFRAME_PASTE_OFFSET_NONE, "NONE", 0, "No Offset", "Paste keys from original time"},
{0, NULL, 0, NULL, NULL}};
-EnumPropertyItem rna_enum_keyframe_paste_merge_items[] = {
+const EnumPropertyItem rna_enum_keyframe_paste_merge_items[] = {
{KEYFRAME_PASTE_MERGE_MIX, "MIX", 0, "Mix", "Overlay existing with new keys"},
{KEYFRAME_PASTE_MERGE_OVER, "OVER_ALL", 0, "Overwrite All", "Replace all keys"},
{KEYFRAME_PASTE_MERGE_OVER_RANGE, "OVER_RANGE", 0, "Overwrite Range", "Overwrite keys in pasted range"},
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index ce1379f760d..da206ac9a64 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -727,7 +727,7 @@ KeyingSet *ANIM_get_keyingset_for_autokeying(Scene *scene, const char *tranformK
/* Menu of All Keying Sets ----------------------------- */
/* Dynamically populate an enum of Keying Sets */
-EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index bbc81f522fa..cff161d9d93 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -778,7 +778,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_symmetrize(wmOperatorType *ot)
{
/* subset of 'rna_enum_symmetrize_direction_items' */
- static EnumPropertyItem arm_symmetrize_direction_items[] = {
+ static const EnumPropertyItem arm_symmetrize_direction_items[] = {
{-1, "NEGATIVE_X", 0, "-X to +X", ""},
{+1, "POSITIVE_X", 0, "+X to -X", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 51b76563c72..ab9a3e068d0 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -265,7 +265,7 @@ typedef enum eCalcRollTypes {
CALC_ROLL_CURSOR,
} eCalcRollTypes;
-static EnumPropertyItem prop_calc_roll_types[] = {
+static const EnumPropertyItem prop_calc_roll_types[] = {
{0, "", 0, N_("Positive"), ""},
{CALC_ROLL_TAN_POS_X, "POS_X", 0, "Local +X Tangent", ""},
{CALC_ROLL_TAN_POS_Z, "POS_Z", 0, "Local +Z Tangent", ""},
@@ -967,7 +967,7 @@ static int armature_merge_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_merge(wmOperatorType *ot)
{
- static EnumPropertyItem merge_types[] = {
+ static const EnumPropertyItem merge_types[] = {
{1, "WITHIN_CHAIN", 0, "Within Chains", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 712689396ae..0d114206c6b 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -436,7 +436,7 @@ static int armature_autoside_names_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_autoside_names(wmOperatorType *ot)
{
- static EnumPropertyItem axis_items[] = {
+ static const EnumPropertyItem axis_items[] = {
{0, "XAXIS", 0, "X-Axis", "Left/Right"},
{1, "YAXIS", 0, "Y-Axis", "Front/Back"},
{2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 99907e9e6ae..51c9836c741 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -743,7 +743,7 @@ static void bone_connect_to_new_parent(ListBase *edbo, EditBone *selbone, EditBo
}
-static EnumPropertyItem prop_editarm_make_parent_types[] = {
+static const EnumPropertyItem prop_editarm_make_parent_types[] = {
{ARM_PAR_CONNECT, "CONNECTED", 0, "Connected", ""},
{ARM_PAR_OFFSET, "OFFSET", 0, "Keep Offset", ""},
{0, NULL, 0, NULL, NULL}
@@ -864,7 +864,7 @@ void ARMATURE_OT_parent_set(wmOperatorType *ot)
-static EnumPropertyItem prop_editarm_clear_parent_types[] = {
+static const EnumPropertyItem prop_editarm_clear_parent_types[] = {
{1, "CLEAR", 0, "Clear Parent", ""},
{2, "DISCONNECT", 0, "Disconnect Bone", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index cbf16d38f6b..49619e13065 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -809,7 +809,7 @@ enum {
SIMEDBONE_LAYER,
};
-static EnumPropertyItem prop_similar_types[] = {
+static const EnumPropertyItem prop_similar_types[] = {
{SIMEDBONE_CHILDREN, "CHILDREN", 0, "Children", ""},
{SIMEDBONE_CHILDREN_IMMEDIATE, "CHILDREN_IMMEDIATE", 0, "Immediate children", ""},
{SIMEDBONE_SIBLINGS, "SIBLINGS", 0, "Siblings", ""},
@@ -1122,7 +1122,7 @@ static int armature_select_hierarchy_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
{BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 7a8b89899a7..db8db2a2ded 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -675,7 +675,7 @@ static int pose_autoside_names_exec(bContext *C, wmOperator *op)
void POSE_OT_autoside_names(wmOperatorType *ot)
{
- static EnumPropertyItem axis_items[] = {
+ static const EnumPropertyItem axis_items[] = {
{0, "XAXIS", 0, "X-Axis", "Left/Right"},
{1, "YAXIS", 0, "Y-Axis", "Front/Back"},
{2, "ZAXIS", 0, "Z-Axis", "Top/Bottom"},
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index c492772b282..c9b1d8613a9 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -328,7 +328,7 @@ static int group_move_exec(bContext *C, wmOperator *op)
void POSE_OT_group_move(wmOperatorType *ot)
{
- static EnumPropertyItem group_slot_move[] = {
+ static const EnumPropertyItem group_slot_move[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index f11168525c0..7261ed0a11c 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -530,7 +530,7 @@ void POSELIB_OT_pose_add(wmOperatorType *ot)
/* ----- */
/* can be called with C == NULL */
-static EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *poselib_stored_pose_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = get_poselib_object(C);
bAction *act = (ob) ? ob->poselib : NULL;
@@ -786,7 +786,7 @@ static int poselib_move_exec(bContext *C, wmOperator *op)
void POSELIB_OT_pose_move(wmOperatorType *ot)
{
PropertyRNA *prop;
- static EnumPropertyItem pose_lib_pose_move[] = {
+ static const EnumPropertyItem pose_lib_pose_move[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index e43212c7bde..77b19130189 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -592,7 +592,7 @@ static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
void POSE_OT_select_hierarchy(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{BONE_SELECT_PARENT, "PARENT", 0, "Select Parent", ""},
{BONE_SELECT_CHILD, "CHILD", 0, "Select Child", ""},
{0, NULL, 0, NULL, NULL}
@@ -841,7 +841,7 @@ static int pose_select_grouped_exec(bContext *C, wmOperator *op)
void POSE_OT_select_grouped(wmOperatorType *ot)
{
- static EnumPropertyItem prop_select_grouped_types[] = {
+ static const EnumPropertyItem prop_select_grouped_types[] = {
{POSE_SEL_SAME_LAYER, "LAYER", 0, "Layer", "Shared layers"},
{POSE_SEL_SAME_GROUP, "GROUP", 0, "Group", "Shared group"},
{POSE_SEL_SAME_KEYINGSET, "KEYINGSET", 0, "Keying Set", "All bones affected by active Keying Set"},
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index f62073d56ef..e5331aff12b 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -136,7 +136,7 @@ typedef enum ePoseSlide_Channels {
} ePoseSlide_Channels;
/* Property enum for ePoseSlide_Channels */
-static EnumPropertyItem prop_channels_types[] = {
+static const EnumPropertyItem prop_channels_types[] = {
{PS_TFM_ALL, "ALL", 0, "All Properties",
"All properties, including transforms, bendy bone shape, and custom properties"},
{PS_TFM_LOC, "LOC", 0, "Location", "Location only"},
@@ -155,7 +155,7 @@ typedef enum ePoseSlide_AxisLock {
} ePoseSlide_AxisLock;
/* Property enum for ePoseSlide_AxisLock */
-static EnumPropertyItem prop_axis_lock_types[] = {
+static const EnumPropertyItem prop_axis_lock_types[] = {
{0, "FREE", 0, "Free", "All axes are affected"},
{PS_LOCK_X, "X", 0, "X", "Only X-axis transforms are affected"},
{PS_LOCK_Y, "Y", 0, "Y", "Only Y-axis transforms are affected"},
@@ -1575,7 +1575,7 @@ static int pose_propagate_exec(bContext *C, wmOperator *op)
void POSE_OT_propagate(wmOperatorType *ot)
{
- static EnumPropertyItem terminate_items[] = {
+ static const EnumPropertyItem terminate_items[] = {
{POSE_PROPAGATE_SMART_HOLDS, "WHILE_HELD", 0, "While Held",
"Propagate pose to all keyframes after current frame that don't change (Default behavior)"},
{POSE_PROPAGATE_NEXT_KEY, "NEXT_KEY", 0, "To Next Keyframe",
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index f8863a3e00f..4757c896650 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -3596,7 +3596,7 @@ static int set_spline_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_spline_type_set(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{CU_POLY, "POLY", 0, "Poly", ""},
{CU_BEZIER, "BEZIER", 0, "Bezier", ""},
// {CU_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
@@ -3641,7 +3641,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
void CURVE_OT_handle_type_set(wmOperatorType *ot)
{
/* keep in sync with graphkeys_handle_type_items */
- static EnumPropertyItem editcurve_handle_type_items[] = {
+ static const EnumPropertyItem editcurve_handle_type_items[] = {
{HD_AUTO, "AUTOMATIC", 0, "Automatic", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{5, "ALIGNED", 0, "Aligned", ""},
@@ -5258,7 +5258,7 @@ static int toggle_cyclic_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS
void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{0, "CYCLIC_U", 0, "Cyclic U", ""},
{1, "CYCLIC_V", 0, "Cyclic V", ""},
{0, NULL, 0, NULL, NULL}
@@ -5752,13 +5752,13 @@ static int curve_delete_exec(bContext *C, wmOperator *op)
return retval;
}
-static EnumPropertyItem curve_delete_type_items[] = {
+static const EnumPropertyItem curve_delete_type_items[] = {
{CURVE_VERTEX, "VERT", 0, "Vertices", ""},
{CURVE_SEGMENT, "SEGMENT", 0, "Segments", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem *rna_curve_delete_type_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_curve_delete_type_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index cad70443657..02b8970731c 100644
--- a/source/blender/editors/curve/editcurve_select.c
+++ b/source/blender/editors/curve/editcurve_select.c
@@ -1192,7 +1192,7 @@ enum {
SIM_CMP_LT,
};
-static EnumPropertyItem curve_prop_similar_compare_types[] = {
+static const EnumPropertyItem curve_prop_similar_compare_types[] = {
{SIM_CMP_EQ, "EQUAL", 0, "Equal", ""},
{SIM_CMP_GT, "GREATER", 0, "Greater", ""},
{SIM_CMP_LT, "LESS", 0, "Less", ""},
@@ -1207,7 +1207,7 @@ enum {
SIMCURHAND_DIRECTION,
};
-static EnumPropertyItem curve_prop_similar_types[] = {
+static const EnumPropertyItem curve_prop_similar_types[] = {
{SIMCURHAND_TYPE, "TYPE", 0, "Type", ""},
{SIMCURHAND_RADIUS, "RADIUS", 0, "Radius", ""},
{SIMCURHAND_WEIGHT, "WEIGHT", 0, "Weight", ""},
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index e6447bf100c..f5a0b225974 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -564,7 +564,7 @@ static int kill_selection(Object *obedit, int ins) /* 1 == new character */
/******************* set style operator ********************/
-static EnumPropertyItem style_items[] = {
+static const EnumPropertyItem style_items[] = {
{CU_CHINFO_BOLD, "BOLD", 0, "Bold", ""},
{CU_CHINFO_ITALIC, "ITALIC", 0, "Italic", ""},
{CU_CHINFO_UNDERLINE, "UNDERLINE", 0, "Underline", ""},
@@ -884,7 +884,7 @@ void FONT_OT_text_paste(wmOperatorType *ot)
/************************ move operator ************************/
-static EnumPropertyItem move_type_items[] = {
+static const EnumPropertyItem move_type_items[] = {
{LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
{LINE_END, "LINE_END", 0, "Line End", ""},
{PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
@@ -1176,7 +1176,7 @@ void FONT_OT_line_break(wmOperatorType *ot)
/******************* delete operator **********************/
-static EnumPropertyItem delete_type_items[] = {
+static const EnumPropertyItem delete_type_items[] = {
{DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
{DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
{DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
@@ -1597,7 +1597,7 @@ void ED_curve_editfont_free(Object *obedit)
/********************** set case operator *********************/
-static EnumPropertyItem case_items[] = {
+static const EnumPropertyItem case_items[] = {
{CASE_LOWER, "LOWER", 0, "Lower", ""},
{CASE_UPPER, "UPPER", 0, "Upper", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index a4e5a908531..5d014b5d49e 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -109,20 +109,20 @@ enum {
};
/* RNA enum define */
-static EnumPropertyItem prop_gpencil_convertmodes[] = {
+static const EnumPropertyItem prop_gpencil_convertmodes[] = {
{GP_STROKECONVERT_PATH, "PATH", ICON_CURVE_PATH, "Path", "Animation path"},
{GP_STROKECONVERT_CURVE, "CURVE", ICON_CURVE_BEZCURVE, "Bezier Curve", "Smooth Bezier curve"},
{GP_STROKECONVERT_POLY, "POLY", ICON_MESH_DATA, "Polygon Curve", "Bezier curve with straight-line segments (vector handles)"},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_gpencil_convert_timingmodes_restricted[] = {
+static const EnumPropertyItem prop_gpencil_convert_timingmodes_restricted[] = {
{GP_STROKECONVERT_TIMING_NONE, "NONE", 0, "No Timing", "Ignore timing"},
{GP_STROKECONVERT_TIMING_LINEAR, "LINEAR", 0, "Linear", "Simple linear timing"},
{0, NULL, 0, NULL, NULL},
};
-static EnumPropertyItem prop_gpencil_convert_timingmodes[] = {
+static const EnumPropertyItem prop_gpencil_convert_timingmodes[] = {
{GP_STROKECONVERT_TIMING_NONE, "NONE", 0, "No Timing", "Ignore timing"},
{GP_STROKECONVERT_TIMING_LINEAR, "LINEAR", 0, "Linear", "Simple linear timing"},
{GP_STROKECONVERT_TIMING_FULL, "FULL", 0, "Original", "Use the original timing, gaps included"},
@@ -131,7 +131,7 @@ static EnumPropertyItem prop_gpencil_convert_timingmodes[] = {
{0, NULL, 0, NULL, NULL},
};
-static EnumPropertyItem *rna_GPConvert_mode_items(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *rna_GPConvert_mode_items(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
if (RNA_boolean_get(ptr, "use_timing_data")) {
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 6980ad46241..93c9d21e717 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -302,7 +302,7 @@ static int gp_layer_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_layer_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_LAYER_MOVE_UP, "UP", 0, "Up", ""},
{GP_LAYER_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -831,7 +831,7 @@ static int gp_stroke_arrange_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_arrange(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_STROKE_MOVE_UP, "UP", 0, "Bring Forward", ""},
{GP_STROKE_MOVE_DOWN, "DOWN", 0, "Send Backward", ""},
{GP_STROKE_MOVE_TOP, "TOP", 0, "Bring to Front", ""},
@@ -1165,7 +1165,7 @@ static int gp_brush_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_brush_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_BRUSH_MOVE_UP, "UP", 0, "Up", ""},
{GP_BRUSH_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL }
@@ -1922,7 +1922,7 @@ static int gp_palettecolor_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_palettecolor_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{GP_COLOR_MOVE_UP, "UP", 0, "Up", ""},
{GP_COLOR_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 4cd628b7fd3..a82148788c8 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -653,7 +653,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_paste(wmOperatorType *ot)
{
- static EnumPropertyItem copy_type[] = {
+ static const EnumPropertyItem copy_type[] = {
{GP_COPY_ONLY, "COPY", 0, "Copy", ""},
{GP_COPY_MERGE, "MERGE", 0, "Merge", ""},
{0, NULL, 0, NULL, NULL}
@@ -1318,7 +1318,7 @@ static int gp_delete_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_delete(wmOperatorType *ot)
{
- static EnumPropertyItem prop_gpencil_delete_types[] = {
+ static const EnumPropertyItem prop_gpencil_delete_types[] = {
{GP_DELETEOP_POINTS, "POINTS", 0, "Points", "Delete selected points and split strokes into segments"},
{GP_DELETEOP_STROKES, "STROKES", 0, "Strokes", "Delete selected strokes"},
{GP_DELETEOP_FRAME, "FRAME", 0, "Frame", "Delete active frame"},
@@ -1738,7 +1738,7 @@ static int gp_stroke_cyclical_set_exec(bContext *C, wmOperator *op)
*/
void GPENCIL_OT_stroke_cyclical_set(wmOperatorType *ot)
{
- static EnumPropertyItem cyclic_type[] = {
+ static const EnumPropertyItem cyclic_type[] = {
{GP_STROKE_CYCLIC_CLOSE, "CLOSE", 0, "Close all", ""},
{GP_STROKE_CYCLIC_OPEN, "OPEN", 0, "Open all", ""},
{GP_STROKE_CYCLIC_TOGGLE, "TOGGLE", 0, "Toggle", ""},
@@ -2000,7 +2000,7 @@ static int gp_stroke_join_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_stroke_join(wmOperatorType *ot)
{
- static EnumPropertyItem join_type[] = {
+ static const EnumPropertyItem join_type[] = {
{GP_STROKE_JOIN, "JOIN", 0, "Join", ""},
{GP_STROKE_JOINCOPY, "JOINCOPY", 0, "Join and Copy", ""},
{0, NULL, 0, NULL, NULL}
@@ -2190,7 +2190,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_reproject(wmOperatorType *ot)
{
- static EnumPropertyItem reproject_type[] = {
+ static const EnumPropertyItem reproject_type[] = {
{GP_REPROJECT_PLANAR, "PLANAR", 0, "Planar",
"Reproject the strokes to end up on the same plane, as if drawn from the current viewpoint "
"using 'Cursor' Stroke Placement"},
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index a3734c56c59..04bcea02c9b 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -121,16 +121,22 @@ void gp_randomize_stroke(bGPDstroke *gps, bGPDbrush *brush);
/* Layers Enums -------------------------------------- */
-struct EnumPropertyItem *ED_gpencil_layers_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-struct EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const struct EnumPropertyItem *ED_gpencil_layers_enum_itemf(
+ struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop,
+ bool *r_free);
+const struct EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(
+ struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop,
+ bool *r_free);
/* Enums of GP Brushes */
-EnumPropertyItem *ED_gpencil_brushes_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
- bool *r_free);
+const EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
+ bool *r_free);
/* Enums of GP palettes */
-EnumPropertyItem *ED_gpencil_palettes_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
- bool *r_free);
+const EnumPropertyItem *ED_gpencil_palettes_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
+ bool *r_free);
/* ***************************************************** */
/* Operator Defines */
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index fcca0a38c3f..0b4bdb9914d 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2758,7 +2758,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
/* ------------------------------- */
-static EnumPropertyItem prop_gpencil_drawmodes[] = {
+static const EnumPropertyItem prop_gpencil_drawmodes[] = {
{GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", "Draw freehand stroke(s)"},
{GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", "Draw straight line segment(s)"},
{GP_PAINTMODE_DRAW_POLY, "DRAW_POLY", 0, "Draw Poly Line", "Click to place endpoints of straight line segments (connected)"},
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 3d9689ab54f..07abab8af2e 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -371,7 +371,7 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_select_grouped(wmOperatorType *ot)
{
- static EnumPropertyItem prop_select_grouped_types[] = {
+ static const EnumPropertyItem prop_select_grouped_types[] = {
{GP_SEL_SAME_LAYER, "LAYER", 0, "Layer", "Shared layers"},
{GP_SEL_SAME_COLOR, "COLOR", 0, "Color", "Shared colors"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index fae08bd771e..4023a343b22 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -309,7 +309,8 @@ int gp_active_palettecolor_poll(bContext *C)
/* NOTE: These include an option to create a new layer and use that... */
/* Just existing layers */
-EnumPropertyItem *ED_gpencil_layers_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *ED_gpencil_layers_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
bGPDlayer *gpl;
@@ -342,7 +343,8 @@ EnumPropertyItem *ED_gpencil_layers_enum_itemf(bContext *C, PointerRNA *UNUSED(p
}
/* Existing + Option to add/use new layer */
-EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
bGPDlayer *gpl;
@@ -1104,7 +1106,7 @@ bool ED_gpencil_stroke_minmax(
}
/* Dynamic Enums of GP Brushes */
-EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
+const EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
bool *r_free)
{
@@ -1139,7 +1141,7 @@ EnumPropertyItem *ED_gpencil_brushes_enum_itemf(
}
/* Dynamic Enums of GP Palettes */
-EnumPropertyItem *ED_gpencil_palettes_enum_itemf(
+const EnumPropertyItem *ED_gpencil_palettes_enum_itemf(
bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
bool *r_free)
{
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 07cdff687a3..4279e3d202c 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -222,7 +222,7 @@ int ANIM_scene_get_keyingset_index(struct Scene *scene, struct KeyingSet *ks);
struct KeyingSet *ANIM_get_keyingset_for_autokeying(struct Scene *scene, const char *tranformKSName);
/* Dynamically populate an enum of Keying Sets */
-struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
/* Check if KeyingSet can be used in the current context */
bool ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 56a91d9846c..5e3c91e15ab 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -213,7 +213,7 @@ bool ED_object_multires_update_totlevels_cb(struct Object *ob, void *totlevel_v)
/* object_select.c */
void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
-struct EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
+const struct EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
const struct bContext *C,
struct PointerRNA *ptr,
struct PropertyRNA *prop,
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 35cbcccf515..96273f5e83c 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3302,7 +3302,7 @@ static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *bu
uiBut *but = (uiBut *)but_p;
/* see comment in ui_item_enum_expand, re: uiname */
- EnumPropertyItem *item, *item_array;
+ const EnumPropertyItem *item, *item_array;
bool free;
uiLayout *split, *column = NULL;
@@ -3412,9 +3412,8 @@ static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *bu
UI_block_layout_set_current(block, layout);
if (free) {
- MEM_freeN(item_array);
+ MEM_freeN((void *)item_array);
}
-
BLI_assert((block->flag & UI_BLOCK_IS_FLIP) == 0);
block->flag |= UI_BLOCK_IS_FLIP;
}
@@ -3445,7 +3444,7 @@ static uiBut *ui_def_but_rna(
/* use rna values if parameters are not specified */
if ((proptype == PROP_ENUM) && ELEM(type, UI_BTYPE_MENU, UI_BTYPE_ROW, UI_BTYPE_LISTROW)) {
/* UI_BTYPE_MENU is handled a little differently here */
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int value;
bool free;
int i;
@@ -3487,7 +3486,7 @@ static uiBut *ui_def_but_rna(
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
}
else {
@@ -4449,7 +4448,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *but, const c
}
else {
PointerRNA *ptr = UI_but_operator_ptr_get(but); /* Will create it if needed! */
- EnumPropertyItem *item, *item_array;
+ const EnumPropertyItem *item, *item_array;
bool do_free;
RNA_property_enum_items_gettexted((bContext *)C, ptr, prop, &item_array, NULL, &do_free);
@@ -4462,8 +4461,9 @@ static void operator_enum_search_cb(const struct bContext *C, void *but, const c
}
}
- if (do_free)
- MEM_freeN(item_array);
+ if (do_free) {
+ MEM_freeN((void *)item_array);
+ }
}
}
@@ -4537,7 +4537,7 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
va_list args;
uiStringInfo *si;
- EnumPropertyItem *items = NULL, *item = NULL;
+ const EnumPropertyItem *items = NULL, *item = NULL;
int totitems;
bool free_items = false;
@@ -4716,8 +4716,9 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
}
va_end(args);
- if (free_items && items)
- MEM_freeN(items);
+ if (free_items && items) {
+ MEM_freeN((void *)items);
+ }
}
/* Program Init/Exit */
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c
index 2695d4c9dd9..5f690794028 100644
--- a/source/blender/editors/interface/interface_eyedropper.c
+++ b/source/blender/editors/interface/interface_eyedropper.c
@@ -92,7 +92,7 @@ enum {
wmKeyMap *eyedropper_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{EYE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{EYE_MODAL_SAMPLE_CONFIRM, "SAMPLE_CONFIRM", 0, "Confirm Sampling", ""},
{EYE_MODAL_SAMPLE_BEGIN, "SAMPLE_BEGIN", 0, "Start Sampling", ""},
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index ac07756b372..d048324d35e 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1195,7 +1195,7 @@ static int ui_id_brush_get_icon(const bContext *C, ID *id)
else {
Object *ob = CTX_data_active_object(C);
SpaceImage *sima;
- EnumPropertyItem *items = NULL;
+ const EnumPropertyItem *items = NULL;
int tool = PAINT_TOOL_DRAW, mode = 0;
/* XXX: this is not nice, should probably make brushes
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index d2e4cdf5453..7717cee2c46 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -595,7 +595,7 @@ static void ui_item_enum_expand(
uiBut *but;
uiLayout *layout_radial = NULL;
- EnumPropertyItem *item, *item_array;
+ const EnumPropertyItem *item, *item_array;
const char *name;
int itemw, icon, value;
bool free;
@@ -656,7 +656,7 @@ static void ui_item_enum_expand(
UI_block_layout_set_current(block, layout);
if (free) {
- MEM_freeN(item_array);
+ MEM_freeN((void *)item_array);
}
}
@@ -871,7 +871,7 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
static const char *ui_menu_enumpropname(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int retval)
{
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
bool free;
const char *name;
@@ -884,7 +884,7 @@ static const char *ui_menu_enumpropname(uiLayout *layout, PointerRNA *ptr, Prope
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
return name;
@@ -1070,7 +1070,7 @@ void uiItemsFullEnumO(
BLI_assert((prop == NULL) || (RNA_property_type(prop) == PROP_ENUM));
if (prop && RNA_property_type(prop) == PROP_ENUM) {
- EnumPropertyItem *item_array = NULL;
+ const EnumPropertyItem *item_array = NULL;
int totitem;
bool free;
@@ -1087,7 +1087,7 @@ void uiItemsFullEnumO(
item_array, totitem);
if (free) {
- MEM_freeN(item_array);
+ MEM_freeN((void *)item_array);
}
/* intentionally don't touch UI_BLOCK_IS_FLIP here,
@@ -1143,7 +1143,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
PointerRNA ptr;
PropertyRNA *prop;
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int value;
bool free;
@@ -1157,14 +1157,14 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free);
if (item == NULL || RNA_enum_value_from_id(item, value_str, &value) == 0) {
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
RNA_warning("%s.%s, enum %s not found", RNA_struct_identifier(ptr.type), propname, value_str);
return;
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
}
else {
@@ -1262,7 +1262,7 @@ static void ui_item_rna_size(
}
else if (type == PROP_ENUM) {
/* Find the longest enum item name, instead of using a dummy text! */
- EnumPropertyItem *item, *item_array;
+ const EnumPropertyItem *item, *item_array;
bool free;
RNA_property_enum_items_gettexted(layout->root->block->evil_C, ptr, prop, &item_array, NULL, &free);
@@ -1272,7 +1272,7 @@ static void ui_item_rna_size(
}
}
if (free) {
- MEM_freeN(item_array);
+ MEM_freeN((void *)item_array);
}
}
}
@@ -1482,7 +1482,7 @@ void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA
void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon)
{
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int ivalue, a;
bool free;
@@ -1496,7 +1496,7 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
if (!RNA_enum_value_from_id(item, value, &ivalue)) {
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
ui_item_disabled(layout, propname);
RNA_warning("enum property value not found: %s", value);
@@ -1514,7 +1514,7 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
}
@@ -1537,7 +1537,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
return;
}
else {
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int totitem, i;
bool free;
uiLayout *split = uiLayoutSplit(layout, 0.0f, false);
@@ -1570,7 +1570,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
}
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index f2ee8a11706..a5fe840716e 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1904,7 +1904,7 @@ static uiBlock *ui_icon_view_menu_cb(bContext *C, ARegion *ar, void *arg_litem)
uiBlock *block;
uiBut *but;
int icon, value;
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int a;
bool free;
int w, h;
@@ -1944,7 +1944,7 @@ static uiBlock *ui_icon_view_menu_cb(bContext *C, ARegion *ar, void *arg_litem)
UI_block_direction_set(block, UI_DIR_DOWN);
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
return block;
@@ -1957,7 +1957,7 @@ void uiTemplateIconView(uiLayout *layout, PointerRNA *ptr, const char *propname,
{
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
IconViewMenuArgs *cb_args;
- EnumPropertyItem *items;
+ const EnumPropertyItem *items;
uiBlock *block;
uiBut *but;
int value, icon = ICON_NONE, tot_items;
@@ -1985,7 +1985,7 @@ void uiTemplateIconView(uiLayout *layout, PointerRNA *ptr, const char *propname,
ui_def_but_icon(but, icon, UI_HAS_ICON | UI_BUT_ICON_PREVIEW);
if (free_items) {
- MEM_freeN(items);
+ MEM_freeN((void *)items);
}
}
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index f9297c58cbb..9e79ca5b0e3 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -315,13 +315,13 @@ void WM_OT_collada_export(wmOperatorType *ot)
{
struct StructRNA *func = ot->srna;
- static EnumPropertyItem prop_bc_export_mesh_type[] = {
+ static const EnumPropertyItem prop_bc_export_mesh_type[] = {
{BC_MESH_TYPE_VIEW, "view", 0, "View", "Apply modifier's view settings"},
{BC_MESH_TYPE_RENDER, "render", 0, "Render", "Apply modifier's render settings"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_bc_export_transformation_type[] = {
+ static const EnumPropertyItem prop_bc_export_transformation_type[] = {
{BC_TRANSFORMATION_TYPE_MATRIX, "matrix", 0, "Matrix", "Use <matrix> to specify transformations"},
{BC_TRANSFORMATION_TYPE_TRANSROTLOC, "transrotloc", 0, "TransRotLoc", "Use <translate>, <rotate>, <scale> to specify transformations"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index d299bba93c3..c170fbde7dc 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -1910,7 +1910,7 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
void MASK_OT_handle_type_set(wmOperatorType *ot)
{
- static EnumPropertyItem editcurve_handle_type_items[] = {
+ static const EnumPropertyItem editcurve_handle_type_items[] = {
{HD_AUTO, "AUTO", 0, "Auto", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned Single", ""},
@@ -2152,7 +2152,7 @@ static int mask_layer_move_exec(bContext *C, wmOperator *op)
void MASK_OT_layer_move(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 6b4f3516338..2af05a9ad8d 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -596,7 +596,7 @@ void MESH_OT_bevel(wmOperatorType *ot)
{
PropertyRNA *prop;
- static EnumPropertyItem offset_type_items[] = {
+ static const EnumPropertyItem offset_type_items[] = {
{BEVEL_AMT_OFFSET, "OFFSET", 0, "Offset", "Amount is offset of new edges from original"},
{BEVEL_AMT_WIDTH, "WIDTH", 0, "Width", "Amount is width of new face"},
{BEVEL_AMT_DEPTH, "DEPTH", 0, "Depth", "Amount is perpendicular distance from original edge to bevel face"},
diff --git a/source/blender/editors/mesh/editmesh_intersect.c b/source/blender/editors/mesh/editmesh_intersect.c
index 49bfde77032..3498c6246d7 100644
--- a/source/blender/editors/mesh/editmesh_intersect.c
+++ b/source/blender/editors/mesh/editmesh_intersect.c
@@ -214,7 +214,7 @@ static int edbm_intersect_exec(bContext *C, wmOperator *op)
void MESH_OT_intersect(struct wmOperatorType *ot)
{
- static EnumPropertyItem isect_mode_items[] = {
+ static const EnumPropertyItem isect_mode_items[] = {
{ISECT_SEL, "SELECT", 0, "Self Intersect",
"Self intersect selected faces"},
{ISECT_SEL_UNSEL, "SELECT_UNSELECT", 0, "Selected/Unselected",
@@ -222,7 +222,7 @@ void MESH_OT_intersect(struct wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem isect_separate_items[] = {
+ static const EnumPropertyItem isect_separate_items[] = {
{ISECT_SEPARATE_ALL, "ALL", 0, "All",
"Separate all geometry from intersections"},
{ISECT_SEPARATE_CUT, "CUT", 0, "Cut",
@@ -298,7 +298,7 @@ static int edbm_intersect_boolean_exec(bContext *C, wmOperator *op)
void MESH_OT_intersect_boolean(struct wmOperatorType *ot)
{
- static EnumPropertyItem isect_boolean_operation_items[] = {
+ static const EnumPropertyItem isect_boolean_operation_items[] = {
{BMESH_ISECT_BOOLEAN_ISECT, "INTERSECT", 0, "Intersect", ""},
{BMESH_ISECT_BOOLEAN_UNION, "UNION", 0, "Union", ""},
{BMESH_ISECT_BOOLEAN_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 0cd6c53d5a9..c0501078424 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -2728,7 +2728,7 @@ static int knifetool_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{KNF_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{KNF_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{KNF_MODAL_MIDPOINT_ON, "SNAP_MIDPOINTS_ON", 0, "Snap To Midpoints On", ""},
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 7fe4e58d2e0..4e0be704298 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -970,7 +970,7 @@ static int unified_findnearest(
/* **************** SIMILAR "group" SELECTS. FACE, EDGE AND VERTEX ************** */
-static EnumPropertyItem prop_similar_compare_types[] = {
+static const EnumPropertyItem prop_similar_compare_types[] = {
{SIM_CMP_EQ, "EQUAL", 0, "Equal", ""},
{SIM_CMP_GT, "GREATER", 0, "Greater", ""},
{SIM_CMP_LT, "LESS", 0, "Less", ""},
@@ -978,7 +978,7 @@ static EnumPropertyItem prop_similar_compare_types[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_similar_types[] = {
+static const EnumPropertyItem prop_similar_types[] = {
{SIMVERT_NORMAL, "NORMAL", 0, "Normal", ""},
{SIMVERT_FACE, "FACE", 0, "Amount of Adjacent Faces", ""},
{SIMVERT_VGROUP, "VGROUP", 0, "Vertex Groups", ""},
@@ -1152,7 +1152,7 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op)
else return similar_face_select_exec(C, op);
}
-static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop),
bool *r_free)
{
Object *obedit;
@@ -1347,14 +1347,14 @@ void MESH_OT_select_mode(wmOperatorType *ot)
{
PropertyRNA *prop;
- static EnumPropertyItem elem_items[] = {
+ static const EnumPropertyItem elem_items[] = {
{SCE_SELECT_VERTEX, "VERT", ICON_VERTEXSEL, "Vertices", ""},
{SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edges", ""},
{SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Faces", ""},
{0, NULL, 0, NULL, NULL},
};
- static EnumPropertyItem actions_items[] = {
+ static const EnumPropertyItem actions_items[] = {
{0, "DISABLE", 0, "Disable", "Disable selected markers"},
{1, "ENABLE", 0, "Enable", "Enable selected markers"},
{2, "TOGGLE", 0, "Toggle", "Toggle disabled flag for selected markers"},
@@ -3820,14 +3820,14 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op)
void MESH_OT_select_axis(wmOperatorType *ot)
{
- static EnumPropertyItem axis_mode_items[] = {
+ static const EnumPropertyItem axis_mode_items[] = {
{0, "POSITIVE", 0, "Positive Axis", ""},
{1, "NEGATIVE", 0, "Negative Axis", ""},
{-1, "ALIGNED", 0, "Aligned Axis", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem axis_items_xyz[] = {
+ static const EnumPropertyItem axis_items_xyz[] = {
{0, "X_AXIS", 0, "X Axis", ""},
{1, "Y_AXIS", 0, "Y Axis", ""},
{2, "Z_AXIS", 0, "Z Axis", ""},
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index b44b78c450b..41f3c1e6548 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -116,7 +116,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op)
}
/* Note, these values must match delete_mesh() event values */
-static EnumPropertyItem prop_mesh_cornervert_types[] = {
+static const EnumPropertyItem prop_mesh_cornervert_types[] = {
{SUBD_CORNER_INNERVERT, "INNERVERT", 0, "Inner Vert", ""},
{SUBD_CORNER_PATH, "PATH", 0, "Path", ""},
{SUBD_CORNER_STRAIGHT_CUT, "STRAIGHT_CUT", 0, "Straight Cut", ""},
@@ -175,7 +175,7 @@ struct EdgeRingOpSubdProps {
static void mesh_operator_edgering_props(wmOperatorType *ot, const int cuts_min, const int cuts_default)
{
/* Note, these values must match delete_mesh() event values */
- static EnumPropertyItem prop_subd_edgering_types[] = {
+ static const EnumPropertyItem prop_subd_edgering_types[] = {
{SUBD_RING_INTERP_LINEAR, "LINEAR", 0, "Linear", ""},
{SUBD_RING_INTERP_PATH, "PATH", 0, "Blend Path", ""},
{SUBD_RING_INTERP_SURF, "SURFACE", 0, "Blend Surface", ""},
@@ -395,7 +395,7 @@ static int edbm_delete_exec(bContext *C, wmOperator *op)
void MESH_OT_delete(wmOperatorType *ot)
{
- static EnumPropertyItem prop_mesh_delete_types[] = {
+ static const EnumPropertyItem prop_mesh_delete_types[] = {
{MESH_DELETE_VERT, "VERT", 0, "Vertices", ""},
{MESH_DELETE_EDGE, "EDGE", 0, "Edges", ""},
{MESH_DELETE_FACE, "FACE", 0, "Faces", ""},
@@ -2271,7 +2271,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem merge_type_items[] = {
+static const EnumPropertyItem merge_type_items[] = {
{MESH_MERGE_FIRST, "FIRST", 0, "At First", ""},
{MESH_MERGE_LAST, "LAST", 0, "At Last", ""},
{MESH_MERGE_CENTER, "CENTER", 0, "At Center", ""},
@@ -2280,7 +2280,7 @@ static EnumPropertyItem merge_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *obedit;
EnumPropertyItem *item = NULL;
@@ -2543,7 +2543,7 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em;
@@ -2695,7 +2695,7 @@ void MESH_OT_solidify(wmOperatorType *ot)
#define KNIFE_MIDPOINT 2
#define KNIFE_MULTICUT 3
-static EnumPropertyItem knife_items[] = {
+static const EnumPropertyItem knife_items[] = {
{KNIFE_EXACT, "EXACT", 0, "Exact", ""},
{KNIFE_MIDPOINT, "MIDPOINTS", 0, "Midpoints", ""},
{KNIFE_MULTICUT, "MULTICUT", 0, "Multicut", ""},
@@ -3384,7 +3384,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op)
void MESH_OT_separate(wmOperatorType *ot)
{
- static EnumPropertyItem prop_separate_types[] = {
+ static const EnumPropertyItem prop_separate_types[] = {
{MESH_SEPARATE_SELECTED, "SELECTED", 0, "Selection", ""},
{MESH_SEPARATE_MATERIAL, "MATERIAL", 0, "By Material", ""},
{MESH_SEPARATE_LOOSE, "LOOSE", 0, "By loose parts", ""},
@@ -3850,7 +3850,7 @@ static int edbm_poke_face_exec(bContext *C, wmOperator *op)
void MESH_OT_poke(wmOperatorType *ot)
{
- static EnumPropertyItem poke_center_modes[] = {
+ static const EnumPropertyItem poke_center_modes[] = {
{BMOP_POKE_MEAN_WEIGHTED, "MEAN_WEIGHTED", 0, "Weighted Mean", "Weighted Mean Face Center"},
{BMOP_POKE_MEAN, "MEAN", 0, "Mean", "Mean Face Center"},
{BMOP_POKE_BOUNDS, "BOUNDS", 0, "Bounds", "Face Bounds Center"},
@@ -5152,7 +5152,7 @@ static void edbm_sort_elements_ui(bContext *C, wmOperator *op)
void MESH_OT_sort_elements(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{SRT_VIEW_ZAXIS, "VIEW_ZAXIS", 0, "View Z Axis",
"Sort selected elements from farthest to nearest one in current view"},
{SRT_VIEW_XAXIS, "VIEW_XAXIS", 0, "View X Axis",
@@ -5169,7 +5169,7 @@ void MESH_OT_sort_elements(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL},
};
- static EnumPropertyItem elem_items[] = {
+ static const EnumPropertyItem elem_items[] = {
{BM_VERT, "VERT", 0, "Vertices", ""},
{BM_EDGE, "EDGE", 0, "Edges", ""},
{BM_FACE, "FACE", 0, "Faces", ""},
@@ -5426,7 +5426,7 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op)
void MESH_OT_bridge_edge_loops(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{MESH_BRIDGELOOP_SINGLE, "SINGLE", 0, "Open Loop", ""},
{MESH_BRIDGELOOP_CLOSED, "CLOSED", 0, "Closed Loop", ""},
{MESH_BRIDGELOOP_PAIRS, "PAIRS", 0, "Loop Pairs", ""},
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 47d354ac72a..175b40d72ff 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -188,7 +188,7 @@ enum {
SIMMBALL_ROTATION
};
-static EnumPropertyItem prop_similar_types[] = {
+static const EnumPropertyItem prop_similar_types[] = {
{SIMMBALL_TYPE, "TYPE", 0, "Type", ""},
{SIMMBALL_RADIUS, "RADIUS", 0, "Radius", ""},
{SIMMBALL_STIFFNESS, "STIFFNESS", 0, "Stiffness", ""},
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 486c4637d08..936f9b346b4 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -125,7 +125,7 @@
/* this is an exact copy of the define in rna_lamp.c
* kept here because of linking order.
* Icons are only defined here */
-EnumPropertyItem rna_enum_lamp_type_items[] = {
+const EnumPropertyItem rna_enum_lamp_type_items[] = {
{LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source"},
{LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source"},
{LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source"},
@@ -135,7 +135,7 @@ EnumPropertyItem rna_enum_lamp_type_items[] = {
};
/* copy from rna_object_force.c */
-static EnumPropertyItem field_type_items[] = {
+static const EnumPropertyItem field_type_items[] = {
{PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", ""},
{PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", ""},
{PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, "Vortex", ""},
@@ -1628,7 +1628,7 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
/**************************** Convert **************************/
-static EnumPropertyItem convert_target_items[] = {
+static const EnumPropertyItem convert_target_items[] = {
{OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""},
{OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, "Mesh from Curve/Meta/Surf/Text", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index f9401433362..5392b5c3dd0 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -572,7 +572,7 @@ static void object_test_constraint(Object *owner, bConstraint *con)
#define EDIT_CONSTRAINT_OWNER_OBJECT 0
#define EDIT_CONSTRAINT_OWNER_BONE 1
-static EnumPropertyItem constraint_owner_items[] = {
+static const EnumPropertyItem constraint_owner_items[] = {
{EDIT_CONSTRAINT_OWNER_OBJECT, "OBJECT", 0, "Object", "Edit a constraint on the active object"},
{EDIT_CONSTRAINT_OWNER_BONE, "BONE", 0, "Bone", "Edit a constraint on the active bone"},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index 3647533eb8f..26af20ccf40 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -64,7 +64,7 @@
/* All possible data to transfer.
* Note some are 'fake' ones, i.e. they are not hold by real CDLayers. */
/* Not shared with modifier, since we use a usual enum here, not a multi-choice one. */
-static EnumPropertyItem DT_layer_items[] = {
+static const EnumPropertyItem DT_layer_items[] = {
{0, "", 0, "Vertex Data", ""},
{DT_TYPE_MDEFORMVERT, "VGROUP_WEIGHTS", 0, "Vertex Group(s)", "Transfer active or all vertex groups"},
#if 0 /* XXX For now, would like to finish/merge work from 2014 gsoc first. */
@@ -91,7 +91,7 @@ static EnumPropertyItem DT_layer_items[] = {
};
/* Note: rna_enum_dt_layers_select_src_items enum is from rna_modifier.c */
-static EnumPropertyItem *dt_layers_select_src_itemf(
+static const EnumPropertyItem *dt_layers_select_src_itemf(
bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EvaluationContext eval_ctx;
@@ -187,7 +187,7 @@ static EnumPropertyItem *dt_layers_select_src_itemf(
}
/* Note: rna_enum_dt_layers_select_dst_items enum is from rna_modifier.c */
-static EnumPropertyItem *dt_layers_select_dst_itemf(
+static const EnumPropertyItem *dt_layers_select_dst_itemf(
bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
@@ -213,7 +213,7 @@ static EnumPropertyItem *dt_layers_select_dst_itemf(
return item;
}
-static EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
+static const EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
{
const bool reverse_transfer = RNA_boolean_get(ptr, "use_reverse_transfer");
@@ -234,7 +234,7 @@ static EnumPropertyItem *dt_layers_select_itemf(bContext *C, PointerRNA *ptr, Pr
}
/* Note: rna_enum_dt_mix_mode_items enum is from rna_modifier.c */
-static EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
int totitem = 0;
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 879bbe6a714..771915a06dc 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1393,9 +1393,10 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, SceneLayer *sl)
}
-static EnumPropertyItem *object_mode_set_itemsf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *object_mode_set_itemsf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
- EnumPropertyItem *input = rna_enum_object_mode_items;
+ const EnumPropertyItem *input = rna_enum_object_mode_items;
EnumPropertyItem *item = NULL;
Object *ob;
bGPdata *gpd;
@@ -1775,7 +1776,7 @@ static int game_property_move(bContext *C, wmOperator *op)
void OBJECT_OT_game_property_move(wmOperatorType *ot)
{
- static EnumPropertyItem direction_property_move[] = {
+ static const EnumPropertyItem direction_property_move[] = {
{GAME_PROPERTY_MOVE_UP, "UP", 0, "Up", ""},
{GAME_PROPERTY_MOVE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -1808,14 +1809,14 @@ void OBJECT_OT_game_property_move(wmOperatorType *ot)
#define COPY_PROPERTIES_MERGE 2
#define COPY_PROPERTIES_COPY 3
-static EnumPropertyItem game_properties_copy_operations[] = {
+static const EnumPropertyItem game_properties_copy_operations[] = {
{COPY_PROPERTIES_REPLACE, "REPLACE", 0, "Replace Properties", ""},
{COPY_PROPERTIES_MERGE, "MERGE", 0, "Merge Properties", ""},
{COPY_PROPERTIES_COPY, "COPY", 0, "Copy a Property", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *gameprops_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = ED_object_active_context(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index b32fb975ea8..ef7e48f2d1a 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -64,7 +64,7 @@
/********************* 3d view operators ***********************/
/* can be called with C == NULL */
-static EnumPropertyItem *group_object_active_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *group_object_active_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob;
EnumPropertyItem *item = NULL, item_tmp = {0};
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 314019b4f76..3f6651299be 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -669,7 +669,7 @@ static int object_hook_remove_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *hook_mod_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = CTX_data_edit_object(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 4eafe715a6f..557e0a0eccf 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -820,7 +820,7 @@ static int lattice_flip_exec(bContext *C, wmOperator *op)
void LATTICE_OT_flip(wmOperatorType *ot)
{
- static EnumPropertyItem flip_items[] = {
+ static const EnumPropertyItem flip_items[] = {
{LATTICE_FLIP_U, "U", 0, "U (X) Axis", ""},
{LATTICE_FLIP_V, "V", 0, "V (Y) Axis", ""},
{LATTICE_FLIP_W, "W", 0, "W (Z) Axis", ""},
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 6e70734db19..b7ac6c5de32 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -752,10 +752,12 @@ static int modifier_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *modifier_add_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *modifier_add_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = ED_object_active_context(C);
- EnumPropertyItem *item = NULL, *md_item, *group_item = NULL;
+ EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *md_item, *group_item = NULL;
const ModifierTypeInfo *mti;
int totitem = 0, a;
@@ -1027,7 +1029,7 @@ static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *UNU
return OPERATOR_CANCELLED;
}
-static EnumPropertyItem modifier_apply_as_items[] = {
+static const EnumPropertyItem modifier_apply_as_items[] = {
{MODIFIER_APPLY_DATA, "DATA", 0, "Object Data", "Apply modifier to the object's data"},
{MODIFIER_APPLY_SHAPE, "SHAPE", 0, "New Shape", "Apply deform-only modifier to a new shape on this object"},
{0, NULL, 0, NULL, NULL}
@@ -1585,7 +1587,7 @@ static int skin_loose_mark_clear_exec(bContext *C, wmOperator *op)
void OBJECT_OT_skin_loose_mark_clear(wmOperatorType *ot)
{
- static EnumPropertyItem action_items[] = {
+ static const EnumPropertyItem action_items[] = {
{SKIN_LOOSE_MARK, "MARK", 0, "Mark", "Mark selected vertices as loose"},
{SKIN_LOOSE_CLEAR, "CLEAR", 0, "Clear", "Set selected vertices as not loose"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 34cef2aa588..abc89d0e937 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -389,7 +389,7 @@ static int make_proxy_exec(bContext *C, wmOperator *op)
}
/* Generic itemf's for operators that take library args */
-static EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem item_tmp = {0}, *item = NULL;
@@ -1142,7 +1142,7 @@ enum {
CLEAR_TRACK_KEEP_TRANSFORM = 2,
};
-static EnumPropertyItem prop_clear_track_types[] = {
+static const EnumPropertyItem prop_clear_track_types[] = {
{CLEAR_TRACK, "CLEAR", 0, "Clear Track", ""},
{CLEAR_TRACK_KEEP_TRANSFORM, "CLEAR_KEEP_TRANSFORM", 0, "Clear and Keep Transformation (Clear Track)", ""},
{0, NULL, 0, NULL, NULL}
@@ -1211,7 +1211,7 @@ enum {
CREATE_TRACK_LOCKTRACK = 3,
};
-static EnumPropertyItem prop_make_track_types[] = {
+static const EnumPropertyItem prop_make_track_types[] = {
{CREATE_TRACK_DAMPTRACK, "DAMPTRACK", 0, "Damped Track Constraint", ""},
{CREATE_TRACK_TRACKTO, "TRACKTO", 0, "Track To Constraint", ""},
{CREATE_TRACK_LOCKTRACK, "LOCKTRACK", 0, "Lock Track Constraint", ""},
@@ -1596,7 +1596,7 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
void OBJECT_OT_make_links_data(wmOperatorType *ot)
{
- static EnumPropertyItem make_links_items[] = {
+ static const EnumPropertyItem make_links_items[] = {
{MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""},
{MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""},
{MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""},
@@ -2299,7 +2299,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_local(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{MAKE_LOCAL_SELECT_OB, "SELECT_OBJECT", 0, "Selected Objects", ""},
{MAKE_LOCAL_SELECT_OBDATA, "SELECT_OBDATA", 0, "Selected Objects and Data", ""},
{MAKE_LOCAL_SELECT_OBDATA_MATERIAL, "SELECT_OBDATA_MATERIAL", 0, "Selected Objects, Data and Materials", ""},
@@ -2381,7 +2381,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_single_user(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{MAKE_SINGLE_USER_SELECTED, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
{MAKE_SINGLE_USER_ALL, "ALL", 0, "All", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 280294e714d..d0c37fc108a 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -233,7 +233,7 @@ enum {
OBJECT_SELECT_LINKED_LIBRARY_OBDATA
};
-static EnumPropertyItem prop_select_linked_types[] = {
+static const EnumPropertyItem prop_select_linked_types[] = {
//{OBJECT_SELECT_LINKED_IPO, "IPO", 0, "Object IPO", ""}, // XXX deprecated animation system stuff...
{OBJECT_SELECT_LINKED_OBDATA, "OBDATA", 0, "Object Data", ""},
{OBJECT_SELECT_LINKED_MATERIAL, "MATERIAL", 0, "Material", ""},
@@ -530,7 +530,7 @@ enum {
OBJECT_GRPSEL_LAMP_TYPE = 12,
};
-static EnumPropertyItem prop_select_grouped_types[] = {
+static const EnumPropertyItem prop_select_grouped_types[] = {
{OBJECT_GRPSEL_CHILDREN_RECURSIVE, "CHILDREN_RECURSIVE", 0, "Children", ""},
{OBJECT_GRPSEL_CHILDREN, "CHILDREN", 0, "Immediate Children", ""},
{OBJECT_GRPSEL_PARENT, "PARENT", 0, "Parent", ""},
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index b7c0a2679bc..4fefe03c6ab 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -479,7 +479,7 @@ static int shape_key_move_exec(bContext *C, wmOperator *op)
void OBJECT_OT_shape_key_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{KB_MOVE_TOP, "TOP", 0, "Top", "Top of the list"},
{KB_MOVE_UP, "UP", 0, "Up", ""},
{KB_MOVE_DOWN, "DOWN", 0, "Down", ""},
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 944fbb0bbe1..b9c8edf8614 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1114,7 +1114,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
void OBJECT_OT_origin_set(wmOperatorType *ot)
{
- static EnumPropertyItem prop_set_center_types[] = {
+ static const EnumPropertyItem prop_set_center_types[] = {
{GEOMETRY_TO_ORIGIN, "GEOMETRY_ORIGIN", 0, "Geometry to Origin", "Move object geometry to object origin"},
{ORIGIN_TO_GEOMETRY, "ORIGIN_GEOMETRY", 0, "Origin to Geometry",
"Calculate the center of geometry based on the current pivot point (median, otherwise bounding-box)"},
@@ -1128,7 +1128,7 @@ void OBJECT_OT_origin_set(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_set_bounds_types[] = {
+ static const EnumPropertyItem prop_set_bounds_types[] = {
{V3D_AROUND_CENTER_MEAN, "MEDIAN", 0, "Median Center", ""},
{V3D_AROUND_CENTER_BOUNDS, "BOUNDS", 0, "Bounds Center", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 386c63d4095..9d01ad6886c 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -668,7 +668,7 @@ static void vgroup_copy_active_to_sel(Object *ob, eVGroupSelect subset_type)
/***********************Start weight transfer (WT)*********************************/
-static EnumPropertyItem WT_vertex_group_select_item[] = {
+static const EnumPropertyItem WT_vertex_group_select_item[] = {
{WT_VGROUP_ACTIVE,
"ACTIVE", 0, "Active Group", "The active Vertex Group"},
{WT_VGROUP_BONE_SELECT,
@@ -680,7 +680,7 @@ static EnumPropertyItem WT_vertex_group_select_item[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
+const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
const bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free, const unsigned int selection_mask)
{
@@ -688,9 +688,10 @@ EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
EnumPropertyItem *item = NULL;
int totitem = 0;
-
- if (!C) /* needed for docs and i18n tools */
+ if (C == NULL) {
+ /* needed for docs and i18n tools */
return WT_vertex_group_select_item;
+ }
ob = CTX_data_active_object(C);
if (selection_mask & (1 << WT_VGROUP_ACTIVE))
@@ -712,13 +713,13 @@ EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
return item;
}
-static EnumPropertyItem *rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr,
+static const EnumPropertyItem *rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *prop, bool *r_free)
{
return ED_object_vgroup_selection_itemf_helper(C, ptr, prop, r_free, WT_VGROUP_MASK_ALL);
}
-static EnumPropertyItem *rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr,
+static const EnumPropertyItem *rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *prop, bool *r_free)
{
return ED_object_vgroup_selection_itemf_helper(C, ptr, prop, r_free, WT_VGROUP_MASK_ALL & ~(1 << WT_VGROUP_ACTIVE));
@@ -1628,7 +1629,7 @@ enum {
VGROUP_INVERT
};
-static EnumPropertyItem vgroup_lock_actions[] = {
+static const EnumPropertyItem vgroup_lock_actions[] = {
{VGROUP_TOGGLE, "TOGGLE", 0, "Toggle", "Unlock all vertex groups if there is at least one locked group, lock all in other case"},
{VGROUP_LOCK, "LOCK", 0, "Lock", "Lock all vertex groups"},
{VGROUP_UNLOCK, "UNLOCK", 0, "Unlock", "Unlock all vertex groups"},
@@ -3421,7 +3422,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = ED_object_context(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
@@ -3640,7 +3641,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_sort(wmOperatorType *ot)
{
- static EnumPropertyItem vgroup_sort_type[] = {
+ static const EnumPropertyItem vgroup_sort_type[] = {
{SORT_TYPE_NAME, "NAME", 0, "Name", ""},
{SORT_TYPE_BONEHIERARCHY, "BONE_HIERARCHY", 0, "Bone Hierarchy", ""},
{0, NULL, 0, NULL, NULL}
@@ -3691,7 +3692,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_move(wmOperatorType *ot)
{
- static EnumPropertyItem vgroup_slot_move[] = {
+ static const EnumPropertyItem vgroup_slot_move[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c
index 1f0ee6862d2..93f010778f1 100644
--- a/source/blender/editors/physics/dynamicpaint_ops.c
+++ b/source/blender/editors/physics/dynamicpaint_ops.c
@@ -255,7 +255,7 @@ static int output_toggle_exec(bContext *C, wmOperator *op)
void DPAINT_OT_output_toggle(wmOperatorType *ot)
{
- static EnumPropertyItem prop_output_toggle_types[] = {
+ static const EnumPropertyItem prop_output_toggle_types[] = {
{0, "A", 0, "Output A", ""},
{1, "B", 0, "Output B", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 17efc31b2e8..67ba1a1312a 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1630,7 +1630,7 @@ void PARTICLE_OT_select_tips(wmOperatorType *ot)
enum { RAN_HAIR, RAN_POINTS };
-static EnumPropertyItem select_random_type_items[] = {
+static const EnumPropertyItem select_random_type_items[] = {
{RAN_HAIR, "HAIR", 0, "Hair", ""},
{RAN_POINTS, "POINTS", 0, "Points", ""},
{0, NULL, 0, NULL, NULL}
@@ -2771,7 +2771,7 @@ static void toggle_particle_cursor(bContext *C, int enable)
enum { DEL_PARTICLE, DEL_KEY };
-static EnumPropertyItem delete_type_items[] = {
+static const EnumPropertyItem delete_type_items[] = {
{DEL_PARTICLE, "PARTICLE", 0, "Particle", ""},
{DEL_KEY, "KEY", 0, "Key", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 571a8ab18f0..1e643ea7277 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -1211,7 +1211,7 @@ static int copy_particle_systems_exec(bContext *C, wmOperator *op)
void PARTICLE_OT_copy_particle_systems(wmOperatorType *ot)
{
- static EnumPropertyItem space_items[] = {
+ static const EnumPropertyItem space_items[] = {
{PAR_COPY_SPACE_OBJECT, "OBJECT", 0, "Object", "Copy inside each object's local space"},
{PAR_COPY_SPACE_WORLD, "WORLD", 0, "World", "Copy in world space"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index cf9dc8ff2a3..3b667520550 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -457,7 +457,7 @@ static const int NUM_RB_MATERIAL_PRESETS = sizeof(RB_MATERIAL_DENSITY_TABLE) / s
* - Although there is a runtime cost, this has a lower maintenance cost
* in the long run than other two-list solutions...
*/
-static EnumPropertyItem *rigidbody_materials_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *rigidbody_materials_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem item_tmp = {0};
EnumPropertyItem *item = NULL;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 8a51d42c598..037e8adff9a 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -1694,7 +1694,7 @@ static int render_shutter_curve_preset_exec(bContext *C, wmOperator *op)
void RENDER_OT_shutter_curve_preset(wmOperatorType *ot)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_shape_items[] = {
+ static const EnumPropertyItem prop_shape_items[] = {
{CURVE_PRESET_SHARP, "SHARP", 0, "Sharp", ""},
{CURVE_PRESET_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{CURVE_PRESET_MAX, "MAX", 0, "Max", ""},
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 58dd67f4923..ef436c44b74 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -434,7 +434,7 @@ static int material_slot_move_exec(bContext *C, wmOperator *op)
void OBJECT_OT_material_slot_move(wmOperatorType *ot)
{
- static EnumPropertyItem material_slot_move[] = {
+ static const EnumPropertyItem material_slot_move[] = {
{1, "UP", 0, "Up", ""},
{-1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -843,7 +843,7 @@ static int freestyle_module_move_exec(bContext *C, wmOperator *op)
void SCENE_OT_freestyle_module_move(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -1003,7 +1003,7 @@ static int freestyle_lineset_move_exec(bContext *C, wmOperator *op)
void SCENE_OT_freestyle_lineset_move(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -1380,7 +1380,7 @@ static int freestyle_modifier_move_exec(bContext *C, wmOperator *op)
void SCENE_OT_freestyle_modifier_move(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -1501,7 +1501,7 @@ static int texture_slot_move_exec(bContext *C, wmOperator *op)
void TEXTURE_OT_slot_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index ac0c411aafc..aeafa806689 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1786,7 +1786,7 @@ static int area_split_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static EnumPropertyItem prop_direction_items[] = {
+static const EnumPropertyItem prop_direction_items[] = {
{'h', "HORIZONTAL", 0, "Horizontal", ""},
{'v', "VERTICAL", 0, "Vertical", ""},
{0, NULL, 0, NULL, NULL}
@@ -4081,7 +4081,7 @@ enum {
SPACE_CONTEXT_CYCLE_NEXT,
};
-static EnumPropertyItem space_context_cycle_direction[] = {
+static const EnumPropertyItem space_context_cycle_direction[] = {
{SPACE_CONTEXT_CYCLE_PREV, "PREV", 0, "Previous", ""},
{SPACE_CONTEXT_CYCLE_NEXT, "NEXT", 0, "Next", ""},
{0, NULL, 0, NULL, NULL}
@@ -4220,7 +4220,7 @@ void ED_operatortypes_screen(void)
static void keymap_modal_set(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{KM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{KM_MODAL_APPLY, "APPLY", 0, "Apply", ""},
{KM_MODAL_STEP10, "STEP10", 0, "Steps on", ""},
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c
index 0edaa176f8c..8377b22756e 100644
--- a/source/blender/editors/sculpt_paint/paint_hide.c
+++ b/source/blender/editors/sculpt_paint/paint_hide.c
@@ -443,13 +443,13 @@ static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_hide_show(struct wmOperatorType *ot)
{
- static EnumPropertyItem action_items[] = {
+ static const EnumPropertyItem action_items[] = {
{PARTIALVIS_HIDE, "HIDE", 0, "Hide", "Hide vertices"},
{PARTIALVIS_SHOW, "SHOW", 0, "Show", "Show vertices"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem area_items[] = {
+ static const EnumPropertyItem area_items[] = {
{PARTIALVIS_OUTSIDE, "OUTSIDE", 0, "Outside", "Hide or show vertices outside the selection"},
{PARTIALVIS_INSIDE, "INSIDE", 0, "Inside", "Hide or show vertices inside the selection"},
{PARTIALVIS_ALL, "ALL", 0, "All", "Hide or show all vertices"},
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index a8271287e10..da2fcd6459d 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5645,7 +5645,7 @@ bool BKE_paint_proj_mesh_data_check(Scene *scene, Object *ob, bool *uvs, bool *m
/* Add layer operator */
-static EnumPropertyItem layer_type_items[] = {
+static const EnumPropertyItem layer_type_items[] = {
{MAP_COL, "DIFFUSE_COLOR", 0, "Diffuse Color", ""},
{MAP_REF, "DIFFUSE_INTENSITY", 0, "Diffuse Intensity", ""},
{MAP_ALPHA, "ALPHA", 0, "Alpha", ""},
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index 28b19069bfd..0fec4c4fc80 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -69,7 +69,7 @@
#include <stdlib.h>
-static EnumPropertyItem mode_items[] = {
+static const EnumPropertyItem mode_items[] = {
{PAINT_MASK_FLOOD_VALUE, "VALUE", 0, "Value", "Set mask to the level specified by the 'value' property"},
{PAINT_MASK_FLOOD_VALUE_INVERSE, "VALUE_INVERSE", 0, "Value Inverted", "Set mask to the level specified by the inverted 'value' property"},
{PAINT_MASK_INVERT, "INVERT", 0, "Invert", "Invert the mask"},
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index d3dcf283052..40210d63566 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -455,7 +455,7 @@ static int brush_select_exec(bContext *C, wmOperator *op)
static void PAINT_OT_brush_select(wmOperatorType *ot)
{
- static EnumPropertyItem paint_mode_items[] = {
+ static const EnumPropertyItem paint_mode_items[] = {
{OB_MODE_ACTIVE, "ACTIVE", 0, "Current", "Set brush for active paint mode"},
{OB_MODE_SCULPT, "SCULPT", ICON_SCULPTMODE_HLT, "Sculpt", ""},
{OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""},
@@ -793,14 +793,14 @@ static int stencil_control_poll(bContext *C)
static void BRUSH_OT_stencil_control(wmOperatorType *ot)
{
- static EnumPropertyItem stencil_control_items[] = {
+ static const EnumPropertyItem stencil_control_items[] = {
{STENCIL_TRANSLATE, "TRANSLATION", 0, "Translation", ""},
{STENCIL_SCALE, "SCALE", 0, "Scale", ""},
{STENCIL_ROTATE, "ROTATION", 0, "Rotation", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem stencil_texture_items[] = {
+ static const EnumPropertyItem stencil_texture_items[] = {
{STENCIL_PRIMARY, "PRIMARY", 0, "Primary", ""},
{STENCIL_SECONDARY, "SECONDARY", 0, "Secondary", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index b5a17055c1d..bf00ce865e9 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -207,7 +207,7 @@ void paint_get_tex_pixel_col(const MTex *mtex, float u, float v, float rgba[4],
void paint_stroke_operator_properties(wmOperatorType *ot)
{
- static EnumPropertyItem stroke_mode_items[] = {
+ static const EnumPropertyItem stroke_mode_items[] = {
{BRUSH_STROKE_NORMAL, "NORMAL", 0, "Normal", "Apply brush normally"},
{BRUSH_STROKE_INVERT, "INVERT", 0, "Invert", "Invert action of brush for duration of stroke"},
{BRUSH_STROKE_SMOOTH, "SMOOTH", 0, "Smooth", "Switch brush to smooth mode for duration of stroke"},
@@ -585,7 +585,7 @@ static int brush_curve_preset_poll(bContext *C)
void BRUSH_OT_curve_preset(wmOperatorType *ot)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_shape_items[] = {
+ static const EnumPropertyItem prop_shape_items[] = {
{CURVE_PRESET_SHARP, "SHARP", 0, "Sharp", ""},
{CURVE_PRESET_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{CURVE_PRESET_MAX, "MAX", 0, "Max", ""},
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 81b30f60cbf..1348847167c 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -145,7 +145,7 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op)
void PAINT_OT_weight_from_bones(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{ARM_GROUPS_AUTO, "AUTOMATIC", 0, "Automatic", "Automatic weights from bones"},
{ARM_GROUPS_ENVELOPE, "ENVELOPES", 0, "From Envelopes", "Weights from envelopes with user defined radius"},
{0, NULL, 0, NULL, NULL}};
@@ -288,7 +288,7 @@ static bool weight_paint_sample_enum_itemf__helper(const MDeformVert *dvert, con
}
return found;
}
-static EnumPropertyItem *weight_paint_sample_enum_itemf(
+static const EnumPropertyItem *weight_paint_sample_enum_itemf(
bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
if (C) {
@@ -837,7 +837,7 @@ static int paint_weight_gradient_invoke(bContext *C, wmOperator *op, const wmEve
void PAINT_OT_weight_gradient(wmOperatorType *ot)
{
/* defined in DNA_space_types.h */
- static EnumPropertyItem gradient_types[] = {
+ static const EnumPropertyItem gradient_types[] = {
{WPAINT_GRADIENT_TYPE_LINEAR, "LINEAR", 0, "Linear", ""},
{WPAINT_GRADIENT_TYPE_RADIAL, "RADIAL", 0, "Radial", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 14e82e94d30..c9453f94e61 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -905,7 +905,7 @@ static int uv_sculpt_stroke_modal(bContext *C, wmOperator *op, const wmEvent *ev
void SCULPT_OT_uv_sculpt_stroke(wmOperatorType *ot)
{
- static EnumPropertyItem stroke_mode_items[] = {
+ static const EnumPropertyItem stroke_mode_items[] = {
{BRUSH_STROKE_NORMAL, "NORMAL", 0, "Normal", "Apply brush normally"},
{BRUSH_STROKE_INVERT, "INVERT", 0, "Invert", "Invert action of brush for duration of stroke"},
{BRUSH_STROKE_SMOOTH, "RELAX", 0, "Relax", "Switch brush to relax mode for duration of stroke"},
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index ecc00f4b7e5..3a753748d0f 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -397,7 +397,7 @@ static int sound_mixdown_exec(bContext *C, wmOperator *op)
}
#ifdef WITH_AUDASPACE
-static EnumPropertyItem container_items[] = {
+static const EnumPropertyItem container_items[] = {
#ifdef WITH_FFMPEG
{AUD_CONTAINER_AC3, "AC3", 0, "ac3", "Dolby Digital ATRAC 3"},
#endif
@@ -429,7 +429,7 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op)
const char *extension = NULL;
- EnumPropertyItem *item = container_items;
+ const EnumPropertyItem *item = container_items;
while (item->identifier != NULL) {
if (item->value == container) {
const char **ext = snd_ext_sound;
@@ -491,7 +491,7 @@ static bool sound_mixdown_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *
static void sound_mixdown_draw(bContext *C, wmOperator *op)
{
- static EnumPropertyItem pcm_format_items[] = {
+ static const EnumPropertyItem pcm_format_items[] = {
{AUD_FORMAT_U8, "U8", 0, "U8", "8 bit unsigned"},
{AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
#ifdef WITH_SNDFILE
@@ -503,21 +503,21 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem mp3_format_items[] = {
+ static const EnumPropertyItem mp3_format_items[] = {
{AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
{AUD_FORMAT_S32, "S32", 0, "S32", "32 bit signed"},
{0, NULL, 0, NULL, NULL}
};
#ifdef WITH_SNDFILE
- static EnumPropertyItem flac_format_items[] = {
+ static const EnumPropertyItem flac_format_items[] = {
{AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
{AUD_FORMAT_S24, "S24", 0, "S24", "24 bit signed"},
{0, NULL, 0, NULL, NULL}
};
#endif
- static EnumPropertyItem all_codec_items[] = {
+ static const EnumPropertyItem all_codec_items[] = {
{AUD_CODEC_AAC, "AAC", 0, "AAC", "Advanced Audio Coding"},
{AUD_CODEC_AC3, "AC3", 0, "AC3", "Dolby Digital ATRAC 3"},
{AUD_CODEC_FLAC, "FLAC", 0, "FLAC", "Free Lossless Audio Codec"},
@@ -528,7 +528,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ogg_codec_items[] = {
+ static const EnumPropertyItem ogg_codec_items[] = {
{AUD_CODEC_FLAC, "FLAC", 0, "FLAC", "Free Lossless Audio Codec"},
{AUD_CODEC_VORBIS, "VORBIS", 0, "Vorbis", "Xiph.Org Vorbis Codec"},
{0, NULL, 0, NULL, NULL}
@@ -641,7 +641,7 @@ static void sound_mixdown_draw(bContext *C, wmOperator *op)
static void SOUND_OT_mixdown(wmOperatorType *ot)
{
#ifdef WITH_AUDASPACE
- static EnumPropertyItem format_items[] = {
+ static const EnumPropertyItem format_items[] = {
{AUD_FORMAT_U8, "U8", 0, "U8", "8 bit unsigned"},
{AUD_FORMAT_S16, "S16", 0, "S16", "16 bit signed"},
{AUD_FORMAT_S24, "S24", 0, "S24", "24 bit signed"},
@@ -651,7 +651,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem codec_items[] = {
+ static const EnumPropertyItem codec_items[] = {
#ifdef WITH_FFMPEG
{AUD_CODEC_AAC, "AAC", 0, "AAC", "Advanced Audio Coding"},
{AUD_CODEC_AC3, "AC3", 0, "AC3", "Dolby Digital ATRAC 3"},
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 2df5aa29e9a..72b1245ca8a 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -660,7 +660,7 @@ void ACTION_OT_paste(wmOperatorType *ot)
/* ******************** Insert Keyframes Operator ************************* */
/* defines for insert keyframes tool */
-static EnumPropertyItem prop_actkeys_insertkey_types[] = {
+static const EnumPropertyItem prop_actkeys_insertkey_types[] = {
{1, "ALL", 0, "All Channels", ""},
{2, "SEL", 0, "Only Selected Channels", ""},
{3, "GROUP", 0, "In Active Group", ""}, /* XXX not in all cases */
@@ -1110,7 +1110,7 @@ void ACTION_OT_sample(wmOperatorType *ot)
#define CLEAR_CYCLIC_EXPO -2
/* defines for set extrapolation-type for selected keyframes tool */
-static EnumPropertyItem prop_actkeys_expo_types[] = {
+static const EnumPropertyItem prop_actkeys_expo_types[] = {
{FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", "Values on endpoint keyframes are held"},
{FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", "Straight-line slope of end segments are extended past the endpoint keyframes"},
@@ -1550,7 +1550,7 @@ void ACTION_OT_frame_jump(wmOperatorType *ot)
/* ******************** Snap Keyframes Operator *********************** */
/* defines for snap keyframes tool */
-static EnumPropertyItem prop_actkeys_snap_types[] = {
+static const EnumPropertyItem prop_actkeys_snap_types[] = {
{ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame",
"Snap selected keyframes to the current frame"},
{ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame",
@@ -1659,7 +1659,7 @@ void ACTION_OT_snap(wmOperatorType *ot)
/* ******************** Mirror Keyframes Operator *********************** */
/* defines for mirror keyframes tool */
-static EnumPropertyItem prop_actkeys_mirror_types[] = {
+static const EnumPropertyItem prop_actkeys_mirror_types[] = {
{ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame",
"Flip times of selected keyframes using the current frame as the mirror line"},
{ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0",
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 0cfd86f86f1..1c55a0d76cf 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -642,7 +642,7 @@ void ACTION_OT_select_circle(wmOperatorType *ot)
*/
/* defines for column-select mode */
-static EnumPropertyItem prop_column_select_types[] = {
+static const EnumPropertyItem prop_column_select_types[] = {
{ACTKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""},
{ACTKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""},
{ACTKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""},
@@ -1010,7 +1010,7 @@ void ACTION_OT_select_less(wmOperatorType *ot)
/* Select keyframes left/right of the current frame indicator */
/* defines for left-right select tool */
-static EnumPropertyItem prop_actkeys_leftright_select_types[] = {
+static const EnumPropertyItem prop_actkeys_leftright_select_types[] = {
{ACTKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""},
{ACTKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
{ACTKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index e42b8ab560d..e5a3cb6b57b 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -701,7 +701,7 @@ static int graph_disable_markers_exec(bContext *C, wmOperator *op)
void CLIP_OT_graph_disable_markers(wmOperatorType *ot)
{
- static EnumPropertyItem actions_items[] = {
+ static const EnumPropertyItem actions_items[] = {
{0, "DISABLE", 0, "Disable", "Disable selected markers"},
{1, "ENABLE", 0, "Enable", "Enable selected markers"},
{2, "TOGGLE", 0, "Toggle", "Toggle disabled flag for selected markers"},
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index ea7ede46887..2439ac06d9c 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1138,7 +1138,7 @@ static int clear_track_path_exec(bContext *C, wmOperator *op)
void CLIP_OT_clear_track_path(wmOperatorType *ot)
{
- static EnumPropertyItem clear_path_actions[] = {
+ static const EnumPropertyItem clear_path_actions[] = {
{TRACK_CLEAR_UPTO, "UPTO", 0, "Clear up-to", "Clear path up to current frame"},
{TRACK_CLEAR_REMAINED, "REMAINED", 0, "Clear remained", "Clear path at remaining frames (after current)"},
{TRACK_CLEAR_ALL, "ALL", 0, "Clear all", "Clear the whole path"},
@@ -1210,7 +1210,7 @@ static int disable_markers_exec(bContext *C, wmOperator *op)
void CLIP_OT_disable_markers(wmOperatorType *ot)
{
- static EnumPropertyItem actions_items[] = {
+ static const EnumPropertyItem actions_items[] = {
{MARKER_OP_DISABLE, "DISABLE", 0, "Disable",
"Disable selected markers"},
{MARKER_OP_ENABLE, "ENABLE", 0, "Enable",
@@ -1477,7 +1477,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
void CLIP_OT_frame_jump(wmOperatorType *ot)
{
- static EnumPropertyItem position_items[] = {
+ static const EnumPropertyItem position_items[] = {
{0, "PATHSTART", 0, "Path Start", "Jump to start of current path"},
{1, "PATHEND", 0, "Path End", "Jump to end of current path"},
{2, "FAILEDPREV", 0, "Previous Failed", "Jump to previous failed frame"},
@@ -1645,7 +1645,7 @@ static int lock_tracks_exec(bContext *C, wmOperator *op)
void CLIP_OT_lock_tracks(wmOperatorType *ot)
{
- static EnumPropertyItem actions_items[] = {
+ static const EnumPropertyItem actions_items[] = {
{TRACK_ACTION_LOCK, "LOCK", 0, "Lock", "Lock selected tracks"},
{TRACK_ACTION_UNLOCK, "UNLOCK", 0, "Unlock", "Unlock selected tracks"},
{TRACK_ACTION_TOGGLE, "TOGGLE", 0, "Toggle",
@@ -1701,7 +1701,7 @@ static int set_solver_keyframe_exec(bContext *C, wmOperator *op)
void CLIP_OT_set_solver_keyframe(wmOperatorType *ot)
{
- static EnumPropertyItem keyframe_items[] = {
+ static const EnumPropertyItem keyframe_items[] = {
{SOLVER_KEYFRAME_A, "KEYFRAME_A", 0, "Keyframe A", ""},
{SOLVER_KEYFRAME_B, "KEYFRAME_B", 0, "Keyframe B", ""},
{0, NULL, 0, NULL, NULL}
@@ -1972,7 +1972,7 @@ static int clean_tracks_invoke(bContext *C,
void CLIP_OT_clean_tracks(wmOperatorType *ot)
{
- static EnumPropertyItem actions_items[] = {
+ static const EnumPropertyItem actions_items[] = {
{TRACKING_CLEAN_SELECT, "SELECT", 0, "Select",
"Select unclean tracks"},
{TRACKING_CLEAN_DELETE_TRACK, "DELETE_TRACK", 0, "Delete Track",
diff --git a/source/blender/editors/space_clip/tracking_ops_detect.c b/source/blender/editors/space_clip/tracking_ops_detect.c
index 992c347a630..0ee06b305da 100644
--- a/source/blender/editors/space_clip/tracking_ops_detect.c
+++ b/source/blender/editors/space_clip/tracking_ops_detect.c
@@ -128,7 +128,7 @@ static int detect_features_exec(bContext *C, wmOperator *op)
void CLIP_OT_detect_features(wmOperatorType *ot)
{
- static EnumPropertyItem placement_items[] = {
+ static const EnumPropertyItem placement_items[] = {
{0, "FRAME", 0, "Whole Frame",
"Place markers across the whole frame"},
{1, "INSIDE_GPENCIL", 0, "Inside grease pencil",
diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c
index c411f64a88b..1abfa0ae2a4 100644
--- a/source/blender/editors/space_clip/tracking_ops_orient.c
+++ b/source/blender/editors/space_clip/tracking_ops_orient.c
@@ -509,7 +509,7 @@ static int set_plane_exec(bContext *C, wmOperator *op)
void CLIP_OT_set_plane(wmOperatorType *ot)
{
- static EnumPropertyItem plane_items[] = {
+ static const EnumPropertyItem plane_items[] = {
{0, "FLOOR", 0, "Floor", "Set floor plane"},
{1, "WALL", 0, "Wall", "Set wall plane"},
{0, NULL, 0, NULL, NULL}
@@ -583,7 +583,7 @@ static int set_axis_exec(bContext *C, wmOperator *op)
void CLIP_OT_set_axis(wmOperatorType *ot)
{
- static EnumPropertyItem axis_actions[] = {
+ static const EnumPropertyItem axis_actions[] = {
{0, "X", 0, "X", "Align bundle align X axis"},
{1, "Y", 0, "Y", "Align bundle align Y axis"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index 028b9c8a820..eddd65475a2 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -972,7 +972,7 @@ static int select_groped_exec(bContext *C, wmOperator *op)
void CLIP_OT_select_grouped(wmOperatorType *ot)
{
- static EnumPropertyItem select_group_items[] = {
+ static const EnumPropertyItem select_group_items[] = {
{0, "KEYFRAMED", 0, "Keyframed tracks", "Select all keyframed tracks"},
{1, "ESTIMATED", 0, "Estimated tracks", "Select all estimated tracks"},
{2, "TRACKED", 0, "Tracked tracks", "Select all tracked tracks"},
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 2b99c4dfa3d..b740ff4b397 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -299,7 +299,7 @@ static bool console_line_column_from_index(
/* static funcs for text editing */
/* similar to the text editor, with some not used. keep compatible */
-static EnumPropertyItem console_move_type_items[] = {
+static const EnumPropertyItem console_move_type_items[] = {
{LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
{LINE_END, "LINE_END", 0, "Line End", ""},
{PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
@@ -570,7 +570,7 @@ void CONSOLE_OT_unindent(wmOperatorType *ot)
ot->poll = ED_operator_console_active;
}
-static EnumPropertyItem console_delete_type_items[] = {
+static const EnumPropertyItem console_delete_type_items[] = {
{DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
{DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
{DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
@@ -895,7 +895,7 @@ static int console_scrollback_append_exec(bContext *C, wmOperator *op)
void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
{
/* defined in DNA_space_types.h */
- static EnumPropertyItem console_line_type_items[] = {
+ static const EnumPropertyItem console_line_type_items[] = {
{CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""},
{CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""},
{CONSOLE_LINE_INFO, "INFO", 0, "Information", ""},
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 5ea727cf17f..cca33cdd1a7 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -730,7 +730,7 @@ static int file_walk_select_invoke(bContext *C, wmOperator *op, const wmEvent *U
void FILE_OT_select_walk(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{FILE_SELECT_WALK_UP, "UP", 0, "Prev", ""},
{FILE_SELECT_WALK_DOWN, "DOWN", 0, "Next", ""},
{FILE_SELECT_WALK_LEFT, "LEFT", 0, "Left", ""},
@@ -1041,7 +1041,7 @@ static int bookmark_move_exec(bContext *C, wmOperator *op)
void FILE_OT_bookmark_move(wmOperatorType *ot)
{
- static EnumPropertyItem slot_move[] = {
+ static const EnumPropertyItem slot_move[] = {
{FILE_BOOKMARK_MOVE_TOP, "TOP", 0, "Top", "Top of the list"},
{FILE_BOOKMARK_MOVE_UP, "UP", 0, "Up", ""},
{FILE_BOOKMARK_MOVE_DOWN, "DOWN", 0, "Down", ""},
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index d0ab12b16a3..2876fccaa51 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -503,7 +503,7 @@ typedef enum eGraphKeys_InsertKey_Types {
} eGraphKeys_InsertKey_Types;
/* RNA mode types for insert keyframes tool */
-static EnumPropertyItem prop_graphkeys_insertkey_types[] = {
+static const EnumPropertyItem prop_graphkeys_insertkey_types[] = {
{GRAPHKEYS_INSERTKEY_ALL, "ALL", 0, "All Channels",
"Insert a keyframe on all visible and editable F-Curves using each curve's current value"},
{GRAPHKEYS_INSERTKEY_SEL, "SEL", 0, "Only Selected Channels",
@@ -1467,7 +1467,7 @@ void GRAPH_OT_sample(wmOperatorType *ot)
#define CLEAR_CYCLIC_EXPO -2
/* defines for set extrapolation-type for selected keyframes tool */
-static EnumPropertyItem prop_graphkeys_expo_types[] = {
+static const EnumPropertyItem prop_graphkeys_expo_types[] = {
{FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", "Values on endpoint keyframes are held"},
{FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", "Straight-line slope of end segments are extended past the endpoint keyframes"},
@@ -2067,7 +2067,7 @@ void GRAPH_OT_frame_jump(wmOperatorType *ot)
/* ******************** Snap Keyframes Operator *********************** */
/* defines for snap keyframes tool */
-static EnumPropertyItem prop_graphkeys_snap_types[] = {
+static const EnumPropertyItem prop_graphkeys_snap_types[] = {
{GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame",
"Snap selected keyframes to the current frame"},
{GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value",
@@ -2196,7 +2196,7 @@ void GRAPH_OT_snap(wmOperatorType *ot)
/* ******************** Mirror Keyframes Operator *********************** */
/* defines for mirror keyframes tool */
-static EnumPropertyItem prop_graphkeys_mirror_types[] = {
+static const EnumPropertyItem prop_graphkeys_mirror_types[] = {
{GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame",
"Flip times of selected keyframes using the current frame as the mirror line"},
{GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value",
@@ -2387,7 +2387,7 @@ void GRAPH_OT_smooth(wmOperatorType *ot)
/* ******************** Add F-Modifier Operator *********************** */
-static EnumPropertyItem *graph_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *graph_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
int totitem = 0;
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 783f691f41a..68982275c79 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -569,7 +569,7 @@ void GRAPH_OT_select_circle(wmOperatorType *ot)
*/
/* defines for column-select mode */
-static EnumPropertyItem prop_column_select_types[] = {
+static const EnumPropertyItem prop_column_select_types[] = {
{GRAPHKEYS_COLUMNSEL_KEYS, "KEYS", 0, "On Selected Keyframes", ""},
{GRAPHKEYS_COLUMNSEL_CFRA, "CFRA", 0, "On Current Frame", ""},
{GRAPHKEYS_COLUMNSEL_MARKERS_COLUMN, "MARKERS_COLUMN", 0, "On Selected Markers", ""},
@@ -914,7 +914,7 @@ void GRAPH_OT_select_less(wmOperatorType *ot)
/* Select keyframes left/right of the current frame indicator */
/* defines for left-right select tool */
-static EnumPropertyItem prop_graphkeys_leftright_select_types[] = {
+static const EnumPropertyItem prop_graphkeys_leftright_select_types[] = {
{GRAPHKEYS_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""},
{GRAPHKEYS_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
{GRAPHKEYS_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 455089f2caf..4fab7b33dbe 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -2556,7 +2556,7 @@ void IMAGE_OT_new(wmOperatorType *ot)
PropertyRNA *prop;
static float default_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
- static EnumPropertyItem gen_context_items[] = {
+ static const EnumPropertyItem gen_context_items[] = {
{GEN_CONTEXT_NONE, "NONE", 0, "None", ""},
{GEN_CONTEXT_PAINT_CANVAS, "PAINT_CANVAS", 0, "Paint Canvas", ""},
{GEN_CONTEXT_PAINT_STENCIL, "PAINT_STENCIL", 0, "Paint Stencil", ""},
@@ -3263,7 +3263,7 @@ void IMAGE_OT_sample_line(wmOperatorType *ot)
void IMAGE_OT_curves_point_set(wmOperatorType *ot)
{
- static EnumPropertyItem point_items[] = {
+ static const EnumPropertyItem point_items[] = {
{0, "BLACK_POINT", 0, "Black Point", ""},
{1, "WHITE_POINT", 0, "White Point", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index 1559515221e..35a29f4bad8 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -562,7 +562,7 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot)
}
/* ************* Move Logic Bricks Operator ************* */
-static EnumPropertyItem logicbricks_move_direction[] = {
+static const EnumPropertyItem logicbricks_move_direction[] = {
{1, "UP", 0, "Move Up", ""},
{2, "DOWN", 0, "Move Down", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index a6f76e1d556..31524f8450a 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -2089,7 +2089,7 @@ void NLA_OT_clear_scale(wmOperatorType *ot)
/* Moves the start-point of the selected strips to the specified places */
/* defines for snap keyframes tool */
-static EnumPropertyItem prop_nlaedit_snap_types[] = {
+static const EnumPropertyItem prop_nlaedit_snap_types[] = {
{NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current Frame", ""},
{NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
{NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry?
@@ -2239,7 +2239,7 @@ void NLA_OT_snap(wmOperatorType *ot)
/* ******************** Add F-Modifier Operator *********************** */
-static EnumPropertyItem *nla_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *nla_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
int totitem = 0;
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index 32eca3140fc..1179401f346 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -352,7 +352,7 @@ void NLA_OT_select_border(wmOperatorType *ot)
/* Select keyframes left/right of the current frame indicator */
/* defines for left-right select tool */
-static EnumPropertyItem prop_nlaedit_leftright_select_types[] = {
+static const EnumPropertyItem prop_nlaedit_leftright_select_types[] = {
{NLAEDIT_LRSEL_TEST, "CHECK", 0, "Check if Select Left or Right", ""},
{NLAEDIT_LRSEL_LEFT, "LEFT", 0, "Before current frame", ""},
{NLAEDIT_LRSEL_RIGHT, "RIGHT", 0, "After current frame", ""},
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 1c11ee1f98c..ec35727d176 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -517,7 +517,7 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *new_node_tree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *new_node_tree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_node_tree_type_itemf(NULL, NULL, r_free);
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 2f269470b82..a9bc58661a0 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1910,7 +1910,7 @@ static int node_output_file_move_active_socket_exec(bContext *C, wmOperator *op)
void NODE_OT_output_file_move_active_socket(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{1, "UP", 0, "Up", ""},
{2, "DOWN", 0, "Down", ""},
{ 0, NULL, 0, NULL, NULL }
@@ -2278,7 +2278,7 @@ void NODE_OT_tree_socket_remove(wmOperatorType *ot)
/********************** Move interface socket operator *********************/
-static EnumPropertyItem move_direction_items[] = {
+static const EnumPropertyItem move_direction_items[] = {
{ 1, "UP", 0, "Up", "" },
{ 2, "DOWN", 0, "Down", "" },
{ 0, NULL, 0, NULL, NULL },
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c
index 9d750bfe348..7eaf35c6c4f 100644
--- a/source/blender/editors/space_node/node_group.c
+++ b/source/blender/editors/space_node/node_group.c
@@ -515,7 +515,7 @@ typedef enum eNodeGroupSeparateType {
} eNodeGroupSeparateType;
/* Operator Property */
-static EnumPropertyItem node_group_separate_types[] = {
+static const EnumPropertyItem node_group_separate_types[] = {
{NODE_GS_COPY, "COPY", 0, "Copy", "Copy to parent node tree, keep group intact"},
{NODE_GS_MOVE, "MOVE", 0, "Move", "Move to parent node tree, remove from group"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 0cff5f12dca..dc7863bb354 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -333,7 +333,7 @@ static int node_select_grouped_exec(bContext *C, wmOperator *op)
void NODE_OT_select_grouped(wmOperatorType *ot)
{
- static EnumPropertyItem prop_select_grouped_types[] = {
+ static const EnumPropertyItem prop_select_grouped_types[] = {
{NODE_SELECT_GROUPED_TYPE, "TYPE", 0, "Type", ""},
{NODE_SELECT_GROUPED_COLOR, "COLOR", 0, "Color", ""},
{NODE_SELECT_GROUPED_PREFIX, "PREFIX", 0, "Prefix", ""},
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 092909cbcba..45d632dc293 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -160,7 +160,8 @@ static void collection_scene_collection_itemf_recursive(
}
}
-static EnumPropertyItem *collection_scene_collection_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *collection_scene_collection_itemf(
+ bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem tmp = {0, "", 0, "", ""};
EnumPropertyItem *item = NULL;
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 98388ecb3ec..24f147a68bf 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -542,7 +542,7 @@ static int outliner_id_remap_invoke(bContext *C, wmOperator *op, const wmEvent *
return WM_operator_props_dialog_popup(C, op, 200, 100);
}
-static EnumPropertyItem *outliner_id_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *outliner_id_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem item_tmp = {0}, *item = NULL;
int totitem = 0;
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index f2d73f40039..edd897fbbab 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -282,7 +282,7 @@ typedef enum eOutliner_PropSceneOps {
OL_SCENE_OP_DELETE = 1
} eOutliner_PropSceneOps;
-static EnumPropertyItem prop_scene_op_types[] = {
+static const EnumPropertyItem prop_scene_op_types[] = {
{OL_SCENE_OP_DELETE, "DELETE", ICON_X, "Delete", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -977,7 +977,7 @@ enum {
OL_OP_RENAME,
};
-static EnumPropertyItem prop_object_op_types[] = {
+static const EnumPropertyItem prop_object_op_types[] = {
{OL_OP_SELECT, "SELECT", 0, "Select", ""},
{OL_OP_DESELECT, "DESELECT", 0, "Deselect", ""},
{OL_OP_SELECT_HIERARCHY, "SELECT_HIERARCHY", 0, "Select Hierarchy", ""},
@@ -1110,7 +1110,7 @@ typedef enum eOutliner_PropGroupOps {
OL_GROUPOP_RENAME,
} eOutliner_PropGroupOps;
-static EnumPropertyItem prop_group_op_types[] = {
+static const EnumPropertyItem prop_group_op_types[] = {
{OL_GROUPOP_UNLINK, "UNLINK", 0, "Unlink Group", ""},
{OL_GROUPOP_LOCAL, "LOCAL", 0, "Make Local Group", ""},
{OL_GROUPOP_LINK, "LINK", 0, "Link Group Objects to Scene", ""},
@@ -1208,7 +1208,7 @@ typedef enum eOutlinerIdOpTypes {
} eOutlinerIdOpTypes;
// TODO: implement support for changing the ID-block used
-static EnumPropertyItem prop_id_op_types[] = {
+static const EnumPropertyItem prop_id_op_types[] = {
{OUTLINER_IDOP_UNLINK, "UNLINK", 0, "Unlink", ""},
{OUTLINER_IDOP_LOCAL, "LOCAL", 0, "Make Local", ""},
{OUTLINER_IDOP_SINGLE, "SINGLE", 0, "Make Single User", ""},
@@ -1395,7 +1395,7 @@ typedef enum eOutlinerLibOpTypes {
OL_LIB_RELOAD,
} eOutlinerLibOpTypes;
-static EnumPropertyItem outliner_lib_op_type_items[] = {
+static const EnumPropertyItem outliner_lib_op_type_items[] = {
{OL_LIB_RENAME, "RENAME", 0, "Rename", ""},
{OL_LIB_DELETE, "DELETE", 0, "Delete", "Delete this library and all its item from Blender - WARNING: no undo"},
{OL_LIB_RELOCATE, "RELOCATE", 0, "Relocate", "Select a new path for this library, and reload all its data"},
@@ -1605,7 +1605,7 @@ typedef enum eOutliner_AnimDataOps {
//OUTLINER_ANIMOP_PASTE_DRIVERS
} eOutliner_AnimDataOps;
-static EnumPropertyItem prop_animdata_op_types[] = {
+static const EnumPropertyItem prop_animdata_op_types[] = {
{OUTLINER_ANIMOP_CLEAR_ADT, "CLEAR_ANIMDATA", 0, "Clear Animation Data", "Remove this animation data container"},
{OUTLINER_ANIMOP_SET_ACT, "SET_ACT", 0, "Set Action", ""},
{OUTLINER_ANIMOP_CLEAR_ACT, "CLEAR_ACT", 0, "Unlink Action", ""},
@@ -1705,7 +1705,7 @@ void OUTLINER_OT_animdata_operation(wmOperatorType *ot)
/* **************************************** */
-static EnumPropertyItem prop_constraint_op_types[] = {
+static const EnumPropertyItem prop_constraint_op_types[] = {
{OL_CONSTRAINTOP_ENABLE, "ENABLE", ICON_RESTRICT_VIEW_OFF, "Enable", ""},
{OL_CONSTRAINTOP_DISABLE, "DISABLE", ICON_RESTRICT_VIEW_ON, "Disable", ""},
{OL_CONSTRAINTOP_DELETE, "DELETE", ICON_X, "Delete", ""},
@@ -1751,7 +1751,7 @@ void OUTLINER_OT_constraint_operation(wmOperatorType *ot)
/* ******************** */
-static EnumPropertyItem prop_modifier_op_types[] = {
+static const EnumPropertyItem prop_modifier_op_types[] = {
{OL_MODIFIER_OP_TOGVIS, "TOGVIS", ICON_RESTRICT_VIEW_OFF, "Toggle viewport use", ""},
{OL_MODIFIER_OP_TOGREN, "TOGREN", ICON_RESTRICT_RENDER_OFF, "Toggle render use", ""},
{OL_MODIFIER_OP_DELETE, "DELETE", ICON_X, "Delete", ""},
@@ -1844,7 +1844,7 @@ void OUTLINER_OT_collection_operation(wmOperatorType *ot)
/* ******************** */
// XXX: select linked is for RNA structs only
-static EnumPropertyItem prop_data_op_types[] = {
+static const EnumPropertyItem prop_data_op_types[] = {
{OL_DOP_SELECT, "SELECT", 0, "Select", ""},
{OL_DOP_DESELECT, "DESELECT", 0, "Deselect", ""},
{OL_DOP_HIDE, "HIDE", 0, "Hide", ""},
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 4032270ec95..a8a5bc6e96b 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -107,7 +107,7 @@ EnumPropertyItem prop_side_types[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_side_lr_types[] = {
+static const EnumPropertyItem prop_side_lr_types[] = {
{SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""},
{SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""},
{0, NULL, 0, NULL, NULL}
@@ -2010,7 +2010,7 @@ void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot)
/* cut operator */
-static EnumPropertyItem prop_cut_types[] = {
+static const EnumPropertyItem prop_cut_types[] = {
{SEQ_CUT_SOFT, "SOFT", 0, "Soft", ""},
{SEQ_CUT_HARD, "HARD", 0, "Hard", ""},
{0, NULL, 0, NULL, NULL}
@@ -2800,7 +2800,7 @@ void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot)
#if 0
-static EnumPropertyItem view_type_items[] = {
+static const EnumPropertyItem view_type_items[] = {
{SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
{SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""},
{SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SEQUENCER, "Sequencer and Image Preview", ""},
@@ -3562,7 +3562,7 @@ void SEQUENCER_OT_enable_proxies(wmOperatorType *ot)
/* change ops */
-static EnumPropertyItem prop_change_effect_input_types[] = {
+static const EnumPropertyItem prop_change_effect_input_types[] = {
{0, "A_B", 0, "A -> B", ""},
{1, "B_C", 0, "B -> C", ""},
{2, "A_C", 0, "A -> C", ""},
diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c
index 1b3d458bb69..7ab9308f9a6 100644
--- a/source/blender/editors/space_sequencer/sequencer_modifier.c
+++ b/source/blender/editors/space_sequencer/sequencer_modifier.c
@@ -185,7 +185,7 @@ static int strip_modifier_move_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_strip_modifier_move(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{SEQ_MODIFIER_MOVE_UP, "UP", 0, "Up", "Move modifier up in the stack"},
{SEQ_MODIFIER_MOVE_DOWN, "DOWN", 0, "Down", "Move modifier down in the stack"},
{0, NULL, 0, NULL, NULL}
@@ -258,7 +258,7 @@ static int strip_modifier_copy_exec(bContext *C, wmOperator *op)
void SEQUENCER_OT_strip_modifier_copy(wmOperatorType *ot)
{
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{SEQ_MODIFIER_COPY_REPLACE, "REPLACE", 0, "Replace",
"Replace modifiers in destination"},
{SEQ_MODIFIER_COPY_APPEND, "APPEND", 0, "Append",
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index b24458a1cab..90a369760ac 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -548,7 +548,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
void SEQUENCER_OT_select(wmOperatorType *ot)
{
- static EnumPropertyItem sequencer_select_left_right_types[] = {
+ static const EnumPropertyItem sequencer_select_left_right_types[] = {
{SEQ_SELECT_LR_NONE, "NONE", 0, "None", "Don't do left-right selection"},
{SEQ_SELECT_LR_MOUSE, "MOUSE", 0, "Mouse", "Use mouse position for selection"},
{SEQ_SELECT_LR_LEFT, "LEFT", 0, "Left", "Select left"},
@@ -953,7 +953,7 @@ enum {
SEQ_SELECT_GROUP_OVERLAP,
};
-static EnumPropertyItem sequencer_prop_select_grouped_types[] = {
+static const EnumPropertyItem sequencer_prop_select_grouped_types[] = {
{SEQ_SELECT_GROUP_TYPE, "TYPE", 0, "Type", "Shared strip type"},
{SEQ_SELECT_GROUP_TYPE_BASIC, "TYPE_BASIC", 0, "Global Type", "All strips of same basic type (Graphical or Sound)"},
{SEQ_SELECT_GROUP_TYPE_EFFECT, "TYPE_EFFECT", 0, "Effect Type",
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 548cf157c0f..2a0c350ba54 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -1046,7 +1046,7 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
/******************* convert whitespace operator *********************/
enum { TO_SPACES, TO_TABS };
-static EnumPropertyItem whitespace_type_items[] = {
+static const EnumPropertyItem whitespace_type_items[] = {
{TO_SPACES, "SPACES", 0, "To Spaces", NULL},
{TO_TABS, "TABS", 0, "To Tabs", NULL},
{0, NULL, 0, NULL, NULL}};
@@ -1280,7 +1280,7 @@ static int move_lines_exec(bContext *C, wmOperator *op)
void TEXT_OT_move_lines(wmOperatorType *ot)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{TXT_MOVE_LINE_UP, "UP", 0, "Up", ""},
{TXT_MOVE_LINE_DOWN, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}
@@ -1301,7 +1301,7 @@ void TEXT_OT_move_lines(wmOperatorType *ot)
/************************ move operator ************************/
-static EnumPropertyItem move_type_items[] = {
+static const EnumPropertyItem move_type_items[] = {
{LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""},
{LINE_END, "LINE_END", 0, "Line End", ""},
{FILE_TOP, "FILE_TOP", 0, "File Top", ""},
@@ -1923,7 +1923,7 @@ void TEXT_OT_jump(wmOperatorType *ot)
/******************* delete operator **********************/
-static EnumPropertyItem delete_type_items[] = {
+static const EnumPropertyItem delete_type_items[] = {
{DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""},
{DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""},
{DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""},
@@ -3086,7 +3086,7 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot)
/****************** resolve conflict operator ******************/
enum { RESOLVE_IGNORE, RESOLVE_RELOAD, RESOLVE_SAVE, RESOLVE_MAKE_INTERNAL };
-static EnumPropertyItem resolution_items[] = {
+static const EnumPropertyItem resolution_items[] = {
{RESOLVE_IGNORE, "IGNORE", 0, "Ignore", ""},
{RESOLVE_RELOAD, "RELOAD", 0, "Reload", ""},
{RESOLVE_SAVE, "SAVE", 0, "Save", ""},
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index bfd7e0b763e..84f31020c32 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -916,7 +916,7 @@ enum {
/* called in transform_ops.c, on each regeneration of keymaps */
void viewrotate_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, "Enable Axis Snap", ""},
@@ -1940,7 +1940,7 @@ void VIEW3D_OT_ndof_all(struct wmOperatorType *ot)
/* called in transform_ops.c, on each regeneration of keymaps */
void viewmove_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"},
@@ -2119,7 +2119,7 @@ void VIEW3D_OT_move(wmOperatorType *ot)
/* called in transform_ops.c, on each regeneration of keymaps */
void viewzoom_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"},
@@ -2511,7 +2511,7 @@ static int viewzoom_exec(bContext *C, wmOperator *op)
/* called in transform_ops.c, on each regeneration of keymaps */
void viewdolly_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"},
@@ -3804,7 +3804,7 @@ void VIEW3D_OT_zoom_camera_1_to_1(wmOperatorType *ot)
/* ********************* Changing view operator ****************** */
-static EnumPropertyItem prop_view_items[] = {
+static const EnumPropertyItem prop_view_items[] = {
{RV3D_VIEW_LEFT, "LEFT", ICON_TRIA_LEFT, "Left", "View From the Left"},
{RV3D_VIEW_RIGHT, "RIGHT", ICON_TRIA_RIGHT, "Right", "View From the Right"},
{RV3D_VIEW_BOTTOM, "BOTTOM", ICON_TRIA_DOWN, "Bottom", "View From the Bottom"},
@@ -4041,7 +4041,7 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
-static EnumPropertyItem prop_view_orbit_items[] = {
+static const EnumPropertyItem prop_view_orbit_items[] = {
{V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, "Orbit Left", "Orbit the view around to the Left"},
{V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, "Orbit Right", "Orbit the view around to the Right"},
{V3D_VIEW_STEPUP, "ORBITUP", 0, "Orbit Up", "Orbit the view Up"},
@@ -4264,7 +4264,7 @@ static int viewroll_modal(bContext *C, wmOperator *op, const wmEvent *event)
return ret;
}
-static EnumPropertyItem prop_view_roll_items[] = {
+static const EnumPropertyItem prop_view_roll_items[] = {
{0, "ANGLE", 0, "Roll Angle", "Roll the view using an angle value"},
{V3D_VIEW_STEPLEFT, "LEFT", 0, "Roll Left", "Roll the view around to the Left"},
{V3D_VIEW_STEPRIGHT, "RIGHT", 0, "Roll Right", "Roll the view around to the Right"},
@@ -4399,7 +4399,7 @@ void VIEW3D_OT_view_roll(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
-static EnumPropertyItem prop_view_pan_items[] = {
+static const EnumPropertyItem prop_view_pan_items[] = {
{V3D_VIEW_PANLEFT, "PANLEFT", 0, "Pan Left", "Pan the view to the Left"},
{V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"},
{V3D_VIEW_PANUP, "PANUP", 0, "Pan Up", "Pan the view Up"},
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index bce27fc5c92..b3ed8e34755 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -99,7 +99,7 @@ typedef enum eFlyPanState {
/* called in transform_ops.c, on each regeneration of keymaps */
void fly_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{FLY_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{FLY_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{FLY_MODAL_ACCELERATE, "ACCELERATE", 0, "Accelerate", ""},
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 9014a2c74e6..5408269ce13 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -966,7 +966,7 @@ typedef struct SelMenuItemF {
static SelMenuItemF object_mouse_select_menu_data[SEL_MENU_SIZE];
/* special (crappy) operator only for menu select */
-static EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL, item_tmp = {0};
int totitem = 0;
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 2f7893b9b83..ce089aa29fa 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -132,7 +132,7 @@ typedef enum eWalkGravityState {
/* called in transform_ops.c, on each regeneration of keymaps */
void walk_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{WALK_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{WALK_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 4745631e85c..40309b701a4 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -808,7 +808,7 @@ enum {
/* called in transform_ops.c, on each regeneration of keymaps */
wmKeyMap *transform_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{TFM_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{TFM_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{TFM_MODAL_TRANSLATE, "TRANSLATE", 0, "Translate", ""},
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index ec5342ff5b4..ad855427ff1 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -122,7 +122,7 @@ static TransformModeItem transform_modes[] =
{NULL, 0}
};
-EnumPropertyItem rna_enum_transform_mode_types[] =
+const EnumPropertyItem rna_enum_transform_mode_types[] =
{
{TFM_INIT, "INIT", 0, "Init", ""},
{TFM_DUMMY, "DUMMY", 0, "Dummy", ""},
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index ff328a28ee9..5b91ee4fc29 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -533,7 +533,7 @@ static int get_undo_system(bContext *C)
}
/* create enum based on undo items */
-static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
+static const EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem)
{
EnumPropertyItem item_tmp = {0}, *item = NULL;
int i = 0;
@@ -586,7 +586,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
undosys = get_undo_system(C);
if (undosys) {
- EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem);
+ const EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem);
if (totitem > 0) {
uiPopupMenu *pup = UI_popup_menu_begin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE);
@@ -609,7 +609,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
}
}
- MEM_freeN(item);
+ MEM_freeN((void *)item);
UI_popup_menu_end(C, pup);
}
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 0b2c722dfb1..12ff1ebe566 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1622,7 +1622,7 @@ static int uv_align_exec(bContext *C, wmOperator *op)
static void UV_OT_align(wmOperatorType *ot)
{
- static EnumPropertyItem axis_items[] = {
+ static const EnumPropertyItem axis_items[] = {
{'s', "ALIGN_S", 0, "Straighten", "Align UVs along the line defined by the endpoints"},
{'t', "ALIGN_T", 0, "Straighten X", "Align UVs along the line defined by the endpoints along the X axis"},
{'u', "ALIGN_U", 0, "Straighten Y", "Align UVs along the line defined by the endpoints along the Y axis"},
@@ -3155,7 +3155,7 @@ static int uv_snap_cursor_exec(bContext *C, wmOperator *op)
static void UV_OT_snap_cursor(wmOperatorType *ot)
{
- static EnumPropertyItem target_items[] = {
+ static const EnumPropertyItem target_items[] = {
{0, "PIXELS", 0, "Pixels", ""},
{1, "SELECTED", 0, "Selected", ""},
{0, NULL, 0, NULL, NULL}};
@@ -3362,7 +3362,7 @@ static int uv_snap_selection_exec(bContext *C, wmOperator *op)
static void UV_OT_snap_selected(wmOperatorType *ot)
{
- static EnumPropertyItem target_items[] = {
+ static const EnumPropertyItem target_items[] = {
{0, "PIXELS", 0, "Pixels", ""},
{1, "CURSOR", 0, "Cursor", ""},
{2, "CURSOR_OFFSET", 0, "Cursor (Offset)", ""},
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 4ff4c3223f0..fa936e998fa 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -2320,7 +2320,7 @@ void UV_OT_stitch(wmOperatorType *ot)
{
PropertyRNA *prop;
- static EnumPropertyItem stitch_modes[] = {
+ static const EnumPropertyItem stitch_modes[] = {
{STITCH_VERT, "VERTEX", 0, "Vertex", ""},
{STITCH_EDGE, "EDGE", 0, "Edge", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index b700c992a01..8a742735a06 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -995,13 +995,13 @@ static void uv_map_transform(bContext *C, wmOperator *op, float center[3], float
static void uv_transform_properties(wmOperatorType *ot, int radius)
{
- static EnumPropertyItem direction_items[] = {
+ static const EnumPropertyItem direction_items[] = {
{VIEW_ON_EQUATOR, "VIEW_ON_EQUATOR", 0, "View on Equator", "3D view is on the equator"},
{VIEW_ON_POLES, "VIEW_ON_POLES", 0, "View on Poles", "3D view is on the poles"},
{ALIGN_TO_OBJECT, "ALIGN_TO_OBJECT", 0, "Align to Object", "Align according to object transform"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem align_items[] = {
+ static const EnumPropertyItem align_items[] = {
{POLAR_ZX, "POLAR_ZX", 0, "Polar ZX", "Polar 0 is X"},
{POLAR_ZY, "POLAR_ZY", 0, "Polar ZY", "Polar 0 is Y"},
{0, NULL, 0, NULL, NULL}
@@ -1236,7 +1236,7 @@ static int unwrap_exec(bContext *C, wmOperator *op)
void UV_OT_unwrap(wmOperatorType *ot)
{
- static EnumPropertyItem method_items[] = {
+ static const EnumPropertyItem method_items[] = {
{0, "ANGLE_BASED", 0, "Angle Based", ""},
{1, "CONFORMAL", 0, "Conformal", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 8558e3b5a08..194ab59ebdb 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -315,7 +315,7 @@ typedef struct wmKeyMap {
/* runtime */
int (*poll)(struct bContext *); /* verify if enabled in the current context */
- void *modal_items; /* for modal, EnumPropertyItem for now */
+ const void *modal_items; /* for modal, EnumPropertyItem for now */
} wmKeyMap;
/* wmKeyMap.flag */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 501a1cccca6..7bb9e772697 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -846,22 +846,25 @@ void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *soft
int RNA_property_float_clamp(PointerRNA *ptr, PropertyRNA *prop, float *value);
int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value);
-bool RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **identifier);
-int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const char **identifier);
-bool RNA_enum_name(EnumPropertyItem *item, const int value, const char **r_name);
-bool RNA_enum_description(EnumPropertyItem *item, const int value, const char **description);
-int RNA_enum_from_value(EnumPropertyItem *item, const int value);
-int RNA_enum_from_identifier(EnumPropertyItem *item, const char *identifier);
+bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **identifier);
+int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item, const int value, const char **identifier);
+bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name);
+bool RNA_enum_description(const EnumPropertyItem *item, const int value, const char **description);
+int RNA_enum_from_value(const EnumPropertyItem *item, const int value);
+int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier);
void RNA_property_enum_items_ex(
struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const bool use_static,
- EnumPropertyItem **item, int *r_totitem, bool *r_free);
-void RNA_property_enum_items(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
- EnumPropertyItem **item, int *r_totitem, bool *r_free);
-void RNA_property_enum_items_gettexted(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
- EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
-void RNA_property_enum_items_gettexted_all(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
- EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
+void RNA_property_enum_items(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
+void RNA_property_enum_items_gettexted(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
+void RNA_property_enum_items_gettexted_all(
+ struct bContext *C, PointerRNA *ptr, PropertyRNA *prop,
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free);
bool RNA_property_enum_value(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value);
bool RNA_property_enum_identifier(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier);
bool RNA_property_enum_name(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
@@ -1059,10 +1062,10 @@ void RNA_enum_set_identifier(struct bContext *C, PointerRNA *ptr, const char *na
bool RNA_enum_is_equal(struct bContext *C, PointerRNA *ptr, const char *name, const char *enumname);
/* lower level functions that don't use a PointerRNA */
-bool RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *r_value);
-bool RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **r_identifier);
-bool RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *r_icon);
-bool RNA_enum_name_from_value(EnumPropertyItem *item, int value, const char **r_name);
+bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value);
+bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier);
+bool RNA_enum_icon_from_value(const EnumPropertyItem *item, int value, int *r_icon);
+bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name);
void RNA_string_get(PointerRNA *ptr, const char *name, char *value);
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen);
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index 7a61b3ec489..47648583e14 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -219,8 +219,8 @@ void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item);
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem);
-void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item);
-void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value);
+void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item);
+void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value);
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem);
/* Memory management */
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 301c6fae3ca..760ddb34368 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -36,210 +36,212 @@ struct bNodeSocketType;
/* Types */
/* use in cases where only dynamic types are used */
-extern EnumPropertyItem DummyRNA_NULL_items[];
-extern EnumPropertyItem DummyRNA_DEFAULT_items[];
+extern const EnumPropertyItem DummyRNA_NULL_items[];
+extern const EnumPropertyItem DummyRNA_DEFAULT_items[];
/* all others should follow 'rna_enum_*_items' naming */
-extern EnumPropertyItem rna_enum_id_type_items[];
+extern const EnumPropertyItem rna_enum_id_type_items[];
-extern EnumPropertyItem rna_enum_object_mode_items[];
-extern EnumPropertyItem rna_enum_object_empty_drawtype_items[];
-extern EnumPropertyItem rna_enum_metaelem_type_items[];
+extern const EnumPropertyItem rna_enum_object_mode_items[];
+extern const EnumPropertyItem rna_enum_object_empty_drawtype_items[];
+extern const EnumPropertyItem rna_enum_metaelem_type_items[];
-extern EnumPropertyItem rna_enum_proportional_falloff_items[];
-extern EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[];
-extern EnumPropertyItem rna_enum_proportional_editing_items[];
-extern EnumPropertyItem rna_enum_snap_target_items[];
-extern EnumPropertyItem rna_enum_snap_element_items[];
-extern EnumPropertyItem rna_enum_snap_node_element_items[];
-extern EnumPropertyItem rna_enum_curve_fit_method_items[];
-extern EnumPropertyItem rna_enum_mesh_select_mode_items[];
-extern EnumPropertyItem rna_enum_mesh_delimit_mode_items[];
-extern EnumPropertyItem rna_enum_space_type_items[];
-extern EnumPropertyItem rna_enum_region_type_items[];
-extern EnumPropertyItem rna_enum_object_modifier_type_items[];
-extern EnumPropertyItem rna_enum_constraint_type_items[];
-extern EnumPropertyItem rna_enum_boidrule_type_items[];
-extern EnumPropertyItem rna_enum_sequence_modifier_type_items[];
-extern EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[];
+extern const EnumPropertyItem rna_enum_proportional_falloff_items[];
+extern const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[];
+extern const EnumPropertyItem rna_enum_proportional_editing_items[];
+extern const EnumPropertyItem rna_enum_snap_target_items[];
+extern const EnumPropertyItem rna_enum_snap_element_items[];
+extern const EnumPropertyItem rna_enum_snap_node_element_items[];
+extern const EnumPropertyItem rna_enum_curve_fit_method_items[];
+extern const EnumPropertyItem rna_enum_mesh_select_mode_items[];
+extern const EnumPropertyItem rna_enum_mesh_delimit_mode_items[];
+extern const EnumPropertyItem rna_enum_space_type_items[];
+extern const EnumPropertyItem rna_enum_region_type_items[];
+extern const EnumPropertyItem rna_enum_object_modifier_type_items[];
+extern const EnumPropertyItem rna_enum_constraint_type_items[];
+extern const EnumPropertyItem rna_enum_boidrule_type_items[];
+extern const EnumPropertyItem rna_enum_sequence_modifier_type_items[];
+extern const EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[];
-extern EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[];
-extern EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[];
+extern const EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[];
+extern const EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[];
-extern EnumPropertyItem rna_enum_image_type_items[];
-extern EnumPropertyItem rna_enum_image_color_mode_items[];
-extern EnumPropertyItem rna_enum_image_color_depth_items[];
-extern EnumPropertyItem rna_enum_image_generated_type_items[];
+extern const EnumPropertyItem rna_enum_image_type_items[];
+extern const EnumPropertyItem rna_enum_image_color_mode_items[];
+extern const EnumPropertyItem rna_enum_image_color_depth_items[];
+extern const EnumPropertyItem rna_enum_image_generated_type_items[];
-extern EnumPropertyItem rna_enum_normal_space_items[];
-extern EnumPropertyItem rna_enum_normal_swizzle_items[];
-extern EnumPropertyItem rna_enum_bake_save_mode_items[];
+extern const EnumPropertyItem rna_enum_normal_space_items[];
+extern const EnumPropertyItem rna_enum_normal_swizzle_items[];
+extern const EnumPropertyItem rna_enum_bake_save_mode_items[];
-extern EnumPropertyItem rna_enum_views_format_items[];
-extern EnumPropertyItem rna_enum_views_format_multilayer_items[];
-extern EnumPropertyItem rna_enum_views_format_multiview_items[];
-extern EnumPropertyItem rna_enum_stereo3d_display_items[];
-extern EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[];
-extern EnumPropertyItem rna_enum_stereo3d_interlace_type_items[];
+extern const EnumPropertyItem rna_enum_views_format_items[];
+extern const EnumPropertyItem rna_enum_views_format_multilayer_items[];
+extern const EnumPropertyItem rna_enum_views_format_multiview_items[];
+extern const EnumPropertyItem rna_enum_stereo3d_display_items[];
+extern const EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[];
+extern const EnumPropertyItem rna_enum_stereo3d_interlace_type_items[];
-extern EnumPropertyItem rna_enum_exr_codec_items[];
-extern EnumPropertyItem rna_enum_color_sets_items[];
+extern const EnumPropertyItem rna_enum_exr_codec_items[];
+extern const EnumPropertyItem rna_enum_color_sets_items[];
-extern EnumPropertyItem rna_enum_beztriple_keyframe_type_items[];
-extern EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[];
-extern EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[];
-extern EnumPropertyItem rna_enum_keyframe_handle_type_items[];
+extern const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[];
+extern const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[];
+extern const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[];
+extern const EnumPropertyItem rna_enum_keyframe_handle_type_items[];
-extern EnumPropertyItem rna_enum_keyblock_type_items[];
+extern const EnumPropertyItem rna_enum_keyblock_type_items[];
-extern EnumPropertyItem rna_enum_keyingset_path_grouping_items[];
-extern EnumPropertyItem rna_enum_keying_flag_items[];
+extern const EnumPropertyItem rna_enum_keyingset_path_grouping_items[];
+extern const EnumPropertyItem rna_enum_keying_flag_items[];
-extern EnumPropertyItem rna_enum_keyframe_paste_offset_items[];
-extern EnumPropertyItem rna_enum_keyframe_paste_merge_items[];
+extern const EnumPropertyItem rna_enum_keyframe_paste_offset_items[];
+extern const EnumPropertyItem rna_enum_keyframe_paste_merge_items[];
-extern EnumPropertyItem rna_enum_fmodifier_type_items[];
+extern const EnumPropertyItem rna_enum_fmodifier_type_items[];
-extern EnumPropertyItem rna_enum_nla_mode_extend_items[];
-extern EnumPropertyItem rna_enum_nla_mode_blend_items[];
+extern const EnumPropertyItem rna_enum_nla_mode_extend_items[];
+extern const EnumPropertyItem rna_enum_nla_mode_blend_items[];
-extern EnumPropertyItem rna_enum_motionpath_bake_location_items[];
+extern const EnumPropertyItem rna_enum_motionpath_bake_location_items[];
-extern EnumPropertyItem rna_enum_event_value_items[];
-extern EnumPropertyItem rna_enum_event_type_items[];
-extern EnumPropertyItem rna_enum_operator_return_items[];
+extern const EnumPropertyItem rna_enum_event_value_items[];
+extern const EnumPropertyItem rna_enum_event_type_items[];
+extern const EnumPropertyItem rna_enum_operator_return_items[];
-extern EnumPropertyItem rna_enum_brush_sculpt_tool_items[];
-extern EnumPropertyItem rna_enum_brush_vertex_tool_items[];
-extern EnumPropertyItem rna_enum_brush_image_tool_items[];
+extern const EnumPropertyItem rna_enum_brush_sculpt_tool_items[];
+extern const EnumPropertyItem rna_enum_brush_vertex_tool_items[];
+extern const EnumPropertyItem rna_enum_brush_image_tool_items[];
-extern EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[];
+extern const EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[];
-extern EnumPropertyItem rna_enum_uv_sculpt_tool_items[];
+extern const EnumPropertyItem rna_enum_uv_sculpt_tool_items[];
-extern EnumPropertyItem rna_enum_axis_xy_items[];
-extern EnumPropertyItem rna_enum_axis_xyz_items[];
+extern const EnumPropertyItem rna_enum_axis_xy_items[];
+extern const EnumPropertyItem rna_enum_axis_xyz_items[];
-extern EnumPropertyItem rna_enum_axis_flag_xyz_items[];
+extern const EnumPropertyItem rna_enum_axis_flag_xyz_items[];
-extern EnumPropertyItem rna_enum_symmetrize_direction_items[];
+extern const EnumPropertyItem rna_enum_symmetrize_direction_items[];
-extern EnumPropertyItem rna_enum_texture_type_items[];
+extern const EnumPropertyItem rna_enum_texture_type_items[];
-extern EnumPropertyItem rna_enum_lamp_type_items[];
+extern const EnumPropertyItem rna_enum_lamp_type_items[];
-extern EnumPropertyItem rna_enum_unpack_method_items[];
+extern const EnumPropertyItem rna_enum_unpack_method_items[];
-extern EnumPropertyItem rna_enum_object_type_items[];
+extern const EnumPropertyItem rna_enum_object_type_items[];
-extern EnumPropertyItem rna_enum_object_type_curve_items[];
+extern const EnumPropertyItem rna_enum_object_type_curve_items[];
-extern EnumPropertyItem rna_enum_rigidbody_object_type_items[];
-extern EnumPropertyItem rna_enum_rigidbody_object_shape_items[];
-extern EnumPropertyItem rna_enum_rigidbody_constraint_type_items[];
+extern const EnumPropertyItem rna_enum_rigidbody_object_type_items[];
+extern const EnumPropertyItem rna_enum_rigidbody_object_shape_items[];
+extern const EnumPropertyItem rna_enum_rigidbody_constraint_type_items[];
-extern EnumPropertyItem rna_enum_object_axis_items[];
+extern const EnumPropertyItem rna_enum_object_axis_items[];
-extern EnumPropertyItem rna_enum_controller_type_items[];
+extern const EnumPropertyItem rna_enum_controller_type_items[];
-extern EnumPropertyItem rna_enum_render_pass_type_items[];
-extern EnumPropertyItem rna_enum_render_pass_debug_type_items[];
+extern const EnumPropertyItem rna_enum_render_pass_type_items[];
+extern const EnumPropertyItem rna_enum_render_pass_debug_type_items[];
-extern EnumPropertyItem rna_enum_bake_pass_type_items[];
-extern EnumPropertyItem rna_enum_bake_pass_filter_type_items[];
+extern const EnumPropertyItem rna_enum_bake_pass_type_items[];
+extern const EnumPropertyItem rna_enum_bake_pass_filter_type_items[];
-extern EnumPropertyItem rna_enum_keymap_propvalue_items[];
+extern const EnumPropertyItem rna_enum_keymap_propvalue_items[];
-extern EnumPropertyItem rna_enum_operator_context_items[];
+extern const EnumPropertyItem rna_enum_operator_context_items[];
-extern EnumPropertyItem rna_enum_wm_report_items[];
+extern const EnumPropertyItem rna_enum_wm_report_items[];
-extern EnumPropertyItem rna_enum_transform_mode_types[];
+extern const EnumPropertyItem rna_enum_transform_mode_types[];
-extern EnumPropertyItem rna_enum_posebone_rotmode_items[];
+extern const EnumPropertyItem rna_enum_posebone_rotmode_items[];
-extern EnumPropertyItem rna_enum_property_type_items[];
-extern EnumPropertyItem rna_enum_property_subtype_items[];
-extern EnumPropertyItem rna_enum_property_unit_items[];
+extern const EnumPropertyItem rna_enum_property_type_items[];
+extern const EnumPropertyItem rna_enum_property_subtype_items[];
+extern const EnumPropertyItem rna_enum_property_unit_items[];
-extern EnumPropertyItem rna_enum_gameproperty_type_items[];
+extern const EnumPropertyItem rna_enum_gameproperty_type_items[];
-extern EnumPropertyItem rna_enum_viewport_shade_items[];
+extern const EnumPropertyItem rna_enum_viewport_shade_items[];
-extern EnumPropertyItem rna_enum_navigation_mode_items[];
+extern const EnumPropertyItem rna_enum_navigation_mode_items[];
-extern EnumPropertyItem rna_enum_file_sort_items[];
+extern const EnumPropertyItem rna_enum_file_sort_items[];
-extern EnumPropertyItem rna_enum_node_socket_in_out_items[];
-extern EnumPropertyItem rna_enum_node_icon_items[];
+extern const EnumPropertyItem rna_enum_node_socket_in_out_items[];
+extern const EnumPropertyItem rna_enum_node_icon_items[];
-extern EnumPropertyItem rna_enum_node_math_items[];
-extern EnumPropertyItem rna_enum_node_vec_math_items[];
-extern EnumPropertyItem rna_enum_node_filter_items[];
+extern const EnumPropertyItem rna_enum_node_math_items[];
+extern const EnumPropertyItem rna_enum_node_vec_math_items[];
+extern const EnumPropertyItem rna_enum_node_filter_items[];
-extern EnumPropertyItem rna_enum_ramp_blend_items[];
+extern const EnumPropertyItem rna_enum_ramp_blend_items[];
-extern EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[];
+extern const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[];
-extern EnumPropertyItem rna_enum_clip_editor_mode_items[];
+extern const EnumPropertyItem rna_enum_clip_editor_mode_items[];
-extern EnumPropertyItem rna_enum_icon_items[];
-extern EnumPropertyItem rna_enum_uilist_layout_type_items[];
+extern const EnumPropertyItem rna_enum_icon_items[];
+extern const EnumPropertyItem rna_enum_uilist_layout_type_items[];
-extern EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[];
-extern EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[];
-extern EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[];
-extern EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[];
+extern const EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[];
+extern const EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[];
+extern const EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[];
+extern const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[];
-extern EnumPropertyItem rna_enum_window_cursor_items[];
+extern const EnumPropertyItem rna_enum_window_cursor_items[];
-extern EnumPropertyItem rna_enum_dt_method_vertex_items[];
-extern EnumPropertyItem rna_enum_dt_method_edge_items[];
-extern EnumPropertyItem rna_enum_dt_method_loop_items[];
-extern EnumPropertyItem rna_enum_dt_method_poly_items[];
-extern EnumPropertyItem rna_enum_dt_mix_mode_items[];
-extern EnumPropertyItem rna_enum_dt_layers_select_src_items[];
-extern EnumPropertyItem rna_enum_dt_layers_select_dst_items[];
+extern const EnumPropertyItem rna_enum_dt_method_vertex_items[];
+extern const EnumPropertyItem rna_enum_dt_method_edge_items[];
+extern const EnumPropertyItem rna_enum_dt_method_loop_items[];
+extern const EnumPropertyItem rna_enum_dt_method_poly_items[];
+extern const EnumPropertyItem rna_enum_dt_mix_mode_items[];
+extern const EnumPropertyItem rna_enum_dt_layers_select_src_items[];
+extern const EnumPropertyItem rna_enum_dt_layers_select_dst_items[];
-extern EnumPropertyItem rna_enum_abc_compression_items[];
+extern const EnumPropertyItem rna_enum_abc_compression_items[];
/* API calls */
int rna_node_tree_type_to_enum(struct bNodeTreeType *typeinfo);
int rna_node_tree_idname_to_enum(const char *idname);
struct bNodeTreeType *rna_node_tree_type_from_enum(int value);
-EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, struct bNodeTreeType *), bool *r_free);
+const EnumPropertyItem *rna_node_tree_type_itemf(
+ void *data, int (*poll)(void *data, struct bNodeTreeType *), bool *r_free);
int rna_node_type_to_enum(struct bNodeType *typeinfo);
int rna_node_idname_to_enum(const char *idname);
struct bNodeType *rna_node_type_from_enum(int value);
-EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, struct bNodeType *), bool *r_free);
+const EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, struct bNodeType *), bool *r_free);
int rna_node_socket_type_to_enum(struct bNodeSocketType *typeinfo);
int rna_node_socket_idname_to_enum(const char *idname);
struct bNodeSocketType *rna_node_socket_type_from_enum(int value);
-EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, struct bNodeSocketType *), bool *r_free);
+const EnumPropertyItem *rna_node_socket_type_itemf(
+ void *data, int (*poll)(void *data, struct bNodeSocketType *), bool *r_free);
struct bContext;
struct PointerRNA;
struct PropertyRNA;
-EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *rna_Sensor_type_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *rna_Actuator_type_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *rna_Sensor_type_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *rna_Actuator_type_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
/* Generic functions, return an enum from library data, index is the position
* in the linked list can add more for different types as needed */
-EnumPropertyItem *RNA_action_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_action_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
// EnumPropertyItem *RNA_action_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_group_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_group_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_image_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_image_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_scene_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_scene_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_movieclip_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_movieclip_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_mask_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
-EnumPropertyItem *RNA_mask_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_group_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_group_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_image_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_image_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_scene_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_scene_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_movieclip_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_movieclip_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_mask_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const EnumPropertyItem *RNA_mask_local_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
#endif /* __RNA_ENUM_TYPES_H__ */
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 2ec25bc8e46..167e1776a57 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -361,7 +361,7 @@ typedef void (*StringPropertySetFunc)(struct PointerRNA *ptr, struct PropertyRNA
typedef int (*EnumPropertyGetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop);
typedef void (*EnumPropertySetFunc)(struct PointerRNA *ptr, struct PropertyRNA *prop, int value);
/* same as PropEnumItemFunc */
-typedef EnumPropertyItem *(*EnumPropertyItemFunc)(struct bContext *C, PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+typedef const EnumPropertyItem *(*EnumPropertyItemFunc)(struct bContext *C, PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
typedef struct PropertyRNA PropertyRNA;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index f232a1aef48..3e67eeb3951 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -2872,7 +2872,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
int i, defaultfound = 0, totflag = 0;
if (eprop->item) {
- fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier,
+ fprintf(f, "static const EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier,
strnest, prop->identifier, eprop->totitem + 1);
for (i = 0; i < eprop->totitem; i++) {
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 90b7ffd71bb..c519c61e9e9 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -48,7 +48,7 @@
/* enum of ID-block types
* NOTE: need to keep this in line with the other defines for these
*/
-EnumPropertyItem rna_enum_id_type_items[] = {
+const EnumPropertyItem rna_enum_id_type_items[] = {
{ID_AC, "ACTION", ICON_ACTION, "Action", ""},
{ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armature", ""},
{ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brush", ""},
@@ -964,7 +964,7 @@ static void rna_def_ID(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *prop, *parm;
- static EnumPropertyItem update_flag_items[] = {
+ static const EnumPropertyItem update_flag_items[] = {
{OB_RECALC_OB, "OBJECT", 0, "Object", ""},
{OB_RECALC_DATA, "DATA", 0, "Data", ""},
{OB_RECALC_TIME, "TIME", 0, "Time", ""},
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 114ded9b0c0..d24b2ccc91d 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1340,26 +1340,26 @@ int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *va
}
/* Reuse for dynamic types */
-EnumPropertyItem DummyRNA_NULL_items[] = {
+const EnumPropertyItem DummyRNA_NULL_items[] = {
{0, NULL, 0, NULL, NULL}
};
/* Reuse for dynamic types with default value */
-EnumPropertyItem DummyRNA_DEFAULT_items[] = {
+const EnumPropertyItem DummyRNA_DEFAULT_items[] = {
{0, "DEFAULT", 0, "Default", ""},
{0, NULL, 0, NULL, NULL}
};
void RNA_property_enum_items_ex(
bContext *C, PointerRNA *ptr, PropertyRNA *prop, const bool use_static,
- EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
{
EnumPropertyRNA *eprop = (EnumPropertyRNA *)rna_ensure_property(prop);
*r_free = false;
if (!use_static && eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) {
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
if (prop->flag & PROP_ENUM_NO_CONTEXT)
item = eprop->itemf(NULL, ptr, prop, r_free);
@@ -1387,13 +1387,15 @@ void RNA_property_enum_items_ex(
}
void RNA_property_enum_items(
- bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
+ bContext *C, PointerRNA *ptr, PropertyRNA *prop,
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
{
RNA_property_enum_items_ex(C, ptr, prop, false, r_item, r_totitem, r_free);
}
#ifdef WITH_INTERNATIONAL
-static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
+static void property_enum_translate(
+ PropertyRNA *prop, EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
{
if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) {
int i;
@@ -1410,7 +1412,7 @@ static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item
nitem = *r_item;
}
else {
- EnumPropertyItem *item = *r_item;
+ const EnumPropertyItem *item = *r_item;
int tot;
if (r_totitem) {
@@ -1443,31 +1445,36 @@ static void property_enum_translate(PropertyRNA *prop, EnumPropertyItem **r_item
}
#endif
-void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop,
- EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
+void RNA_property_enum_items_gettexted(
+ bContext *C, PointerRNA *ptr, PropertyRNA *prop,
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
{
RNA_property_enum_items(C, ptr, prop, r_item, r_totitem, r_free);
#ifdef WITH_INTERNATIONAL
- property_enum_translate(prop, r_item, r_totitem, r_free);
+ /* Normally dropping 'const' is _not_ ok, in this case it's only modified if we own the memory
+ * so allow the exception (callers are creating new arrays in this case). */
+ property_enum_translate(prop, (EnumPropertyItem **)r_item, r_totitem, r_free);
#endif
}
-void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, PropertyRNA *prop,
- EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
+void RNA_property_enum_items_gettexted_all(
+ bContext *C, PointerRNA *ptr, PropertyRNA *prop,
+ const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
{
EnumPropertyRNA *eprop = (EnumPropertyRNA *)rna_ensure_property(prop);
int mem_size = sizeof(EnumPropertyItem) * (eprop->totitem + 1);
/* first return all items */
+ EnumPropertyItem *item_array = MEM_mallocN(mem_size, "enum_gettext_all");
*r_free = true;
- *r_item = MEM_mallocN(mem_size, "enum_gettext_all");
- memcpy(*r_item, eprop->item, mem_size);
+ memcpy(item_array, eprop->item, mem_size);
- if (r_totitem)
+ if (r_totitem) {
*r_totitem = eprop->totitem;
+ }
if (eprop->itemf && (C != NULL || (prop->flag & PROP_ENUM_NO_CONTEXT))) {
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int i;
bool free = false;
@@ -1485,30 +1492,32 @@ void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, Propert
/* items that do not exist on list are returned, but have their names/identifiers NULLed out */
for (i_fixed = 0; item[i_fixed].identifier; i_fixed++) {
- if (STREQ(item[i_fixed].identifier, (*r_item)[i].identifier)) {
+ if (STREQ(item[i_fixed].identifier, item_array[i].identifier)) {
exists = true;
break;
}
}
if (!exists) {
- (*r_item)[i].name = NULL;
- (*r_item)[i].identifier = "";
+ item_array[i].name = NULL;
+ item_array[i].identifier = "";
}
}
- if (free)
- MEM_freeN(item);
+ if (free) {
+ MEM_freeN((void *)item);
+ }
}
#ifdef WITH_INTERNATIONAL
- property_enum_translate(prop, r_item, r_totitem, r_free);
+ property_enum_translate(prop, &item_array, r_totitem, r_free);
#endif
+ *r_item = item_array;
}
bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *r_value)
{
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
bool free;
bool found;
@@ -1525,7 +1534,7 @@ bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, co
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
}
else {
@@ -1534,7 +1543,7 @@ bool RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, co
return found;
}
-bool RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **r_identifier)
+bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **r_identifier)
{
const int i = RNA_enum_from_value(item, value);
if (i != -1) {
@@ -1546,7 +1555,7 @@ bool RNA_enum_identifier(EnumPropertyItem *item, const int value, const char **r
}
}
-int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const char **r_identifier)
+int RNA_enum_bitflag_identifiers(const EnumPropertyItem *item, const int value, const char **r_identifier)
{
int index = 0;
for (; item->identifier; item++) {
@@ -1558,7 +1567,7 @@ int RNA_enum_bitflag_identifiers(EnumPropertyItem *item, const int value, const
return index;
}
-bool RNA_enum_name(EnumPropertyItem *item, const int value, const char **r_name)
+bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
{
const int i = RNA_enum_from_value(item, value);
if (i != -1) {
@@ -1570,7 +1579,7 @@ bool RNA_enum_name(EnumPropertyItem *item, const int value, const char **r_name)
}
}
-bool RNA_enum_description(EnumPropertyItem *item, const int value, const char **r_description)
+bool RNA_enum_description(const EnumPropertyItem *item, const int value, const char **r_description)
{
const int i = RNA_enum_from_value(item, value);
if (i != -1) {
@@ -1582,7 +1591,7 @@ bool RNA_enum_description(EnumPropertyItem *item, const int value, const char **
}
}
-int RNA_enum_from_identifier(EnumPropertyItem *item, const char *identifier)
+int RNA_enum_from_identifier(const EnumPropertyItem *item, const char *identifier)
{
int i = 0;
for (; item->identifier; item++, i++) {
@@ -1593,7 +1602,7 @@ int RNA_enum_from_identifier(EnumPropertyItem *item, const char *identifier)
return -1;
}
-int RNA_enum_from_value(EnumPropertyItem *item, const int value)
+int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
{
int i = 0;
for (; item->identifier; item++, i++) {
@@ -1607,16 +1616,16 @@ int RNA_enum_from_value(EnumPropertyItem *item, const int value)
bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value,
const char **identifier)
{
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
bool free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
if (item) {
bool result;
result = RNA_enum_identifier(item, value, identifier);
- if (free)
- MEM_freeN(item);
-
+ if (free) {
+ MEM_freeN((void *)item);
+ }
return result;
}
return false;
@@ -1624,15 +1633,16 @@ bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *pro
bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name)
{
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
bool free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
if (item) {
bool result;
result = RNA_enum_name(item, value, name);
- if (free)
- MEM_freeN(item);
+ if (free) {
+ MEM_freeN((void *)item);
+ }
return result;
}
@@ -1660,7 +1670,7 @@ bool RNA_property_enum_item_from_value(
bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value,
EnumPropertyItem *r_item)
{
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
bool free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
@@ -1676,8 +1686,9 @@ bool RNA_property_enum_item_from_value(
result = false;
}
- if (free)
- MEM_freeN(item);
+ if (free) {
+ MEM_freeN((void *)item);
+ }
return result;
}
@@ -1704,7 +1715,7 @@ bool RNA_property_enum_item_from_value_gettexted(
int RNA_property_enum_bitflag_identifiers(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value,
const char **identifier)
{
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
bool free;
RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
@@ -1712,7 +1723,7 @@ int RNA_property_enum_bitflag_identifiers(bContext *C, PointerRNA *ptr, Property
int result;
result = RNA_enum_bitflag_identifiers(item, value, identifier);
if (free)
- MEM_freeN(item);
+ MEM_freeN((void *)item);
return result;
}
@@ -3058,7 +3069,7 @@ void *RNA_property_enum_py_data_get(PropertyRNA *prop)
*/
int RNA_property_enum_step(const bContext *C, PointerRNA *ptr, PropertyRNA *prop, int from_value, int step)
{
- EnumPropertyItem *item_array;
+ const EnumPropertyItem *item_array;
int totitem;
bool free;
int result_value = from_value;
@@ -3082,7 +3093,7 @@ int RNA_property_enum_step(const bContext *C, PointerRNA *ptr, PropertyRNA *prop
}
if (free) {
- MEM_freeN(item_array);
+ MEM_freeN((void *)item_array);
}
return result_value;
@@ -5356,7 +5367,7 @@ void RNA_enum_set_identifier(bContext *C, PointerRNA *ptr, const char *name, con
bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char *enumname)
{
PropertyRNA *prop = RNA_struct_find_property(ptr, name);
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
bool free;
if (prop) {
@@ -5370,7 +5381,7 @@ bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const cha
}
if (free) {
- MEM_freeN(item);
+ MEM_freeN((void *)item);
}
if (i != -1) {
@@ -5386,7 +5397,7 @@ bool RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const cha
}
}
-bool RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *r_value)
+bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value)
{
const int i = RNA_enum_from_identifier(item, identifier);
if (i != -1) {
@@ -5398,7 +5409,7 @@ bool RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int
}
}
-bool RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **r_identifier)
+bool RNA_enum_id_from_value(const EnumPropertyItem *item, int value, const char **r_identifier)
{
const int i = RNA_enum_from_value(item, value);
if (i != -1) {
@@ -5410,7 +5421,7 @@ bool RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **r_id
}
}
-bool RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *r_icon)
+bool RNA_enum_icon_from_value(const EnumPropertyItem *item, int value, int *r_icon)
{
const int i = RNA_enum_from_value(item, value);
if (i != -1) {
@@ -5422,7 +5433,7 @@ bool RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *r_icon)
}
}
-bool RNA_enum_name_from_value(EnumPropertyItem *item, int value, const char **r_name)
+bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name)
{
const int i = RNA_enum_from_value(item, value);
if (i != -1) {
@@ -5943,14 +5954,14 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
/* represent as a python set */
if (val) {
- EnumPropertyItem *item_array;
+ const EnumPropertyItem *item_array;
bool free;
BLI_dynstr_append(dynstr, "{");
RNA_property_enum_items(C, ptr, prop, &item_array, NULL, &free);
if (item_array) {
- EnumPropertyItem *item = item_array;
+ const EnumPropertyItem *item = item_array;
bool is_first = true;
for (; item->identifier; item++) {
if (item->identifier[0] && item->value & val) {
@@ -5960,7 +5971,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop, in
}
if (free) {
- MEM_freeN(item_array);
+ MEM_freeN((void *)item_array);
}
}
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 004acbe4dbd..26ec813a14f 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -47,7 +47,7 @@
#include "WM_types.h"
/* Always keep in alphabetical order */
-static EnumPropertyItem actuator_type_items[] = {
+static const EnumPropertyItem actuator_type_items[] = {
{ACT_ACTION, "ACTION", 0, "Action", ""},
{ACT_ARMATURE, "ARMATURE", 0, "Armature", ""},
{ACT_CAMERA, "CAMERA", 0, "Camera", ""},
@@ -432,7 +432,7 @@ static void rna_StateActuator_state_set(PointerRNA *ptr, const int *values)
}
/* Always keep in alphabetical order */
-EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
Object *ob = NULL;
@@ -579,7 +579,7 @@ static void rna_def_action_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_ACTION_PLAY, "PLAY", 0, "Play", ""},
{ACT_ACTION_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
{ACT_ACTION_FLIPPER, "FLIPPER", 0, "Flipper", ""},
@@ -592,7 +592,7 @@ static void rna_def_action_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_blend_items[] = {
+ static const EnumPropertyItem prop_blend_items[] = {
{ACT_ACTION_BLEND, "BLEND", 0, "Blend", ""},
{ACT_ACTION_ADD, "ADD", 0, "Add", ""},
{0, NULL, 0, NULL, NULL}
@@ -714,7 +714,7 @@ static void rna_def_object_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_OBJECT_NORMAL, "OBJECT_NORMAL", 0, "Simple Motion", ""},
{ACT_OBJECT_SERVO, "OBJECT_SERVO", 0, "Servo Control", ""},
{ACT_OBJECT_CHARACTER, "OBJECT_CHARACTER", 0, "Character Motion", ""},
@@ -915,7 +915,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_axis_items[] = {
+ static const EnumPropertyItem prop_axis_items[] = {
{OB_POSX, "POS_X", 0, "+X", "Camera tries to get behind the X axis"},
{OB_POSY, "POS_Y", 0, "+Y", "Camera tries to get behind the Y axis"},
{OB_NEGX, "NEG_X", 0, "-X", "Camera tries to get behind the -X axis"},
@@ -970,7 +970,7 @@ static void rna_def_sound_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_SND_PLAY_STOP_SOUND, "PLAYSTOP", 0, "Play Stop", ""},
{ACT_SND_PLAY_END_SOUND, "PLAYEND", 0, "Play End", ""},
{ACT_SND_LOOP_STOP_SOUND, "LOOPSTOP", 0, "Loop Stop", ""},
@@ -1072,7 +1072,7 @@ static void rna_def_property_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_PROP_ASSIGN, "ASSIGN", 0, "Assign", ""},
{ACT_PROP_ADD, "ADD", 0, "Add", ""},
{ACT_PROP_COPY, "COPY", 0, "Copy", ""},
@@ -1120,7 +1120,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_CONST_TYPE_LOC, "LOC", 0, "Location Constraint", ""},
{ACT_CONST_TYPE_DIST, "DIST", 0, "Distance Constraint", ""},
{ACT_CONST_TYPE_ORI, "ORI", 0, "Orientation Constraint", ""},
@@ -1128,7 +1128,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_limit_items[] = {
+ static const EnumPropertyItem prop_limit_items[] = {
{ACT_CONST_NONE, "NONE", 0, "None", ""},
{ACT_CONST_LOCX, "LOCX", 0, "Loc X", ""},
{ACT_CONST_LOCY, "LOCY", 0, "Loc Y", ""},
@@ -1136,7 +1136,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_direction_items[] = {
+ static const EnumPropertyItem prop_direction_items[] = {
{ACT_CONST_NONE, "NONE", 0, "None", ""},
{ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""},
{ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""},
@@ -1147,7 +1147,7 @@ static void rna_def_constraint_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_direction_pos_items[] = {
+ static const EnumPropertyItem prop_direction_pos_items[] = {
{ACT_CONST_NONE, "NONE", 0, "None", ""},
{ACT_CONST_DIRPX, "DIRPX", 0, "X axis", ""},
{ACT_CONST_DIRPY, "DIRPY", 0, "Y axis", ""},
@@ -1339,7 +1339,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_dyn_items[] = {
+ static const EnumPropertyItem prop_dyn_items[] = {
{ACT_EDOB_RESTORE_DYN, "RESTOREDYN", 0, "Restore Dynamics", ""},
{ACT_EDOB_SUSPEND_DYN, "SUSPENDDYN", 0, "Suspend Dynamics", ""},
{ACT_EDOB_ENABLE_RB, "ENABLERIGIDBODY", 0, "Enable Rigid Body", ""},
@@ -1348,7 +1348,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_EDOB_ADD_OBJECT, "ADDOBJECT", 0, "Add Object", ""},
{ACT_EDOB_END_OBJECT, "ENDOBJECT", 0, "End Object", ""},
{ACT_EDOB_REPLACE_MESH, "REPLACEMESH", 0, "Replace Mesh", ""},
@@ -1357,7 +1357,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_track_axis_items[] = {
+ static const EnumPropertyItem prop_track_axis_items[] = {
{ACT_TRACK_TRAXIS_X, "TRACKAXISX", 0, "X axis", ""},
{ACT_TRACK_TRAXIS_Y, "TRACKAXISY", 0, "Y axis", ""},
{ACT_TRACK_TRAXIS_Z, "TRACKAXISZ", 0, "Z axis", ""},
@@ -1367,7 +1367,7 @@ static void rna_def_edit_object_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_up_axis_items[] = {
+ static const EnumPropertyItem prop_up_axis_items[] = {
{ACT_TRACK_UP_X, "UPAXISX", 0, "X axis", ""},
{ACT_TRACK_UP_Y, "UPAXISY", 0, "Y axis", ""},
{ACT_TRACK_UP_Z, "UPAXISZ", 0, "Z axis", ""},
@@ -1484,7 +1484,7 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_SCENE_RESTART, "RESTART", 0, "Restart", ""},
{ACT_SCENE_SET, "SET", 0, "Set Scene", ""},
{ACT_SCENE_CAMERA, "CAMERA", 0, "Set Camera", ""},
@@ -1525,7 +1525,7 @@ static void rna_def_random_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_distribution_items[] = {
+ static const EnumPropertyItem prop_distribution_items[] = {
{ACT_RANDOM_BOOL_CONST, "BOOL_CONSTANT", 0, "Bool Constant", ""},
{ACT_RANDOM_BOOL_UNIFORM, "BOOL_UNIFORM", 0, "Bool Uniform", ""},
{ACT_RANDOM_BOOL_BERNOUILLI, "BOOL_BERNOUILLI", 0, "Bool Bernoulli", ""},
@@ -1653,7 +1653,7 @@ static void rna_def_message_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_body_type_items[] = {
+ static const EnumPropertyItem prop_body_type_items[] = {
{ACT_MESG_MESG, "TEXT", 0, "Text", ""},
{ACT_MESG_PROP, "PROPERTY", 0, "Property", ""},
{0, NULL, 0, NULL, NULL}
@@ -1696,7 +1696,7 @@ static void rna_def_game_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
/* {ACT_GAME_LOAD, "LOAD", 0, "Load Game", ""}, */
/* {ACT_GAME_START, "START", 0, "Start Loaded Game", ""}, */
/* keeping the load/start hacky for compatibility with 2.49 */
@@ -1765,7 +1765,7 @@ static void rna_def_twodfilter_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_2DFILTER_ENABLED, "ENABLE", 0, "Enable Filter", ""},
{ACT_2DFILTER_DISABLED, "DISABLE", 0, "Disable Filter", ""},
{ACT_2DFILTER_NOFILTER, "REMOVE", 0, "Remove Filter", ""},
@@ -1826,7 +1826,7 @@ static void rna_def_parent_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_PARENT_SET, "SETPARENT", 0, "Set Parent", ""},
{ACT_PARENT_REMOVE, "REMOVEPARENT", 0, "Remove Parent", ""},
{0, NULL, 0, NULL, NULL}
@@ -1868,7 +1868,7 @@ static void rna_def_state_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_STATE_SET, "SET", 0, "Set State", ""},
{ACT_STATE_ADD, "ADD", 0, "Add State", ""},
{ACT_STATE_REMOVE, "REMOVE", 0, "Remove State", ""},
@@ -1898,7 +1898,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_ARM_RUN, "RUN", 0, "Run Armature", ""},
{ACT_ARM_ENABLE, "ENABLE", 0, "Enable", ""},
{ACT_ARM_DISABLE, "DISABLE", 0, "Disable", ""},
@@ -1961,14 +1961,14 @@ static void rna_def_steering_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_STEERING_SEEK, "SEEK", 0, "Seek", ""},
{ACT_STEERING_FLEE, "FLEE", 0, "Flee", ""},
{ACT_STEERING_PATHFOLLOWING, "PATHFOLLOWING", 0, "Path following", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem facingaxis_items[] = {
+ static const EnumPropertyItem facingaxis_items[] = {
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
{3, "Z", 0, "Z", ""},
@@ -2070,13 +2070,13 @@ static void rna_def_mouse_actuator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{ACT_MOUSE_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
{ACT_MOUSE_LOOK, "LOOK", 0, "Look", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_object_axis_items[] = {
+ static const EnumPropertyItem prop_object_axis_items[] = {
{ACT_MOUSE_OBJECT_AXIS_X, "OBJECT_AXIS_X", 0, "X Axis", ""},
{ACT_MOUSE_OBJECT_AXIS_Y, "OBJECT_AXIS_Y", 0, "Y Axis", ""},
{ACT_MOUSE_OBJECT_AXIS_Z, "OBJECT_AXIS_Z", 0, "Z Axis", ""},
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 1f5ddddb74f..6e436b8ff32 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -47,7 +47,7 @@
#include "ED_keyframing.h"
/* exported for use in API */
-EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = {
+const EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = {
{KSP_GROUP_NAMED, "NAMED", 0, "Named Group", ""},
{KSP_GROUP_NONE, "NONE", 0, "None", ""},
{KSP_GROUP_KSNAME, "KEYINGSET", 0, "Keying Set Name", ""},
@@ -57,7 +57,7 @@ EnumPropertyItem rna_enum_keyingset_path_grouping_items[] = {
/* It would be cool to get rid of this 'INSERTKEY_' prefix in 'py strings' values, but it would break existing
* exported keyingset... :/
*/
-EnumPropertyItem rna_enum_keying_flag_items[] = {
+const EnumPropertyItem rna_enum_keying_flag_items[] = {
{INSERTKEY_NEEDED, "INSERTKEY_NEEDED", 0, "Only Needed",
"Only insert keyframes where they're needed in the relevant F-Curves"},
{INSERTKEY_MATRIX, "INSERTKEY_VISUAL", 0, "Visual Keying",
diff --git a/source/blender/makesrna/intern/rna_animviz.c b/source/blender/makesrna/intern/rna_animviz.c
index eea24bfb1e0..0ae07874853 100644
--- a/source/blender/makesrna/intern/rna_animviz.c
+++ b/source/blender/makesrna/intern/rna_animviz.c
@@ -43,7 +43,7 @@
/* Which part of bone(s) get baked */
// TODO: icons?
-EnumPropertyItem rna_enum_motionpath_bake_location_items[] = {
+const EnumPropertyItem rna_enum_motionpath_bake_location_items[] = {
{MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
{0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
//{MOTIONPATH_BAKE_CENTERS, "CENTROID", 0, "Centers", "Calculate bone paths from center of mass"},
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index a2c5d90b91e..2ed147a75cf 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -975,7 +975,7 @@ static void rna_def_armature(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem prop_drawtype_items[] = {
+ static const EnumPropertyItem prop_drawtype_items[] = {
{ARM_OCTA, "OCTAHEDRAL", 0, "Octahedral", "Display bones as octahedral shape (default)"},
{ARM_LINE, "STICK", 0, "Stick", "Display bones as simple 2D lines with dots"},
{ARM_B_BONE, "BBONE", 0, "B-Bone", "Display bones as boxes, showing subdivision and B-Splines"},
@@ -984,12 +984,12 @@ static void rna_def_armature(BlenderRNA *brna)
{ARM_WIRE, "WIRE", 0, "Wire", "Display bones as thin wires, showing subdivision and B-Splines"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_vdeformer[] = {
+ static const EnumPropertyItem prop_vdeformer[] = {
{ARM_VDEF_BLENDER, "BLENDER", 0, "Blender", "Use Blender's armature vertex deformation"},
{ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Use vertex deformation code optimized for the BGE"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_ghost_type_items[] = {
+ static const EnumPropertyItem prop_ghost_type_items[] = {
{ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame",
"Display Ghosts of poses within a fixed number of frames around the current frame"},
{ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range"},
diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c
index cee2b7ed9bc..98ca58e0edd 100644
--- a/source/blender/makesrna/intern/rna_boid.c
+++ b/source/blender/makesrna/intern/rna_boid.c
@@ -48,7 +48,7 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem rna_enum_boidrule_type_items[] = {
+const EnumPropertyItem rna_enum_boidrule_type_items[] = {
{eBoidRuleType_Goal, "GOAL", 0, "Goal", "Go to assigned object or loudest assigned signal source"},
{eBoidRuleType_Avoid, "AVOID", 0, "Avoid", "Get away from assigned object or loudest assigned signal source"},
{eBoidRuleType_AvoidCollision, "AVOID_COLLISION", 0, "Avoid Collision",
@@ -71,7 +71,7 @@ EnumPropertyItem rna_enum_boidrule_type_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem boidruleset_type_items[] = {
+static const 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)"},
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index db86bda41ff..b7d108fc769 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -43,13 +43,13 @@
#include "WM_types.h"
-static EnumPropertyItem prop_direction_items[] = {
+static const EnumPropertyItem prop_direction_items[] = {
{0, "ADD", 0, "Add", "Add effect of brush"},
{BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem sculpt_stroke_method_items[] = {
+static const EnumPropertyItem sculpt_stroke_method_items[] = {
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
{BRUSH_DRAG_DOT, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
{BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"},
@@ -62,7 +62,7 @@ static EnumPropertyItem sculpt_stroke_method_items[] = {
};
-EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
+const EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
{SCULPT_TOOL_BLOB, "BLOB", ICON_BRUSH_BLOB, "Blob", ""},
{SCULPT_TOOL_CLAY, "CLAY", ICON_BRUSH_CLAY, "Clay", ""},
{SCULPT_TOOL_CLAY_STRIPS, "CLAY_STRIPS", ICON_BRUSH_CLAY_STRIPS, "Clay Strips", ""},
@@ -86,7 +86,7 @@ EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
};
-EnumPropertyItem rna_enum_brush_vertex_tool_items[] = {
+const EnumPropertyItem rna_enum_brush_vertex_tool_items[] = {
{PAINT_BLEND_MIX, "MIX", ICON_BRUSH_MIX, "Mix", "Use mix blending mode while painting"},
{PAINT_BLEND_ADD, "ADD", ICON_BRUSH_ADD, "Add", "Use add blending mode while painting"},
{PAINT_BLEND_SUB, "SUB", ICON_BRUSH_SUBTRACT, "Subtract", "Use subtract blending mode while painting"},
@@ -112,7 +112,7 @@ EnumPropertyItem rna_enum_brush_vertex_tool_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_brush_image_tool_items[] = {
+const EnumPropertyItem rna_enum_brush_image_tool_items[] = {
{PAINT_TOOL_DRAW, "DRAW", ICON_BRUSH_TEXDRAW, "Draw", ""},
{PAINT_TOOL_SOFTEN, "SOFTEN", ICON_BRUSH_SOFTEN, "Soften", ""},
{PAINT_TOOL_SMEAR, "SMEAR", ICON_BRUSH_SMEAR, "Smear", ""},
@@ -486,48 +486,48 @@ static void rna_Brush_set_unprojected_radius(PointerRNA *ptr, float value)
brush->unprojected_radius = value;
}
-static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr,
+static const EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
- static EnumPropertyItem prop_default_items[] = {
+ static const EnumPropertyItem prop_default_items[] = {
{0, NULL, 0, NULL, NULL}
};
/* sculpt mode */
- static EnumPropertyItem prop_flatten_contrast_items[] = {
+ static const EnumPropertyItem prop_flatten_contrast_items[] = {
{0, "FLATTEN", 0, "Flatten", "Add effect of brush"},
{BRUSH_DIR_IN, "CONTRAST", 0, "Contrast", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_fill_deepen_items[] = {
+ static const EnumPropertyItem prop_fill_deepen_items[] = {
{0, "FILL", 0, "Fill", "Add effect of brush"},
{BRUSH_DIR_IN, "DEEPEN", 0, "Deepen", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_scrape_peaks_items[] = {
+ static const EnumPropertyItem prop_scrape_peaks_items[] = {
{0, "SCRAPE", 0, "Scrape", "Add effect of brush"},
{BRUSH_DIR_IN, "PEAKS", 0, "Peaks", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_pinch_magnify_items[] = {
+ static const EnumPropertyItem prop_pinch_magnify_items[] = {
{0, "PINCH", 0, "Pinch", "Add effect of brush"},
{BRUSH_DIR_IN, "MAGNIFY", 0, "Magnify", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_inflate_deflate_items[] = {
+ static const EnumPropertyItem prop_inflate_deflate_items[] = {
{0, "INFLATE", 0, "Inflate", "Add effect of brush"},
{BRUSH_DIR_IN, "DEFLATE", 0, "Deflate", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}
};
/* texture paint mode */
- static EnumPropertyItem prop_soften_sharpen_items[] = {
+ static const EnumPropertyItem prop_soften_sharpen_items[] = {
{0, "SOFTEN", 0, "Soften", "Blur effect of brush"},
{BRUSH_DIR_IN, "SHARPEN", 0, "Sharpen", "Sharpen effect of brush"},
{0, NULL, 0, NULL, NULL}
@@ -592,12 +592,12 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr,
}
}
-static EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
- static EnumPropertyItem brush_stroke_method_items[] = {
+ static const EnumPropertyItem brush_stroke_method_items[] = {
{0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
{BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"},
{BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect while holding mouse (spray)"},
@@ -623,7 +623,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_map_mode_items[] = {
+ static const EnumPropertyItem prop_map_mode_items[] = {
{MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
{MTEX_MAP_MODE_AREA, "AREA_PLANE", 0, "Area Plane", ""},
{MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
@@ -633,7 +633,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_tex_paint_map_mode_items[] = {
+ static const EnumPropertyItem prop_tex_paint_map_mode_items[] = {
{MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
{MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
{MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
@@ -642,7 +642,7 @@ static void rna_def_brush_texture_slot(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mask_paint_map_mode_items[] = {
+ static const EnumPropertyItem prop_mask_paint_map_mode_items[] = {
{MTEX_MAP_MODE_VIEW, "VIEW_PLANE", 0, "View Plane", ""},
{MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
{MTEX_MAP_MODE_RANDOM, "RANDOM", 0, "Random", ""},
@@ -815,7 +815,7 @@ static void rna_def_brush(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_blend_items[] = {
+ static const EnumPropertyItem prop_blend_items[] = {
{IMB_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting"},
{IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting"},
{IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting"},
@@ -843,7 +843,7 @@ static void rna_def_brush(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem brush_sculpt_plane_items[] = {
+ static const EnumPropertyItem brush_sculpt_plane_items[] = {
{SCULPT_DISP_DIR_AREA, "AREA", 0, "Area Plane", ""},
{SCULPT_DISP_DIR_VIEW, "VIEW", 0, "View Plane", ""},
{SCULPT_DISP_DIR_X, "X", 0, "X Plane", ""},
@@ -852,32 +852,32 @@ static void rna_def_brush(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem brush_mask_tool_items[] = {
+ static const EnumPropertyItem brush_mask_tool_items[] = {
{BRUSH_MASK_DRAW, "DRAW", 0, "Draw", ""},
{BRUSH_MASK_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem brush_blur_mode_items[] = {
+ static const EnumPropertyItem brush_blur_mode_items[] = {
{KERNEL_BOX, "BOX", 0, "Box", ""},
{KERNEL_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem brush_gradient_items[] = {
+ static const EnumPropertyItem brush_gradient_items[] = {
{BRUSH_GRADIENT_PRESSURE, "PRESSURE", 0, "Pressure", ""},
{BRUSH_GRADIENT_SPACING_REPEAT, "SPACING_REPEAT", 0, "Repeat", ""},
{BRUSH_GRADIENT_SPACING_CLAMP, "SPACING_CLAMP", 0, "Clamp", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem brush_gradient_fill_items[] = {
+ static const EnumPropertyItem brush_gradient_fill_items[] = {
{BRUSH_GRADIENT_LINEAR, "LINEAR", 0, "Linear", ""},
{BRUSH_GRADIENT_RADIAL, "RADIAL", 0, "Radial", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem brush_mask_pressure_items[] = {
+ static const EnumPropertyItem brush_mask_pressure_items[] = {
{0, "NONE", 0, "Off", ""},
{BRUSH_MASK_PRESSURE_RAMP, "RAMP", ICON_STYLUS_PRESSURE, "Ramp", ""},
{BRUSH_MASK_PRESSURE_CUTOFF, "CUTOFF", ICON_STYLUS_PRESSURE, "Cutoff", ""},
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 1127940de44..c0d487ddbf6 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -103,14 +103,14 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem convergence_mode_items[] = {
+ static const EnumPropertyItem convergence_mode_items[] = {
{CAM_S3D_OFFAXIS, "OFFAXIS", 0, "Off-Axis", "Off-axis frustums converging in a plane"},
{CAM_S3D_PARALLEL, "PARALLEL", 0, "Parallel", "Parallel cameras with no convergence"},
{CAM_S3D_TOE, "TOE", 0, "Toe-in", "Rotated cameras, looking at the convergence distance"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem pivot_items[] = {
+ static const EnumPropertyItem pivot_items[] = {
{CAM_S3D_PIVOT_LEFT, "LEFT", 0, "Left", ""},
{CAM_S3D_PIVOT_RIGHT, "RIGHT", 0, "Right", ""},
{CAM_S3D_PIVOT_CENTER, "CENTER", 0, "Center", ""},
@@ -177,13 +177,13 @@ void RNA_def_camera(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{CAM_PERSP, "PERSP", 0, "Perspective", ""},
{CAM_ORTHO, "ORTHO", 0, "Orthographic", ""},
{CAM_PANO, "PANO", 0, "Panoramic", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_draw_type_extra_items[] = {
+ static const EnumPropertyItem prop_draw_type_extra_items[] = {
{CAM_DTX_CENTER, "CENTER", 0, "Center", ""},
{CAM_DTX_CENTER_DIAG, "CENTER_DIAGONAL", 0, "Center Diagonal", ""},
{CAM_DTX_THIRDS, "THIRDS", 0, "Thirds", ""},
@@ -194,12 +194,12 @@ void RNA_def_camera(BlenderRNA *brna)
{CAM_DTX_HARMONY_TRI_B, "HARMONY_TRIANGLE_B", 0, "Harmonious Triangle B", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_lens_unit_items[] = {
+ static const EnumPropertyItem prop_lens_unit_items[] = {
{0, "MILLIMETERS", 0, "Millimeters", "Specify the lens in millimeters"},
{CAM_ANGLETOGGLE, "FOV", 0, "Field of View", "Specify the lens as the field of view's angle"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem sensor_fit_items[] = {
+ static const EnumPropertyItem sensor_fit_items[] = {
{CAMERA_SENSOR_FIT_AUTO, "AUTO", 0, "Auto", "Fit to the sensor width or height depending on image resolution"},
{CAMERA_SENSOR_FIT_HOR, "HORIZONTAL", 0, "Horizontal", "Fit to the sensor width"},
{CAMERA_SENSOR_FIT_VERT, "VERTICAL", 0, "Vertical", "Fit to the sensor height"},
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index effd140ab15..3d1a1458102 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -292,7 +292,7 @@ static void rna_def_cloth_solver_result(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem status_items[] = {
+ static const EnumPropertyItem status_items[] = {
{BPH_SOLVER_SUCCESS, "SUCCESS", 0, "Success", "Computation was successful"},
{BPH_SOLVER_NUMERICAL_ISSUE, "NUMERICAL_ISSUE", 0, "Numerical Issue", "The provided data did not satisfy the prerequisites"},
{BPH_SOLVER_NO_CONVERGENCE, "NO_CONVERGENCE", 0, "No Convergence", "Iterative procedure did not converge"},
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 4d9dcdf0fce..ad2586635c9 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -421,7 +421,7 @@ static void rna_ColorManagedDisplaySettings_display_device_set(struct PointerRNA
}
}
-static EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf(
+static const EnumPropertyItem *rna_ColorManagedDisplaySettings_display_device_itemf(
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *items = NULL;
@@ -475,7 +475,7 @@ static void rna_ColorManagedViewSettings_view_transform_set(PointerRNA *ptr, int
}
}
-static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(
+static const EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(
bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Scene *scene = CTX_data_scene(C);
@@ -508,7 +508,7 @@ static void rna_ColorManagedViewSettings_look_set(PointerRNA *ptr, int value)
}
}
-static EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf(
+static const EnumPropertyItem *rna_ColorManagedViewSettings_look_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
ColorManagedViewSettings *view = (ColorManagedViewSettings *) ptr->data;
@@ -561,7 +561,7 @@ static void rna_ColorManagedColorspaceSettings_colorspace_set(struct PointerRNA
}
}
-static EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf(
+static const EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_itemf(
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *items = NULL;
@@ -690,7 +690,7 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_handle_type_items[] = {
+ static const EnumPropertyItem prop_handle_type_items[] = {
{0, "AUTO", 0, "Auto Handle", ""},
{CUMA_HANDLE_AUTO_ANIM, "AUTO_CLAMPED", 0, "Auto Clamped Handle", ""},
{CUMA_HANDLE_VECTOR, "VECTOR", 0, "Vector Handle", ""},
@@ -749,7 +749,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
PropertyRNA *prop, *parm;
FunctionRNA *func;
- static EnumPropertyItem prop_extend_items[] = {
+ static const EnumPropertyItem prop_extend_items[] = {
{0, "HORIZONTAL", 0, "Horizontal", ""},
{CUMA_EXTEND_EXTRAPOLATE, "EXTRAPOLATED", 0, "Extrapolated", ""},
{0, NULL, 0, NULL, NULL}
@@ -912,7 +912,7 @@ static void rna_def_color_ramp(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem prop_interpolation_items[] = {
+ static const EnumPropertyItem prop_interpolation_items[] = {
{COLBAND_INTERP_EASE, "EASE", 0, "Ease", ""},
{COLBAND_INTERP_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
{COLBAND_INTERP_LINEAR, "LINEAR", 0, "Linear", ""},
@@ -921,14 +921,14 @@ static void rna_def_color_ramp(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mode_items[] = {
+ static const EnumPropertyItem prop_mode_items[] = {
{COLBAND_BLEND_RGB, "RGB", 0, "RGB", ""},
{COLBAND_BLEND_HSV, "HSV", 0, "HSV", ""},
{COLBAND_BLEND_HSL, "HSL", 0, "HSL", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_hsv_items[] = {
+ static const EnumPropertyItem prop_hsv_items[] = {
{COLBAND_HUE_NEAR, "NEAR", 0, "Near", ""},
{COLBAND_HUE_FAR, "FAR", 0, "Far", ""},
{COLBAND_HUE_CW, "CW", 0, "Clockwise", ""},
@@ -992,7 +992,7 @@ static void rna_def_histogram(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static const EnumPropertyItem prop_mode_items[] = {
{HISTO_MODE_LUMA, "LUMA", 0, "Luma", "Luma"},
{HISTO_MODE_RGB, "RGB", 0, "RGB", "Red Green Blue"},
{HISTO_MODE_R, "R", 0, "R", "Red"},
@@ -1021,7 +1021,7 @@ static void rna_def_scopes(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_wavefrm_mode_items[] = {
+ static const EnumPropertyItem prop_wavefrm_mode_items[] = {
{SCOPES_WAVEFRM_LUMA, "LUMA", ICON_COLOR, "Luma", ""},
{SCOPES_WAVEFRM_RGB_PARADE, "PARADE", ICON_COLOR, "Parade", ""},
{SCOPES_WAVEFRM_YCC_601, "YCBCR601", ICON_COLOR, "YCbCr (ITU 601)", ""},
@@ -1073,22 +1073,22 @@ static void rna_def_colormanage(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem display_device_items[] = {
+ static const EnumPropertyItem display_device_items[] = {
{0, "DEFAULT", 0, "Default", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem look_items[] = {
+ static const EnumPropertyItem look_items[] = {
{0, "NONE", 0, "None", "Do not modify image in an artistic manner"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem view_transform_items[] = {
+ static const EnumPropertyItem view_transform_items[] = {
{0, "NONE", 0, "None", "Do not perform any color transform on display, use old non-color managed technique for display"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem color_space_items[] = {
+ static const EnumPropertyItem color_space_items[] = {
{0, "NONE", 0, "None", "Do not perform any color transform on load, treat colors as in scene linear space already"},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 8ecbd438c2e..8eb6bc1261e 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -46,7 +46,7 @@
#include "ED_object.h"
/* please keep the names in sync with constraint.c */
-EnumPropertyItem rna_enum_constraint_type_items[] = {
+const EnumPropertyItem rna_enum_constraint_type_items[] = {
{0, "", 0, N_("Motion Tracking"), ""},
{CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""},
{CONSTRAINT_TYPE_FOLLOWTRACK, "FOLLOW_TRACK", ICON_CONSTRAINT_DATA, "Follow Track", ""},
@@ -109,7 +109,7 @@ EnumPropertyItem rna_enum_constraint_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem target_space_pchan_items[] = {
+static const EnumPropertyItem target_space_pchan_items[] = {
{CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space",
"The transformation of the target is evaluated relative to the world "
"coordinate system"},
@@ -125,7 +125,7 @@ static EnumPropertyItem target_space_pchan_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem owner_space_pchan_items[] = {
+static const EnumPropertyItem owner_space_pchan_items[] = {
{CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space",
"The constraint is applied relative to the world coordinate system"},
{CONSTRAINT_SPACE_POSE, "POSE", 0, "Pose Space",
@@ -140,7 +140,7 @@ static EnumPropertyItem owner_space_pchan_items[] = {
#ifdef RNA_RUNTIME
-static EnumPropertyItem space_object_items[] = {
+static const EnumPropertyItem space_object_items[] = {
{CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space",
"The transformation of the target is evaluated relative to the world coordinate system"},
{CONSTRAINT_SPACE_LOCAL, "LOCAL", 0, "Local Space",
@@ -315,7 +315,7 @@ static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value)
}
}
-static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
Object *ob = (Object *)ptr->id.data;
@@ -327,7 +327,7 @@ static EnumPropertyItem *rna_Constraint_owner_space_itemf(bContext *UNUSED(C), P
return space_object_items;
}
-static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
bConstraint *con = (bConstraint *)ptr->data;
@@ -493,7 +493,7 @@ static void rna_Constraint_transformCache_object_path_update(Main *bmain, Scene
#else
-static EnumPropertyItem constraint_distance_items[] = {
+static const 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"},
@@ -658,13 +658,13 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem constraint_ik_axisref_items[] = {
+ static const EnumPropertyItem constraint_ik_axisref_items[] = {
{0, "BONE", 0, "Bone", ""},
{CONSTRAINT_IK_TARGETAXIS, "TARGET", 0, "Target", ""},
{0, NULL, 0, NULL, NULL},
};
- static EnumPropertyItem constraint_ik_type_items[] = {
+ static const EnumPropertyItem constraint_ik_type_items[] = {
{CONSTRAINT_IK_COPYPOSE, "COPY_POSE", 0, "Copy Pose", ""},
{CONSTRAINT_IK_DISTANCE, "DISTANCE", 0, "Distance", ""},
{0, NULL, 0, NULL, NULL},
@@ -806,7 +806,7 @@ static void rna_def_constraint_track_to(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem track_items[] = {
+ static const EnumPropertyItem track_items[] = {
{TRACK_X, "TRACK_X", 0, "X", ""},
{TRACK_Y, "TRACK_Y", 0, "Y", ""},
{TRACK_Z, "TRACK_Z", 0, "Z", ""},
@@ -816,7 +816,7 @@ static void rna_def_constraint_track_to(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem up_items[] = {
+ static const EnumPropertyItem up_items[] = {
{TRACK_X, "UP_X", 0, "X", ""},
{TRACK_Y, "UP_Y", 0, "Y", ""},
{TRACK_Z, "UP_Z", 0, "Z", ""},
@@ -1022,7 +1022,7 @@ static void rna_def_constraint_same_volume(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem volume_items[] = {
+ static const EnumPropertyItem volume_items[] = {
{SAMEVOL_X, "SAMEVOL_X", 0, "X", ""},
{SAMEVOL_Y, "SAMEVOL_Y", 0, "Y", ""},
{SAMEVOL_Z, "SAMEVOL_Z", 0, "Z", ""},
@@ -1076,7 +1076,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem minmax_items[] = {
+ static const EnumPropertyItem minmax_items[] = {
{TRACK_X, "FLOOR_X", 0, "X", ""},
{TRACK_Y, "FLOOR_Y", 0, "Y", ""},
{TRACK_Z, "FLOOR_Z", 0, "Z", ""},
@@ -1128,7 +1128,7 @@ static void rna_def_constraint_action(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem transform_channel_items[] = {
+ static const EnumPropertyItem transform_channel_items[] = {
{20, "LOCATION_X", 0, "X Location", ""},
{21, "LOCATION_Y", 0, "Y Location", ""},
{22, "LOCATION_Z", 0, "Z Location", ""},
@@ -1209,7 +1209,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem locktrack_items[] = {
+ static const EnumPropertyItem locktrack_items[] = {
{TRACK_X, "TRACK_X", 0, "X", ""},
{TRACK_Y, "TRACK_Y", 0, "Y", ""},
{TRACK_Z, "TRACK_Z", 0, "Z", ""},
@@ -1219,7 +1219,7 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem lock_items[] = {
+ static const EnumPropertyItem lock_items[] = {
{TRACK_X, "LOCK_X", 0, "X", ""},
{TRACK_Y, "LOCK_Y", 0, "Y", ""},
{TRACK_Z, "LOCK_Z", 0, "Z", ""},
@@ -1263,7 +1263,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem forwardpath_items[] = {
+ static const EnumPropertyItem forwardpath_items[] = {
{TRACK_X, "FORWARD_X", 0, "X", ""},
{TRACK_Y, "FORWARD_Y", 0, "Y", ""},
{TRACK_Z, "FORWARD_Z", 0, "Z", ""},
@@ -1273,7 +1273,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem pathup_items[] = {
+ static const EnumPropertyItem pathup_items[] = {
{TRACK_X, "UP_X", 0, "X", ""},
{TRACK_Y, "UP_Y", 0, "Y", ""},
{TRACK_Z, "UP_Z", 0, "Z", ""},
@@ -1337,7 +1337,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem volume_items[] = {
+ static const EnumPropertyItem volume_items[] = {
{VOLUME_XZ, "VOLUME_XZX", 0, "XZ", ""},
{VOLUME_X, "VOLUME_X", 0, "X", ""},
{VOLUME_Z, "VOLUME_Z", 0, "Z", ""},
@@ -1345,7 +1345,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem plane_items[] = {
+ static const EnumPropertyItem plane_items[] = {
{PLANE_X, "PLANE_X", 0, "X", "Keep X Axis"},
{PLANE_Z, "PLANE_Z", 0, "Z", "Keep Z Axis"},
{0, NULL, 0, NULL, NULL}
@@ -1424,7 +1424,7 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem pivot_items[] = {
+ static const EnumPropertyItem pivot_items[] = {
{CONSTRAINT_RB_BALL, "BALL", 0, "Ball", "Allow rotations around all axes"},
{CONSTRAINT_RB_HINGE, "HINGE", 0, "Hinge", "Work in one plane, allow rotations around one axis only"},
{CONSTRAINT_RB_CONETWIST, "CONE_TWIST", 0, "Cone Twist",
@@ -1596,7 +1596,7 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem clamp_items[] = {
+ static const EnumPropertyItem clamp_items[] = {
{CLAMPTO_AUTO, "CLAMPTO_AUTO", 0, "Auto", ""},
{CLAMPTO_X, "CLAMPTO_X", 0, "X", ""},
{CLAMPTO_Y, "CLAMPTO_Y", 0, "Y", ""},
@@ -1633,7 +1633,7 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem transform_items[] = {
+ static const EnumPropertyItem transform_items[] = {
{TRANS_LOCATION, "LOCATION", 0, "Loc", ""},
{TRANS_ROTATION, "ROTATION", 0, "Rot", ""},
{TRANS_SCALE, "SCALE", 0, "Scale", ""},
@@ -2184,7 +2184,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACE", 0, "Nearest Surface Point",
"Shrink the location to the nearest target surface"},
{MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project",
@@ -2243,7 +2243,7 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem damptrack_items[] = {
+ static const EnumPropertyItem damptrack_items[] = {
{TRACK_X, "TRACK_X", 0, "X", ""},
{TRACK_Y, "TRACK_Y", 0, "Y", ""},
{TRACK_Z, "TRACK_Z", 0, "Z", ""},
@@ -2284,7 +2284,7 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem splineik_xz_scale_mode[] = {
+ static const EnumPropertyItem splineik_xz_scale_mode[] = {
{CONSTRAINT_SPLINEIK_XZS_NONE, "NONE", 0, "None", "Don't scale the X and Z axes (Default)"},
{CONSTRAINT_SPLINEIK_XZS_ORIGINAL, "BONE_ORIGINAL", 0, "Bone Original",
"Use the original scaling of the bones"},
@@ -2397,7 +2397,7 @@ static void rna_def_constraint_pivot(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem pivot_rotAxis_items[] = {
+ static const EnumPropertyItem pivot_rotAxis_items[] = {
{PIVOTCON_AXIS_NONE, "ALWAYS_ACTIVE", 0, "Always", "Use the pivot point in every rotation"},
{PIVOTCON_AXIS_X_NEG, "NX", 0, "-X Rot",
"Use the pivot point in the negative rotation range around the X-axis"},
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index 7be3dd60d52..39f050924f4 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -196,7 +196,7 @@ void RNA_def_context(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem mode_items[] = {
+ static const EnumPropertyItem mode_items[] = {
{CTX_MODE_EDIT_MESH, "EDIT_MESH", 0, "Mesh Edit", ""},
{CTX_MODE_EDIT_CURVE, "EDIT_CURVE", 0, "Curve Edit", ""},
{CTX_MODE_EDIT_SURFACE, "EDIT_SURFACE", 0, "Surface Edit", ""},
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 3fa9d7ef270..bdb3daedebb 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -41,7 +41,7 @@
#include "WM_types.h"
-EnumPropertyItem rna_enum_controller_type_items[] = {
+const EnumPropertyItem rna_enum_controller_type_items[] = {
{CONT_LOGIC_AND, "LOGIC_AND", 0, "And", "Logic And"},
{CONT_LOGIC_OR, "LOGIC_OR", 0, "Or", "Logic Or"},
{CONT_LOGIC_NAND, "LOGIC_NAND", 0, "Nand", "Logic Nand"},
@@ -190,7 +190,7 @@ void RNA_def_controller(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem python_controller_modes[] = {
+ static const EnumPropertyItem python_controller_modes[] = {
{CONT_PY_SCRIPT, "SCRIPT", 0, "Script", ""},
{CONT_PY_MODULE, "MODULE", 0, "Module", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 50938eb75dc..894af338c12 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -47,7 +47,7 @@
#include "WM_types.h"
#ifndef RNA_RUNTIME
-static EnumPropertyItem beztriple_handle_type_items[] = {
+static const EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
@@ -56,7 +56,7 @@ static EnumPropertyItem beztriple_handle_type_items[] = {
};
#endif
-EnumPropertyItem rna_enum_keyframe_handle_type_items[] = {
+const EnumPropertyItem rna_enum_keyframe_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
@@ -65,7 +65,7 @@ EnumPropertyItem rna_enum_keyframe_handle_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
+const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
/* interpolation */
{0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"},
{BEZT_IPO_CONST, "CONSTANT", ICON_IPO_CONSTANT, "Constant", "No interpolation, value of A gets held until B is encountered"},
@@ -91,7 +91,7 @@ EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem curve_type_items[] = {
+static const EnumPropertyItem curve_type_items[] = {
{CU_POLY, "POLY", 0, "Poly", ""},
{CU_BEZIER, "BEZIER", 0, "Bezier", ""},
{CU_BSPLINE, "BSPLINE", 0, "BSpline", ""},
@@ -302,7 +302,7 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
BKE_curve_curve_dimension_update(cu);
}
-static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
Curve *cu = (Curve *)ptr->id.data;
@@ -955,7 +955,7 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_align_items[] = {
+ static const EnumPropertyItem prop_align_items[] = {
{CU_ALIGN_X_LEFT, "LEFT", 0, "Left", "Align text to the left"},
{CU_ALIGN_X_MIDDLE, "CENTER", 0, "Center", "Center text"},
{CU_ALIGN_X_RIGHT, "RIGHT", 0, "Right", "Align text to the right"},
@@ -964,7 +964,7 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_align_y_items[] = {
+ static const EnumPropertyItem prop_align_y_items[] = {
{CU_ALIGN_Y_TOP_BASELINE, "TOP_BASELINE", 0, "Top Base-Line", "Align to top but use the base-line of the text"},
{CU_ALIGN_Y_TOP, "TOP", 0, "Top", "Align text to the top"},
{CU_ALIGN_Y_CENTER, "CENTER", 0, "Center", "Align text to the middle"},
@@ -1336,7 +1336,7 @@ static void rna_def_curve(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem curve_twist_mode_items[] = {
+ static const EnumPropertyItem curve_twist_mode_items[] = {
{CU_TWIST_Z_UP, "Z_UP", 0, "Z-Up", "Use Z-Up axis to calculate the curve twist at each point"},
{CU_TWIST_MINIMUM, "MINIMUM", 0, "Minimum", "Use the least twist over the entire curve"},
{CU_TWIST_TANGENT, "TANGENT", 0, "Tangent", "Use the tangent to calculate twist"},
@@ -1350,7 +1350,7 @@ static void rna_def_curve(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bevfac_mapping_items[] = {
+ static const EnumPropertyItem bevfac_mapping_items[] = {
{CU_BEVFAC_MAP_RESOLU, "RESOLUTION", 0, "Resolution", "Map the bevel factor to the number of subdivisions of a spline (U resolution)"},
{CU_BEVFAC_MAP_SEGMENT, "SEGMENTS", 0, "Segments", "Map the bevel factor to the length of a segment and to the number of subdivisions of a segment"},
{CU_BEVFAC_MAP_SPLINE, "SPLINE", 0, "Spline", "Map the bevel factor to the length of a spline"},
@@ -1602,7 +1602,7 @@ static void rna_def_curve(BlenderRNA *brna)
static void rna_def_curve_nurb(BlenderRNA *brna)
{
- static EnumPropertyItem spline_interpolation_items[] = {
+ static const EnumPropertyItem spline_interpolation_items[] = {
{KEY_LINEAR, "LINEAR", 0, "Linear", ""},
{KEY_CARDINAL, "CARDINAL", 0, "Cardinal", ""},
{KEY_BSPLINE, "BSPLINE", 0, "BSpline", ""},
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 118dd0b15de..fd511655c5f 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -3284,17 +3284,17 @@ void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropert
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
{
- static EnumPropertyItem sepr = {0, "", 0, NULL, NULL};
+ static const EnumPropertyItem sepr = {0, "", 0, NULL, NULL};
RNA_enum_item_add(items, totitem, &sepr);
}
-void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item)
+void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
{
for (; item->identifier; item++)
RNA_enum_item_add(items, totitem, item);
}
-void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value)
+void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
{
for (; item->identifier; item++) {
if (item->value == value) {
@@ -3308,7 +3308,7 @@ void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumProper
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
{
- static EnumPropertyItem empty = {0, NULL, 0, NULL, NULL};
+ static const EnumPropertyItem empty = {0, NULL, 0, NULL, NULL};
RNA_enum_item_add(items, totitem, &empty);
}
@@ -3425,12 +3425,12 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
eprop->item = earray;
for (a = 0; a < eprop->totitem; a++) {
- if (eprop->item[a].identifier)
- eprop->item[a].identifier = BLI_strdup(eprop->item[a].identifier);
- if (eprop->item[a].name)
- eprop->item[a].name = BLI_strdup(eprop->item[a].name);
- if (eprop->item[a].description)
- eprop->item[a].description = BLI_strdup(eprop->item[a].description);
+ if (earray[a].identifier)
+ earray[a].identifier = BLI_strdup(earray[a].identifier);
+ if (earray[a].name)
+ earray[a].name = BLI_strdup(earray[a].name);
+ if (earray[a].description)
+ earray[a].description = BLI_strdup(earray[a].description);
}
}
break;
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index f51bd9d93cc..596aff6de8f 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -45,7 +45,7 @@
#include "WM_types.h"
-EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = {
+const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = {
{MOD_DYNAMICPAINT_TYPE_CANVAS, "CANVAS", 0, "Canvas", ""},
{MOD_DYNAMICPAINT_TYPE_BRUSH, "BRUSH", 0, "Brush", ""},
{0, NULL, 0, NULL, NULL}
@@ -246,7 +246,7 @@ static int rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, Objec
}
-static EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(
+static const EnumPropertyItem *rna_DynamicPaint_surface_type_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
@@ -332,7 +332,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
FunctionRNA *func;
/* Surface format */
- static EnumPropertyItem prop_dynamicpaint_surface_format[] = {
+ static const EnumPropertyItem prop_dynamicpaint_surface_format[] = {
/*{MOD_DPAINT_SURFACE_F_PTEX, "PTEX", ICON_TEXTURE_SHADED, "Ptex", ""}, */
{MOD_DPAINT_SURFACE_F_VERTEX, "VERTEX", ICON_OUTLINER_DATA_MESH, "Vertex", ""},
{MOD_DPAINT_SURFACE_F_IMAGESEQ, "IMAGE", ICON_FILE_IMAGE, "Image Sequence", ""},
@@ -340,20 +340,20 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
};
/* Surface type - generated dynamically based on surface format */
- static EnumPropertyItem prop_dynamicpaint_surface_type[] = {
+ static const EnumPropertyItem prop_dynamicpaint_surface_type[] = {
{MOD_DPAINT_SURFACE_T_PAINT, "PAINT", 0, "Paint", ""},
{0, NULL, 0, NULL, NULL}
};
/* Surface output preview. currently only paint has multiple outputs */
- static EnumPropertyItem prop_dynamicpaint_surface_preview[] = {
+ static const EnumPropertyItem prop_dynamicpaint_surface_preview[] = {
{MOD_DPAINT_SURFACE_PREV_PAINT, "PAINT", 0, "Paint", ""},
{MOD_DPAINT_SURFACE_PREV_WETMAP, "WETMAP", 0, "Wetmap", ""},
{0, NULL, 0, NULL, NULL}
};
/* Initial color setting */
- static EnumPropertyItem prop_dynamicpaint_init_color_type[] = {
+ static const EnumPropertyItem prop_dynamicpaint_init_color_type[] = {
{MOD_DPAINT_INITIAL_NONE, "NONE", 0, "None", ""},
{MOD_DPAINT_INITIAL_COLOR, "COLOR", ICON_COLOR, "Color", ""},
{MOD_DPAINT_INITIAL_TEXTURE, "TEXTURE", ICON_TEXTURE, "UV Texture", ""},
@@ -363,7 +363,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
/* Effect type
* Only used by ui to view per effect settings */
- static EnumPropertyItem prop_dynamicpaint_effecttype[] = {
+ static const EnumPropertyItem prop_dynamicpaint_effecttype[] = {
{1, "SPREAD", 0, "Spread", ""},
{2, "DRIP", 0, "Drip", ""},
{3, "SHRINK", 0, "Shrink", ""},
@@ -371,7 +371,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
};
/* Displacemap file format */
- static EnumPropertyItem prop_dynamicpaint_image_fileformat[] = {
+ static const EnumPropertyItem prop_dynamicpaint_image_fileformat[] = {
{MOD_DPAINT_IMGFORMAT_PNG, "PNG", 0, "PNG", ""},
#ifdef WITH_OPENEXR
{MOD_DPAINT_IMGFORMAT_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
@@ -380,7 +380,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
};
/* Displacemap type */
- static EnumPropertyItem prop_dynamicpaint_displace_type[] = {
+ static const EnumPropertyItem prop_dynamicpaint_displace_type[] = {
{MOD_DPAINT_DISP_DISPLACE, "DISPLACE", 0, "Displacement", ""},
{MOD_DPAINT_DISP_DEPTH, "DEPTH", 0, "Depth", ""},
{0, NULL, 0, NULL, NULL}
@@ -773,7 +773,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
PropertyRNA *prop;
/* paint collision type */
- static EnumPropertyItem prop_dynamicpaint_collisiontype[] = {
+ static const EnumPropertyItem prop_dynamicpaint_collisiontype[] = {
{MOD_DPAINT_COL_PSYS, "PARTICLE_SYSTEM", ICON_PARTICLES, "Particle System", ""},
{MOD_DPAINT_COL_POINT, "POINT", ICON_META_EMPTY, "Object Center", ""},
{MOD_DPAINT_COL_DIST, "DISTANCE", ICON_META_EMPTY, "Proximity", ""},
@@ -782,14 +782,14 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_dynamicpaint_prox_falloff[] = {
+ static const EnumPropertyItem prop_dynamicpaint_prox_falloff[] = {
{MOD_DPAINT_PRFALL_SMOOTH, "SMOOTH", ICON_SPHERECURVE, "Smooth", ""},
{MOD_DPAINT_PRFALL_CONSTANT, "CONSTANT", ICON_NOCURVE, "Constant", ""},
{MOD_DPAINT_PRFALL_RAMP, "RAMP", ICON_COLOR, "Color Ramp", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_dynamicpaint_brush_wave_type[] = {
+ static const EnumPropertyItem prop_dynamicpaint_brush_wave_type[] = {
{MOD_DPAINT_WAVEB_CHANGE, "CHANGE", 0, "Depth Change", ""},
{MOD_DPAINT_WAVEB_DEPTH, "DEPTH", 0, "Obstacle", ""},
{MOD_DPAINT_WAVEB_FORCE, "FORCE", 0, "Force", ""},
@@ -797,7 +797,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_dynamicpaint_brush_ray_dir[] = {
+ static const EnumPropertyItem prop_dynamicpaint_brush_ray_dir[] = {
{MOD_DPAINT_RAY_CANVAS, "CANVAS", 0, "Canvas Normal", ""},
{MOD_DPAINT_RAY_BRUSH_AVG, "BRUSH", 0, "Brush Normal", ""},
{MOD_DPAINT_RAY_ZPLUS, "Z_AXIS", 0, "Z-Axis", ""},
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 90c4ec53b45..08aa681e17b 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -50,7 +50,7 @@
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
-EnumPropertyItem rna_enum_fmodifier_type_items[] = {
+const EnumPropertyItem rna_enum_fmodifier_type_items[] = {
{FMODIFIER_TYPE_NULL, "NULL", 0, "Invalid", ""},
{FMODIFIER_TYPE_GENERATOR, "GENERATOR", 0, "Generator",
"Generate a curve using a factorized or expanded polynomial"},
@@ -71,7 +71,7 @@ EnumPropertyItem rna_enum_fmodifier_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = {
+const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = {
{BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", VICO_KEYTYPE_KEYFRAME_VEC, "Keyframe", "Normal keyframe - e.g. for key poses"},
{BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", VICO_KEYTYPE_BREAKDOWN_VEC, "Breakdown", "A breakdown pose - e.g. for transitions between key poses"},
{BEZT_KEYTYPE_MOVEHOLD, "MOVING_HOLD", VICO_KEYTYPE_MOVING_HOLD_VEC, "Moving Hold", "A keyframe that is part of a moving hold"},
@@ -80,7 +80,7 @@ EnumPropertyItem rna_enum_beztriple_keyframe_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[] = {
+const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[] = {
/* XXX: auto-easing is currently using a placeholder icon... */
{BEZT_IPO_EASE_AUTO, "AUTO", ICON_IPO_EASE_IN_OUT, "Automatic Easing",
"Easing type is chosen automatically based on what the type of interpolation used "
@@ -923,7 +923,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem generator_mode_items[] = {
+ static const EnumPropertyItem generator_mode_items[] = {
{FCM_GENERATOR_POLYNOMIAL, "POLYNOMIAL", 0, "Expanded Polynomial", ""},
{FCM_GENERATOR_POLYNOMIAL_FACTORISED, "POLYNOMIAL_FACTORISED", 0, "Factorized Polynomial", ""},
{0, NULL, 0, NULL, NULL}
@@ -970,7 +970,7 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{0, "SIN", 0, "Sine", ""},
{1, "COS", 0, "Cosine", ""},
{2, "TAN", 0, "Tangent", ""},
@@ -1121,7 +1121,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything"},
{FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is"},
{FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset",
@@ -1238,7 +1238,7 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_modification_items[] = {
+ static const EnumPropertyItem prop_modification_items[] = {
{FCM_NOISE_MODIF_REPLACE, "REPLACE", 0, "Replace", ""},
{FCM_NOISE_MODIF_ADD, "ADD", 0, "Add", ""},
{FCM_NOISE_MODIF_SUBTRACT, "SUBTRACT", 0, "Subtract", ""},
@@ -1443,7 +1443,7 @@ static void rna_def_drivertarget(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_trans_chan_items[] = {
+ static const EnumPropertyItem prop_trans_chan_items[] = {
{DTAR_TRANSCHAN_LOCX, "LOC_X", 0, "X Location", ""},
{DTAR_TRANSCHAN_LOCY, "LOC_Y", 0, "Y Location", ""},
{DTAR_TRANSCHAN_LOCZ, "LOC_Z", 0, "Z Location", ""},
@@ -1456,7 +1456,7 @@ static void rna_def_drivertarget(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_local_space_items[] = {
+ static const EnumPropertyItem prop_local_space_items[] = {
{0, "WORLD_SPACE", 0, "World Space", "Transforms include effects of parenting/restpose and constraints"},
{DTAR_FLAG_LOCALSPACE, "TRANSFORM_SPACE", 0, "Transform Space",
"Transforms don't include parenting/restpose or constraints"},
@@ -1521,7 +1521,7 @@ static void rna_def_drivervar(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{DVAR_TYPE_SINGLE_PROP, "SINGLE_PROP", ICON_RNA, "Single Property", "Use the value from some RNA property (Default)"},
{DVAR_TYPE_TRANSFORM_CHAN, "TRANSFORMS", ICON_MANIPUL, "Transform Channel",
"Final transformation value of object or bone"},
@@ -1604,7 +1604,7 @@ static void rna_def_channeldriver(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{DRIVER_TYPE_AVERAGE, "AVERAGE", 0, "Averaged Value", ""},
{DRIVER_TYPE_SUM, "SUM", 0, "Sum Values", ""},
{DRIVER_TYPE_PYTHON, "SCRIPTED", 0, "Scripted Expression", ""},
@@ -1834,7 +1834,7 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem keyframe_flag_items[] = {
+ static const EnumPropertyItem keyframe_flag_items[] = {
{INSERTKEY_REPLACE, "REPLACE", 0, "Replace", "Don't add any new keyframes, but just replace existing ones"},
{INSERTKEY_NEEDED, "NEEDED", 0, "Needed", "Only adds keyframes that are needed"},
{INSERTKEY_FAST, "FAST", 0, "Fast", "Fast keyframe insertion to avoid recalculating the curve each time"},
@@ -1881,12 +1881,12 @@ static void rna_def_fcurve(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem prop_mode_extend_items[] = {
+ static const EnumPropertyItem prop_mode_extend_items[] = {
{FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant", "Hold values of endpoint keyframes"},
{FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear", "Use slope of curve leading in/out of endpoint keyframes"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mode_color_items[] = {
+ static const EnumPropertyItem prop_mode_color_items[] = {
{FCURVE_COLOR_AUTO_RAINBOW, "AUTO_RAINBOW", 0, "Auto Rainbow",
"Cycle through the rainbow, trying to give each curve a unique color"},
{FCURVE_COLOR_AUTO_RGB, "AUTO_RGB", 0, "Auto XYZ to RGB",
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index de2076868ec..074db855c17 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -215,7 +215,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem slip_items[] = {
+ static const EnumPropertyItem slip_items[] = {
{OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip",
"Obstacle causes zero normal and tangential velocity (=sticky), default for all "
"(only option for moving objects)"},
@@ -261,7 +261,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem quality_items[] = {
+ static const EnumPropertyItem quality_items[] = {
{OB_FSDOM_GEOM, "GEOMETRY", 0, "Geometry", "Display geometry"},
{OB_FSDOM_PREVIEW, "PREVIEW", 0, "Preview", "Display preview quality results"},
{OB_FSDOM_FINAL, "FINAL", 0, "Final", "Display final quality results"},
@@ -445,7 +445,7 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem volume_type_items[] = {
+ static const EnumPropertyItem volume_type_items[] = {
{1, "VOLUME", 0, "Volume", "Use only the inner volume of the mesh"},
{2, "SHELL", 0, "Shell", "Use only the outer shell of the mesh"},
{3, "BOTH", 0, "Both", "Use both the inner volume and the outer shell of the mesh"},
@@ -668,7 +668,7 @@ void RNA_def_fluidsim(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_fluid_type_items[] = {
+ static const EnumPropertyItem prop_fluid_type_items[] = {
{OB_FLUIDSIM_ENABLE, "NONE", 0, "None", ""},
{OB_FLUIDSIM_DOMAIN, "DOMAIN", 0, "Domain",
"Bounding box of this object represents the computational domain of the "
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 79e1e95b27a..a2733b91427 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -46,7 +46,7 @@
#include "ED_gpencil.h"
/* parent type */
-static EnumPropertyItem parent_type_items[] = {
+static const EnumPropertyItem parent_type_items[] = {
{PAROBJECT, "OBJECT", 0, "Object", "The layer is parented to an object"},
{PARSKEL, "ARMATURE", 0, "Armature", ""},
{PARBONE, "BONE", 0, "Bone", "The layer is parented to a bone"},
@@ -249,7 +249,7 @@ static void rna_GPencilLayer_parent_bone_set(PointerRNA *ptr, const char *value)
/* parent types enum */
-static EnumPropertyItem *rna_Object_parent_type_itemf(
+static const EnumPropertyItem *rna_Object_parent_type_itemf(
bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
@@ -981,7 +981,7 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem stroke_draw_mode_items[] = {
+ static const EnumPropertyItem stroke_draw_mode_items[] = {
{0, "SCREEN", 0, "Screen", "Stroke is in screen-space"},
{GP_STROKE_3DSPACE, "3DSPACE", 0, "3D Space", "Stroke is in 3D-space"},
{GP_STROKE_2DSPACE, "2DSPACE", 0, "2D Space", "Stroke is in 2D-space"},
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index b51a4258a2d..09ea2efcd85 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -45,14 +45,14 @@
#include "WM_types.h"
#include "WM_api.h"
-EnumPropertyItem rna_enum_image_generated_type_items[] = {
+const EnumPropertyItem rna_enum_image_generated_type_items[] = {
{IMA_GENTYPE_BLANK, "BLANK", 0, "Blank", "Generate a blank image"},
{IMA_GENTYPE_GRID, "UV_GRID", 0, "UV Grid", "Generated grid to test UV mappings"},
{IMA_GENTYPE_GRID_COLOR, "COLOR_GRID", 0, "Color Grid", "Generated improved UV grid to test UV mappings"},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem image_source_items[] = {
+static const EnumPropertyItem image_source_items[] = {
{IMA_SRC_FILE, "FILE", 0, "Single Image", "Single image file"},
{IMA_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
{IMA_SRC_MOVIE, "MOVIE", 0, "Movie", "Movie file"},
@@ -201,7 +201,7 @@ static char *rna_ImageUser_path(PointerRNA *ptr)
return BLI_strdup("");
}
-static EnumPropertyItem *rna_Image_source_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Image_source_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
Image *ima = (Image *)ptr->data;
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index cc6443e2154..bf34d42116e 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -79,8 +79,9 @@ typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr);
typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value);
typedef int (*PropEnumGetFunc)(struct PointerRNA *ptr);
typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value);
-typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr,
- struct PropertyRNA *prop, bool *r_free);
+typedef const EnumPropertyItem *(*PropEnumItemFunc)(
+ struct bContext *C, struct PointerRNA *ptr,
+ struct PropertyRNA *prop, bool *r_free);
typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr);
typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);
@@ -307,7 +308,7 @@ typedef struct EnumPropertyRNA {
PropEnumSetFuncEx set_ex;
void *py_data; /* store py callback here */
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int totitem;
int defaultvalue;
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index f28c02bf20d..a47a5c604b4 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -592,7 +592,7 @@ static char *rna_ShapeKeyPoint_path(PointerRNA *ptr)
#else
-EnumPropertyItem rna_enum_keyblock_type_items[] = {
+const EnumPropertyItem rna_enum_keyblock_type_items[] = {
{KEY_LINEAR, "KEY_LINEAR", 0, "Linear", ""},
{KEY_CARDINAL, "KEY_CARDINAL", 0, "Cardinal", ""},
{KEY_CATMULL_ROM, "KEY_CATMULL_ROM", 0, "Catmull-Rom", ""},
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index e40183e40b5..9e28e31057d 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -167,7 +167,7 @@ static void rna_Lamp_use_nodes_update(bContext *C, PointerRNA *ptr)
#else
/* Don't define icons here, so they don't show up in the Lamp UI (properties Editor) - DingTo */
-EnumPropertyItem rna_enum_lamp_type_items[] = {
+const EnumPropertyItem rna_enum_lamp_type_items[] = {
{LA_LOCAL, "POINT", 0, "Point", "Omnidirectional point light source"},
{LA_SUN, "SUN", 0, "Sun", "Constant direction parallel ray light source"},
{LA_SPOT, "SPOT", 0, "Spot", "Directional cone light source"},
@@ -181,7 +181,7 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_texture_coordinates_items[] = {
+ static const EnumPropertyItem prop_texture_coordinates_items[] = {
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
{TEXCO_VIEW, "VIEW", 0, "View", "Use view coordinates for the texture coordinates"},
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
@@ -231,7 +231,7 @@ static void rna_def_lamp_sky_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_skycolorspace_items[] = {
+ static const EnumPropertyItem prop_skycolorspace_items[] = {
{0, "SMPTE", 0, "SMPTE", ""},
{1, "REC709", 0, "REC709", ""},
{2, "CIE", 0, "CIE", ""},
@@ -417,7 +417,7 @@ static void rna_def_lamp_falloff(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_fallofftype_items[] = {
+ static const EnumPropertyItem prop_fallofftype_items[] = {
{LA_FALLOFF_CONSTANT, "CONSTANT", 0, "Constant", ""},
{LA_FALLOFF_INVLINEAR, "INVERSE_LINEAR", 0, "Inverse Linear", ""},
{LA_FALLOFF_INVSQUARE, "INVERSE_SQUARE", 0, "Inverse Square", ""},
@@ -480,33 +480,33 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_shadow_items[] = {
+ static const EnumPropertyItem prop_shadow_items[] = {
{0, "NOSHADOW", 0, "No Shadow", ""},
{LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_spot_shadow_items[] = {
+ static const EnumPropertyItem prop_spot_shadow_items[] = {
{0, "NOSHADOW", 0, "No Shadow", ""},
{LA_SHAD_BUF, "BUFFER_SHADOW", 0, "Buffer Shadow", "Let spotlight produce shadows using shadow buffer"},
{LA_SHAD_RAY, "RAY_SHADOW", 0, "Ray Shadow", "Use ray tracing for shadow"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_ray_sampling_method_items[] = {
+ static const EnumPropertyItem prop_ray_sampling_method_items[] = {
{LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
{LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_spot_ray_sampling_method_items[] = {
+ static const EnumPropertyItem prop_spot_ray_sampling_method_items[] = {
{LA_SAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", ""},
{LA_SAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", ""},
{LA_SAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_shadbuftype_items[] = {
+ static const EnumPropertyItem prop_shadbuftype_items[] = {
{LA_SHADBUF_REGULAR, "REGULAR", 0, "Classical", "Classic shadow buffer"},
{LA_SHADBUF_HALFWAY, "HALFWAY", 0, "Classic-Halfway",
"Regular buffer, averaging the closest and 2nd closest Z value to reducing "
@@ -519,14 +519,14 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_shadbuffiltertype_items[] = {
+ static const EnumPropertyItem prop_shadbuffiltertype_items[] = {
{LA_SHADBUF_BOX, "BOX", 0, "Box", "Apply the Box filter to shadow buffer samples"},
{LA_SHADBUF_TENT, "TENT", 0, "Tent", "Apply the Tent Filter to shadow buffer samples"},
{LA_SHADBUF_GAUSS, "GAUSS", 0, "Gauss", "Apply the Gauss filter to shadow buffer samples"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_numbuffer_items[] = {
+ static const EnumPropertyItem prop_numbuffer_items[] = {
{1, "BUFFERS_1", 0, "1", "Only one buffer rendered"},
{4, "BUFFERS_4", 0, "4", "Render 4 buffers for better AA, this quadruples memory usage"},
{9, "BUFFERS_9", 0, "9", "Render 9 buffers for better AA, this uses nine times more memory"},
@@ -534,7 +534,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area, int sun)
};
/* GE only */
- static EnumPropertyItem prop_ge_shadowbuffer_type_items[] = {
+ static const EnumPropertyItem prop_ge_shadowbuffer_type_items[] = {
{LA_SHADMAP_SIMPLE, "SIMPLE", 0, "Simple", "Simple shadow maps"},
{LA_SHADMAP_VARIANCE, "VARIANCE", 0, "Variance", "Variance shadow maps"},
{0, NULL, 0, NULL, NULL}
@@ -779,7 +779,7 @@ static void rna_def_area_lamp(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_areashape_items[] = {
+ static const EnumPropertyItem prop_areashape_items[] = {
{LA_AREA_SQUARE, "SQUARE", 0, "Square", ""},
{LA_AREA_RECT, "RECTANGLE", 0, "Rectangle", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 13d655f81bf..e138d0d98d8 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -42,7 +42,7 @@
#include "WM_types.h"
#include "WM_api.h"
-EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = {
+const EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = {
{LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""},
{LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""},
{LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""},
@@ -54,7 +54,7 @@ EnumPropertyItem rna_enum_linestyle_color_modifier_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = {
+const EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = {
{LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""},
{LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""},
{LS_MODIFIER_CURVATURE_3D, "CURVATURE_3D", ICON_MODIFIER, "Curvature 3D", ""},
@@ -66,7 +66,7 @@ EnumPropertyItem rna_enum_linestyle_alpha_modifier_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = {
+const EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = {
{LS_MODIFIER_ALONG_STROKE, "ALONG_STROKE", ICON_MODIFIER, "Along Stroke", ""},
{LS_MODIFIER_CALLIGRAPHY, "CALLIGRAPHY", ICON_MODIFIER, "Calligraphy", ""},
{LS_MODIFIER_CREASE_ANGLE, "CREASE_ANGLE", ICON_MODIFIER, "Crease Angle", ""},
@@ -79,7 +79,7 @@ EnumPropertyItem rna_enum_linestyle_thickness_modifier_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = {
+const EnumPropertyItem rna_enum_linestyle_geometry_modifier_type_items[] = {
{LS_MODIFIER_2D_OFFSET, "2D_OFFSET", ICON_MODIFIER, "2D Offset", ""},
{LS_MODIFIER_2D_TRANSFORM, "2D_TRANSFORM", ICON_MODIFIER, "2D Transform", ""},
{LS_MODIFIER_BACKBONE_STRETCHER, "BACKBONE_STRETCHER", ICON_MODIFIER, "Backbone Stretcher", ""},
@@ -475,7 +475,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem texco_items[] = {
+ static const EnumPropertyItem texco_items[] = {
{TEXCO_WINDOW, "WINDOW", 0, "Window", "Use screen coordinates as texture coordinates"},
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
{TEXCO_STROKE, "ALONG_STROKE", 0, "Along stroke", "Use stroke length for texture coordinates"},
@@ -483,7 +483,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mapping_items[] = {
+ static const EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
{MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
{MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
@@ -491,7 +491,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_x_mapping_items[] = {
+ static const EnumPropertyItem prop_x_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -499,7 +499,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_y_mapping_items[] = {
+ static const EnumPropertyItem prop_y_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -507,7 +507,7 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_z_mapping_items[] = {
+ static const EnumPropertyItem prop_z_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -579,13 +579,13 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
}
static void rna_def_modifier_type_common(
- StructRNA *srna, EnumPropertyItem *modifier_type_items,
+ StructRNA *srna, const EnumPropertyItem *modifier_type_items,
const char *set_name_func, const bool blend, const bool color)
{
PropertyRNA *prop;
/* TODO: Check this is not already defined somewhere else, e.g. in nodes... */
- static EnumPropertyItem value_blend_items[] = {
+ static const EnumPropertyItem value_blend_items[] = {
{LS_VALUE_BLEND, "MIX", 0, "Mix", ""},
{LS_VALUE_ADD, "ADD", 0, "Add", ""},
{LS_VALUE_SUB, "SUBTRACT", 0, "Subtract", ""},
@@ -685,7 +685,7 @@ static void rna_def_modifier_curve_common(StructRNA *srna, bool range, bool valu
{
PropertyRNA *prop;
- static EnumPropertyItem mapping_items[] = {
+ static const EnumPropertyItem mapping_items[] = {
{0, "LINEAR", 0, "Linear", "Use linear mapping"},
{LS_MODIFIER_USE_CURVE, "CURVE", 0, "Curve", "Use curve mapping"},
{0, NULL, 0, NULL, NULL}
@@ -737,7 +737,7 @@ static void rna_def_modifier_material_common(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem mat_attr_items[] = {
+ static const EnumPropertyItem mat_attr_items[] = {
{LS_MODIFIER_MATERIAL_LINE, "LINE", 0, "Line Color", ""},
{LS_MODIFIER_MATERIAL_LINE_R, "LINE_R", 0, "Line Color Red", ""},
{LS_MODIFIER_MATERIAL_LINE_G, "LINE_G", 0, "Line Color Green", ""},
@@ -769,14 +769,14 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem blueprint_shape_items[] = {
+ static const EnumPropertyItem blueprint_shape_items[] = {
{LS_MODIFIER_BLUEPRINT_CIRCLES, "CIRCLES", 0, "Circles", "Draw a blueprint using circular contour strokes"},
{LS_MODIFIER_BLUEPRINT_ELLIPSES, "ELLIPSES", 0, "Ellipses", "Draw a blueprint using elliptic contour strokes"},
{LS_MODIFIER_BLUEPRINT_SQUARES, "SQUARES", 0, "Squares", "Draw a blueprint using square contour strokes"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem transform_pivot_items[] = {
+ static const EnumPropertyItem transform_pivot_items[] = {
{LS_MODIFIER_2D_TRANSFORM_PIVOT_CENTER, "CENTER", 0, "Stroke Center", ""},
{LS_MODIFIER_2D_TRANSFORM_PIVOT_START, "START", 0, "Stroke Start", ""},
{LS_MODIFIER_2D_TRANSFORM_PIVOT_END, "END", 0, "Stroke End", ""},
@@ -1559,7 +1559,7 @@ static void rna_def_linestyle(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem panel_items[] = {
+ static const EnumPropertyItem panel_items[] = {
{LS_PANEL_STROKES, "STROKES", 0, "Strokes", "Show the panel for stroke construction"},
{LS_PANEL_COLOR, "COLOR", 0, "Color", "Show the panel for line color options"},
{LS_PANEL_ALPHA, "ALPHA", 0, "Alpha", "Show the panel for alpha transparency options"},
@@ -1571,37 +1571,37 @@ static void rna_def_linestyle(BlenderRNA *brna)
#endif
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem chaining_items[] = {
+ static const EnumPropertyItem chaining_items[] = {
{LS_CHAINING_PLAIN, "PLAIN", 0, "Plain", "Plain chaining"},
{LS_CHAINING_SKETCHY, "SKETCHY", 0, "Sketchy", "Sketchy chaining with a multiple touch"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem cap_items[] = {
+ static const EnumPropertyItem cap_items[] = {
{LS_CAPS_BUTT, "BUTT", 0, "Butt", "Butt cap (flat)"},
{LS_CAPS_ROUND, "ROUND", 0, "Round", "Round cap (half-circle)"},
{LS_CAPS_SQUARE, "SQUARE", 0, "Square", "Square cap (flat and extended)"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem thickness_position_items[] = {
+ static const EnumPropertyItem thickness_position_items[] = {
{LS_THICKNESS_CENTER, "CENTER", 0, "Center", "Silhouettes and border edges are centered along stroke geometry"},
{LS_THICKNESS_INSIDE, "INSIDE", 0, "Inside", "Silhouettes and border edges are drawn inside of stroke geometry"},
{LS_THICKNESS_OUTSIDE, "OUTSIDE", 0, "Outside", "Silhouettes and border edges are drawn outside of stroke geometry"},
{LS_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative", "Silhouettes and border edges are shifted by a user-defined ratio"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem sort_key_items[] = {
+ static const EnumPropertyItem sort_key_items[] = {
{LS_SORT_KEY_DISTANCE_FROM_CAMERA, "DISTANCE_FROM_CAMERA", 0, "Distance from Camera", "Sort by distance from camera (closer lines lie on top of further lines)"},
{LS_SORT_KEY_2D_LENGTH, "2D_LENGTH", 0, "2D Length", "Sort by curvilinear 2D length (longer lines lie on top of shorter lines)"},
{LS_SORT_KEY_PROJECTED_X, "PROJECTED_X", 0, "Projected X", "Sort by the projected X value in the image coordinate system"},
{LS_SORT_KEY_PROJECTED_Y, "PROJECTED_Y", 0, "Projected Y", "Sort by the projected Y value in the image coordinate system"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem sort_order_items[] = {
+ static const EnumPropertyItem sort_order_items[] = {
{0, "DEFAULT", 0, "Default", "Default order of the sort key"},
{LS_REVERSE_ORDER, "REVERSE", 0, "Reverse", "Reverse order"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem integration_type_items[] = {
+ static const EnumPropertyItem integration_type_items[] = {
{LS_INTEGRATION_MEAN, "MEAN", 0, "Mean", "The value computed for the chain is the mean of the values obtained for chain vertices"},
{LS_INTEGRATION_MIN, "MIN", 0, "Min", "The value computed for the chain is the minimum of the values obtained for chain vertices"},
{LS_INTEGRATION_MAX, "MAX", 0, "Max", "The value computed for the chain is the maximum of the values obtained for chain vertices"},
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index c8c1c7be280..3f1e9ae7f7d 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -266,7 +266,7 @@ static Material *rna_Main_materials_new(Main *bmain, const char *name)
return (Material *)id;
}
-static EnumPropertyItem *rna_Main_nodetree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *rna_Main_nodetree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_node_tree_type_itemf(NULL, NULL, r_free);
}
@@ -830,7 +830,7 @@ void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
PropertyRNA *prop;
- static EnumPropertyItem dummy_items[] = {
+ static const EnumPropertyItem dummy_items[] = {
{0, "DUMMY", 0, "", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -878,7 +878,7 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
PropertyRNA *prop;
- static EnumPropertyItem mesh_type_items[] = {
+ static const EnumPropertyItem mesh_type_items[] = {
{eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"},
{eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c
index 12f8a584c2c..1c7e6fb9587 100644
--- a/source/blender/makesrna/intern/rna_mask.c
+++ b/source/blender/makesrna/intern/rna_mask.c
@@ -594,11 +594,11 @@ static void rna_def_maskParent(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem mask_id_type_items[] = {
+ static const EnumPropertyItem mask_id_type_items[] = {
{ID_MC, "MOVIECLIP", ICON_SEQUENCE, "Movie Clip", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem parent_type_items[] = {
+ static const EnumPropertyItem parent_type_items[] = {
{MASK_PARENT_POINT_TRACK, "POINT_TRACK", 0, "Point Track", ""},
{MASK_PARENT_PLANE_TRACK, "PLANE_TRACK", 0, "Plane Track", ""},
{0, NULL, 0, NULL, NULL}};
@@ -678,7 +678,7 @@ static void rna_def_maskSplinePoint(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem handle_type_items[] = {
+ static const EnumPropertyItem handle_type_items[] = {
{HD_AUTO, "AUTO", 0, "Auto", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned Single", ""},
@@ -825,13 +825,13 @@ static void rna_def_maskSplinePoints(BlenderRNA *brna)
static void rna_def_maskSpline(BlenderRNA *brna)
{
- static EnumPropertyItem spline_interpolation_items[] = {
+ static const EnumPropertyItem spline_interpolation_items[] = {
{MASK_SPLINE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""},
{MASK_SPLINE_INTERP_EASE, "EASE", 0, "Ease", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem spline_offset_mode_items[] = {
+ static const EnumPropertyItem spline_offset_mode_items[] = {
{MASK_SPLINE_OFFSET_EVEN, "EVEN", 0, "Even", "Calculate even feather offset"},
{MASK_SPLINE_OFFSET_SMOOTH, "SMOOTH", 0, "Smooth", "Calculate feather offset as a second curve"},
{0, NULL, 0, NULL, NULL}
@@ -889,7 +889,7 @@ static void rna_def_maskSpline(BlenderRNA *brna)
static void rna_def_mask_layer(BlenderRNA *brna)
{
- static EnumPropertyItem masklay_blend_mode_items[] = {
+ static const EnumPropertyItem masklay_blend_mode_items[] = {
{MASK_BLEND_MERGE_ADD, "MERGE_ADD", 0, "Merge Add", ""},
{MASK_BLEND_MERGE_SUBTRACT, "MERGE_SUBTRACT", 0, "Merge Subtract", ""},
{MASK_BLEND_ADD, "ADD", 0, "Add", ""},
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index c31b70c57ed..e62832a8b76 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -38,7 +38,7 @@
#include "WM_api.h"
#include "WM_types.h"
-static EnumPropertyItem prop_texture_coordinates_items[] = {
+static const EnumPropertyItem prop_texture_coordinates_items[] = {
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
{TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"},
@@ -54,7 +54,7 @@ static EnumPropertyItem prop_texture_coordinates_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_ramp_blend_items[] = {
+const EnumPropertyItem rna_enum_ramp_blend_items[] = {
{MA_RAMP_BLEND, "MIX", 0, "Mix", ""},
{MA_RAMP_ADD, "ADD", 0, "Add", ""},
{MA_RAMP_MULT, "MULTIPLY", 0, "Multiply", ""},
@@ -346,7 +346,7 @@ static void rna_Material_use_nodes_update(bContext *C, PointerRNA *ptr)
rna_Material_draw_update(CTX_data_main(C), CTX_data_scene(C), ptr);
}
-static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
Material *ma = (Material *)ptr->id.data;
@@ -442,7 +442,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mapping_items[] = {
+ static const EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
{MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
{MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
@@ -450,7 +450,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_x_mapping_items[] = {
+ static const EnumPropertyItem prop_x_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -458,7 +458,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_y_mapping_items[] = {
+ static const EnumPropertyItem prop_y_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -466,7 +466,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_z_mapping_items[] = {
+ static const EnumPropertyItem prop_z_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -474,7 +474,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_normal_map_space_items[] = {
+ static const EnumPropertyItem prop_normal_map_space_items[] = {
{MTEX_NSPACE_CAMERA, "CAMERA", 0, "Camera", ""},
{MTEX_NSPACE_WORLD, "WORLD", 0, "World", ""},
{MTEX_NSPACE_OBJECT, "OBJECT", 0, "Object", ""},
@@ -482,7 +482,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_bump_method_items[] = {
+ static const EnumPropertyItem prop_bump_method_items[] = {
{0, "BUMP_ORIGINAL", 0, "Original", ""},
{MTEX_COMPAT_BUMP, "BUMP_COMPATIBLE", 0, "Compatible", ""},
{MTEX_3TAP_BUMP, "BUMP_LOW_QUALITY", 0, "Low Quality", "Use 3 tap filtering"},
@@ -493,7 +493,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_bump_space_items[] = {
+ static const EnumPropertyItem prop_bump_space_items[] = {
{0, "BUMP_VIEWSPACE", 0, "ViewSpace", ""},
{MTEX_BUMP_OBJECTSPACE, "BUMP_OBJECTSPACE", 0, "ObjectSpace", ""},
{MTEX_BUMP_TEXTURESPACE, "BUMP_TEXTURESPACE", 0, "TextureSpace", ""},
@@ -830,7 +830,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_alpha_blend_items[] = {
+ static const EnumPropertyItem prop_alpha_blend_items[] = {
{GEMAT_SOLID, "OPAQUE", 0, "Opaque", "Render color of textured face as color"},
{GEMAT_ADD, "ADD", 0, "Add", "Render face transparent and add color of face"},
{GEMAT_CLIP, "CLIP", 0, "Alpha Clip", "Use the image alpha values clipped with no blending (binary alpha)"},
@@ -843,7 +843,7 @@ static void rna_def_material_gamesettings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_face_orientation_items[] = {
+ static const EnumPropertyItem prop_face_orientation_items[] = {
{GEMAT_NORMAL, "NORMAL", 0, "Normal", "No transformation"},
{GEMAT_HALO, "HALO", 0, "Halo", "Screen aligned billboard"},
{GEMAT_BILLBOARD, "BILLBOARD", 0, "Billboard", "Billboard with Z-axis constraint"},
@@ -890,7 +890,7 @@ static void rna_def_material_colors(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_ramp_input_items[] = {
+ static const EnumPropertyItem prop_ramp_input_items[] = {
{MA_RAMP_IN_SHADER, "SHADER", 0, "Shader", ""},
{MA_RAMP_IN_ENERGY, "ENERGY", 0, "Energy", ""},
{MA_RAMP_IN_NOR, "NORMAL", 0, "Normal", ""},
@@ -1007,7 +1007,7 @@ static void rna_def_material_diffuse(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_diff_shader_items[] = {
+ static const EnumPropertyItem prop_diff_shader_items[] = {
{MA_DIFF_LAMBERT, "LAMBERT", 0, "Lambert", "Use a Lambertian shader"},
{MA_DIFF_ORENNAYAR, "OREN_NAYAR", 0, "Oren-Nayar", "Use an Oren-Nayar shader"},
{MA_DIFF_TOON, "TOON", 0, "Toon", "Use a toon shader"},
@@ -1068,7 +1068,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_fadeto_mir_items[] = {
+ static const EnumPropertyItem prop_fadeto_mir_items[] = {
{MA_RAYMIR_FADETOSKY, "FADE_TO_SKY", 0, "Sky", ""},
{MA_RAYMIR_FADETOMAT, "FADE_TO_MATERIAL", 0, "Material", ""},
{0, NULL, 0, NULL, NULL}
@@ -1238,7 +1238,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_lighting_items[] = {
+ static const EnumPropertyItem prop_lighting_items[] = {
{MA_VOL_SHADE_SHADELESS, "SHADELESS", 0, "Shadeless", "Do not calculate lighting and shadows"},
{MA_VOL_SHADE_SHADOWED, "SHADOWED", 0, "Shadowed", ""},
{MA_VOL_SHADE_SHADED, "SHADED", 0, "Shaded", ""},
@@ -1247,7 +1247,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_stepsize_items[] = {
+ static const EnumPropertyItem prop_stepsize_items[] = {
{MA_VOL_STEP_RANDOMIZED, "RANDOMIZED", 0, "Randomized", ""},
{MA_VOL_STEP_CONSTANT, "CONSTANT", 0, "Constant", ""},
/*{MA_VOL_STEP_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", ""}, */
@@ -1595,7 +1595,7 @@ static void rna_def_material_specularity(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem prop_specular_shader_items[] = {
+ static const EnumPropertyItem prop_specular_shader_items[] = {
{MA_SPEC_COOKTORR, "COOKTORR", 0, "CookTorr", "Use a Cook-Torrance shader"},
{MA_SPEC_PHONG, "PHONG", 0, "Phong", "Use a Phong shader"},
{MA_SPEC_BLINN, "BLINN", 0, "Blinn", "Use a Blinn shader"},
@@ -1772,14 +1772,14 @@ void RNA_def_material(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface"},
{MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in raytracing)"},
{MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume"},
{MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem transparency_items[] = {
+ static const EnumPropertyItem transparency_items[] = {
{0, "MASK", 0, "Mask", "Mask the background"},
{MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces"},
{MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering"},
@@ -1787,7 +1787,7 @@ void RNA_def_material(BlenderRNA *brna)
};
/* Render Preview Types */
- static EnumPropertyItem preview_type_items[] = {
+ static const EnumPropertyItem preview_type_items[] = {
{MA_FLAT, "FLAT", ICON_MATPLANE, "Flat", "Flat XY plane"},
{MA_SPHERE, "SPHERE", ICON_MATSPHERE, "Sphere", "Sphere"},
{MA_CUBE, "CUBE", ICON_MATCUBE, "Cube", "Cube"},
@@ -1797,7 +1797,7 @@ void RNA_def_material(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_shadows_only_items[] = {
+ static const EnumPropertyItem prop_shadows_only_items[] = {
{MA_SO_OLD, "SHADOW_ONLY_OLD", 0, "Shadow and Distance", "Old shadow only method"},
{MA_SO_SHADOW, "SHADOW_ONLY", 0, "Shadow Only", "Improved shadow only method"},
{MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, "Shadow and Shading",
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index beb5430b63b..bc24b76c137 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -52,7 +52,7 @@
#include "WM_types.h"
-EnumPropertyItem rna_enum_mesh_delimit_mode_items[] = {
+const EnumPropertyItem rna_enum_mesh_delimit_mode_items[] = {
{BMO_DELIM_NORMAL, "NORMAL", 0, "Normal", "Delimit by face directions"},
{BMO_DELIM_MATERIAL, "MATERIAL", 0, "Material", "Delimit by face material"},
{BMO_DELIM_SEAM, "SEAM", 0, "Seam", "Delimit by edge seams"},
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 9c91bea7c45..8589d819360 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -296,7 +296,7 @@ static void rna_def_metaball(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_update_items[] = {
+ static const EnumPropertyItem prop_update_items[] = {
{MB_UPDATE_ALWAYS, "UPDATE_ALWAYS", 0, "Always", "While editing, update metaball always"},
{MB_UPDATE_HALFRES, "HALFRES", 0, "Half", "While editing, update metaball in half resolution"},
{MB_UPDATE_FAST, "FAST", 0, "Fast", "While editing, update metaball without polygonization"},
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 0dc5ab5d6bf..d482f7e1b94 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -62,7 +62,7 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem rna_enum_object_modifier_type_items[] = {
+const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
{0, "", 0, N_("Modify"), ""},
{eModifierType_DataTransfer, "DATA_TRANSFER", ICON_MOD_DATA_TRANSFER, "Data Transfer", ""},
{eModifierType_MeshCache, "MESH_CACHE", ICON_MOD_MESHDEFORM, "Mesh Cache", ""},
@@ -123,7 +123,7 @@ EnumPropertyItem rna_enum_object_modifier_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = {
+const EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = {
{MOD_TRIANGULATE_QUAD_BEAUTY, "BEAUTY", 0, "Beauty ", "Split the quads in nice triangles, slower method"},
{MOD_TRIANGULATE_QUAD_FIXED, "FIXED", 0, "Fixed", "Split the quads on the first and third vertices"},
{MOD_TRIANGULATE_QUAD_ALTERNATE, "FIXED_ALTERNATE", 0, "Fixed Alternate",
@@ -133,7 +133,7 @@ EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = {
+const EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = {
{MOD_TRIANGULATE_NGON_BEAUTY, "BEAUTY", 0, "Beauty", "Arrange the new triangles evenly (slow)"},
{MOD_TRIANGULATE_NGON_EARCLIP, "CLIP", 0, "Clip", "Split the polygons with an ear clipping algorithm"},
{0, NULL, 0, NULL, NULL}
@@ -141,7 +141,7 @@ EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[] = {
#ifndef RNA_RUNTIME
/* use eWarp_Falloff_*** & eHook_Falloff_***, they're in sync */
-static EnumPropertyItem modifier_warp_falloff_items[] = {
+static const EnumPropertyItem modifier_warp_falloff_items[] = {
{eWarp_Falloff_None, "NONE", 0, "No Falloff", ""},
{eWarp_Falloff_Curve, "CURVE", 0, "Curve", ""},
{eWarp_Falloff_Smooth, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
@@ -157,7 +157,7 @@ static EnumPropertyItem modifier_warp_falloff_items[] = {
/* ***** Data Transfer ***** */
-EnumPropertyItem rna_enum_dt_method_vertex_items[] = {
+const EnumPropertyItem rna_enum_dt_method_vertex_items[] = {
{MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology",
"Copy from identical topology meshes"},
{MREMAP_MODE_VERT_NEAREST, "NEAREST", 0, "Nearest vertex",
@@ -175,7 +175,7 @@ EnumPropertyItem rna_enum_dt_method_vertex_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_dt_method_edge_items[] = {
+const EnumPropertyItem rna_enum_dt_method_edge_items[] = {
{MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology",
"Copy from identical topology meshes"},
{MREMAP_MODE_EDGE_VERT_NEAREST, "VERT_NEAREST", 0, "Nearest Vertices",
@@ -189,7 +189,7 @@ EnumPropertyItem rna_enum_dt_method_edge_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_dt_method_loop_items[] = {
+const EnumPropertyItem rna_enum_dt_method_loop_items[] = {
{MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology",
"Copy from identical topology meshes"},
{MREMAP_MODE_LOOP_NEAREST_LOOPNOR, "NEAREST_NORMAL", 0, "Nearest Corner And Best Matching Normal",
@@ -205,7 +205,7 @@ EnumPropertyItem rna_enum_dt_method_loop_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_dt_method_poly_items[] = {
+const EnumPropertyItem rna_enum_dt_method_poly_items[] = {
{MREMAP_MODE_TOPOLOGY, "TOPOLOGY", 0, "Topology",
"Copy from identical topology meshes"},
{MREMAP_MODE_POLY_NEAREST, "NEAREST", 0, "Nearest Face",
@@ -217,7 +217,7 @@ EnumPropertyItem rna_enum_dt_method_poly_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_dt_mix_mode_items[] = {
+const EnumPropertyItem rna_enum_dt_mix_mode_items[] = {
{CDT_MIX_TRANSFER, "REPLACE", 0, "Replace",
"Overwrite all elements' data"},
{CDT_MIX_REPLACE_ABOVE_THRESHOLD, "ABOVE_THRESHOLD", 0, "Above Threshold",
@@ -236,7 +236,7 @@ EnumPropertyItem rna_enum_dt_mix_mode_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_dt_layers_select_src_items[] = {
+const EnumPropertyItem rna_enum_dt_layers_select_src_items[] = {
{DT_LAYERS_ACTIVE_SRC, "ACTIVE", 0, "Active Layer",
"Only transfer active data layer"},
{DT_LAYERS_ALL_SRC, "ALL", 0, "All Layers",
@@ -248,7 +248,7 @@ EnumPropertyItem rna_enum_dt_layers_select_src_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = {
+const EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = {
{DT_LAYERS_ACTIVE_DST, "ACTIVE", 0, "Active Layer",
"Affect active data layer of all targets"},
{DT_LAYERS_NAME_DST, "NAME", 0, "By Name",
@@ -258,20 +258,20 @@ EnumPropertyItem rna_enum_dt_layers_select_dst_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_axis_xy_items[] = {
+const EnumPropertyItem rna_enum_axis_xy_items[] = {
{0, "X", 0, "X", ""},
{1, "Y", 0, "Y", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_axis_xyz_items[] = {
+const EnumPropertyItem rna_enum_axis_xyz_items[] = {
{0, "X", 0, "X", ""},
{1, "Y", 0, "Y", ""},
{2, "Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_axis_flag_xyz_items[] = {
+const EnumPropertyItem rna_enum_axis_flag_xyz_items[] = {
{(1 << 0), "X", 0, "X", ""},
{(1 << 1), "Y", 0, "Y", ""},
{(1 << 2), "Z", 0, "Z", ""},
@@ -891,7 +891,7 @@ static void rna_DataTransferModifier_polys_data_types_set(struct PointerRNA *ptr
dtmd->data_types |= value;
}
-static EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
+static const EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
{
DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data;
EnumPropertyItem *item = NULL, tmp_item = {0};
@@ -983,7 +983,7 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(bConte
return item;
}
-static EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
+static const EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
{
DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data;
EnumPropertyItem *item = NULL, tmp_item = {0};
@@ -1075,7 +1075,7 @@ static EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf(bConte
return item;
}
-static EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *rna_DataTransferModifier_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
DataTransferModifierData *dtmd = (DataTransferModifierData *)ptr->data;
EnumPropertyItem *item = NULL;
@@ -1161,7 +1161,7 @@ static void rna_MeshSequenceCache_object_path_update(Main *bmain, Scene *scene,
static PropertyRNA *rna_def_property_subdivision_common(StructRNA *srna, const char type[])
{
- static EnumPropertyItem prop_subdivision_type_items[] = {
+ static const EnumPropertyItem prop_subdivision_type_items[] = {
{0, "CATMULL_CLARK", 0, "Catmull-Clark", ""},
{1, "SIMPLE", 0, "Simple", ""},
{0, NULL, 0, NULL, NULL}
@@ -1222,7 +1222,7 @@ static void rna_def_modifier_subsurf(BlenderRNA *brna)
static void rna_def_modifier_generic_map_info(StructRNA *srna)
{
- static EnumPropertyItem prop_texture_coordinates_items[] = {
+ static const EnumPropertyItem prop_texture_coordinates_items[] = {
{MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", "Use the local coordinate system for the texture coordinates"},
{MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", "Use the global coordinate system for the texture coordinates"},
{MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object",
@@ -1405,7 +1405,7 @@ static void rna_def_modifier_curve(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_deform_axis_items[] = {
+ static const EnumPropertyItem prop_deform_axis_items[] = {
{MOD_CURVE_POSX, "POS_X", 0, "X", ""},
{MOD_CURVE_POSY, "POS_Y", 0, "Y", ""},
{MOD_CURVE_POSZ, "POS_Z", 0, "Z", ""},
@@ -1572,7 +1572,7 @@ static void rna_def_modifier_mirror(BlenderRNA *brna)
static void rna_def_modifier_decimate(BlenderRNA *brna)
{
- static EnumPropertyItem modifier_decim_mode_items[] = {
+ static const EnumPropertyItem modifier_decim_mode_items[] = {
{MOD_DECIM_MODE_COLLAPSE, "COLLAPSE", 0, "Collapse", "Use edge collapsing"},
{MOD_DECIM_MODE_UNSUBDIV, "UNSUBDIV", 0, "Un-Subdivide", "Use un-subdivide face reduction"},
{MOD_DECIM_MODE_DISSOLVE, "DISSOLVE", 0, "Planar", "Dissolve geometry to form planar polygons"},
@@ -1952,7 +1952,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_operation_items[] = {
+ static const EnumPropertyItem prop_operation_items[] = {
{eBooleanModifierOp_Intersect, "INTERSECT", 0, "Intersect",
"Keep the part of the mesh that intersects with the other selected object"},
{eBooleanModifierOp_Union, "UNION", 0, "Union", "Combine two meshes in an additive way"},
@@ -1960,7 +1960,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_solver_items[] = {
+ static const EnumPropertyItem prop_solver_items[] = {
{eBooleanModifierSolver_BMesh, "BMESH", 0, "BMesh", "Use the BMesh boolean solver"},
{eBooleanModifierSolver_Carve, "CARVE", 0, "Carve", "Use the Carve boolean solver"},
{0, NULL, 0, NULL, NULL}
@@ -1997,7 +1997,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
/* BMesh debugging options, only used when G_DEBUG is set */
/* BMesh intersection options */
- static EnumPropertyItem debug_items[] = {
+ static const EnumPropertyItem debug_items[] = {
{eBooleanModifierBMeshFlag_BMesh_Separate, "SEPARATE", 0, "Separate", ""},
{eBooleanModifierBMeshFlag_BMesh_NoDissolve, "NO_DISSOLVE", 0, "No Dissolve", ""},
{eBooleanModifierBMeshFlag_BMesh_NoConnectRegions, "NO_CONNECT_REGIONS", 0, "No Connect Regions", ""},
@@ -2017,7 +2017,7 @@ static void rna_def_modifier_array(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_fit_type_items[] = {
+ static const EnumPropertyItem prop_fit_type_items[] = {
{MOD_ARR_FIXEDCOUNT, "FIXED_COUNT", 0, "Fixed Count", "Duplicate the object a certain number of times"},
{MOD_ARR_FITLENGTH, "FIT_LENGTH", 0, "Fit Length",
"Duplicate the object as many times as fits in a certain length"},
@@ -2158,7 +2158,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_direction_items[] = {
+ static const EnumPropertyItem prop_direction_items[] = {
{MOD_DISP_DIR_X, "X", 0, "X", "Use the texture's intensity value to displace in the X direction"},
{MOD_DISP_DIR_Y, "Y", 0, "Y", "Use the texture's intensity value to displace in the Y direction"},
{MOD_DISP_DIR_Z, "Z", 0, "Z", "Use the texture's intensity value to displace in the Z direction"},
@@ -2171,7 +2171,7 @@ static void rna_def_modifier_displace(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_space_items[] = {
+ static const EnumPropertyItem prop_space_items[] = {
{MOD_DISP_SPACE_LOCAL, "LOCAL", 0, "Local", "Direction is defined in local coordinates"},
{MOD_DISP_SPACE_GLOBAL, "GLOBAL", 0, "Global", "Direction is defined in global coordinates"},
{0, NULL, 0, NULL, NULL}
@@ -2344,7 +2344,7 @@ static void rna_def_modifier_correctivesmooth(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem modifier_smooth_type_items[] = {
+ static const EnumPropertyItem modifier_smooth_type_items[] = {
{MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE, "SIMPLE", 0, "Simple",
"Use the average of adjacent edge-vertices"},
{MOD_CORRECTIVESMOOTH_SMOOTH_LENGTH_WEIGHT, "LENGTH_WEIGHTED", 0, "Length Weight",
@@ -2352,7 +2352,7 @@ static void rna_def_modifier_correctivesmooth(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem modifier_rest_source_items[] = {
+ static const EnumPropertyItem modifier_rest_source_items[] = {
{MOD_CORRECTIVESMOOTH_RESTSOURCE_ORCO, "ORCO", 0, "Original Coords",
"Use base mesh vert coords as the rest position"},
{MOD_CORRECTIVESMOOTH_RESTSOURCE_BIND, "BIND", 0, "Bind Coords",
@@ -2490,7 +2490,7 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_cast_type_items[] = {
+ static const EnumPropertyItem prop_cast_type_items[] = {
{MOD_CAST_TYPE_SPHERE, "SPHERE", 0, "Sphere", ""},
{MOD_CAST_TYPE_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
{MOD_CAST_TYPE_CUBOID, "CUBOID", 0, "Cuboid", ""},
@@ -2573,7 +2573,7 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
#if 0
- static EnumPropertyItem prop_mode_items[] = {
+ static const EnumPropertyItem prop_mode_items[] = {
{0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"},
{1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"},
{0, NULL, 0, NULL, NULL}
@@ -2828,7 +2828,7 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_smoke_type_items[] = {
+ static const EnumPropertyItem prop_smoke_type_items[] = {
{0, "NONE", 0, "None", ""},
{MOD_SMOKE_TYPE_DOMAIN, "DOMAIN", 0, "Domain", ""},
{MOD_SMOKE_TYPE_FLOW, "FLOW", 0, "Flow", "Inflow/Outflow"},
@@ -2909,7 +2909,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_limit_method_items[] = {
+ static const EnumPropertyItem prop_limit_method_items[] = {
{0, "NONE", 0, "None", "Bevel the entire mesh by a constant amount"},
{MOD_BEVEL_ANGLE, "ANGLE", 0, "Angle", "Only bevel edges with sharp enough angles between faces"},
{MOD_BEVEL_WEIGHT, "WEIGHT", 0, "Weight",
@@ -2919,7 +2919,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_val_type_items[] = {
+ static const EnumPropertyItem prop_val_type_items[] = {
{MOD_BEVEL_AMT_OFFSET, "OFFSET", 0, "Offset", "Amount is offset of new edges from original"},
{MOD_BEVEL_AMT_WIDTH, "WIDTH", 0, "Width", "Amount is width of new face"},
{MOD_BEVEL_AMT_DEPTH, "DEPTH", 0, "Depth", "Amount is perpendicular distance from original edge to bevel face"},
@@ -2928,7 +2928,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
};
/* TO BE DEPRECATED */
- static EnumPropertyItem prop_edge_weight_method_items[] = {
+ static const EnumPropertyItem prop_edge_weight_method_items[] = {
{0, "AVERAGE", 0, "Average", ""},
{MOD_BEVEL_EMIN, "SHARPEST", 0, "Sharpest", ""},
{MOD_BEVEL_EMAX, "LARGEST", 0, "Largest", ""},
@@ -3018,7 +3018,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem shrink_type_items[] = {
+ static const EnumPropertyItem shrink_type_items[] = {
{MOD_SHRINKWRAP_NEAREST_SURFACE, "NEAREST_SURFACEPOINT", 0, "Nearest Surface Point",
"Shrink the mesh to the nearest target surface"},
{MOD_SHRINKWRAP_PROJECT, "PROJECT", 0, "Project",
@@ -3028,7 +3028,7 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem shrink_face_cull_items[] = {
+ static const EnumPropertyItem shrink_face_cull_items[] = {
{0, "OFF", 0, "Off", "No culling"},
{MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE, "FRONT", 0, "Front", "No projection when in front of the face"},
{MOD_SHRINKWRAP_CULL_TARGET_BACKFACE, "BACK", 0, "Back", "No projection when behind the face"},
@@ -3155,7 +3155,7 @@ static void rna_def_modifier_mask(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem modifier_mask_mode_items[] = {
+ static const EnumPropertyItem modifier_mask_mode_items[] = {
{MOD_MASK_MODE_VGROUP, "VERTEX_GROUP", 0, "Vertex Group", ""},
{MOD_MASK_MODE_ARM, "ARMATURE", 0, "Armature", ""},
{0, NULL, 0, NULL, NULL}
@@ -3195,7 +3195,7 @@ static void rna_def_modifier_simpledeform(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem simple_deform_mode_items[] = {
+ static const EnumPropertyItem simple_deform_mode_items[] = {
{MOD_SIMPLEDEFORM_MODE_TWIST, "TWIST", 0, "Twist", "Rotate around the Z axis of the modifier space"},
{MOD_SIMPLEDEFORM_MODE_BEND, "BEND", 0, "Bend", "Bend the mesh over the Z axis of the modifier space"},
{MOD_SIMPLEDEFORM_MODE_TAPER, "TAPER", 0, "Taper", "Linearly scale along Z axis of the modifier space"},
@@ -3557,7 +3557,7 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna)
static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA *srna,
const char *mask_vgroup_setter, const char *mask_uvlayer_setter)
{
- static EnumPropertyItem weightvg_mask_tex_map_items[] = {
+ static const EnumPropertyItem weightvg_mask_tex_map_items[] = {
{MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", "Use local generated coordinates"},
{MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", "Use global coordinates"},
{MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", "Use local generated coordinates of another object"},
@@ -3565,7 +3565,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA *
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem weightvg_mask_tex_used_items[] = {
+ static const EnumPropertyItem weightvg_mask_tex_used_items[] = {
{MOD_WVG_MASK_TEX_USE_INT, "INT", 0, "Intensity", ""},
{MOD_WVG_MASK_TEX_USE_RED, "RED", 0, "Red", ""},
{MOD_WVG_MASK_TEX_USE_GREEN, "GREEN", 0, "Green", ""},
@@ -3623,7 +3623,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna), StructRNA *
static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
{
- static EnumPropertyItem weightvg_edit_falloff_type_items[] = {
+ static const EnumPropertyItem weightvg_edit_falloff_type_items[] = {
{MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"},
{MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""},
{MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
@@ -3704,7 +3704,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
{
- static EnumPropertyItem weightvg_mix_modes_items[] = {
+ static const EnumPropertyItem weightvg_mix_modes_items[] = {
{MOD_WVG_MIX_SET, "SET", 0, "Replace", "Replace VGroup A's weights by VGroup B's ones"},
{MOD_WVG_MIX_ADD, "ADD", 0, "Add", "Add VGroup B's weights to VGroup A's ones"},
{MOD_WVG_MIX_SUB, "SUB", 0, "Subtract", "Subtract VGroup B's weights from VGroup A's ones"},
@@ -3715,7 +3715,7 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem weightvg_mix_set_items[] = {
+ static const EnumPropertyItem weightvg_mix_set_items[] = {
{MOD_WVG_SET_ALL, "ALL", 0, "All", "Affect all vertices (might add some to VGroup A)"},
{MOD_WVG_SET_A, "A", 0, "VGroup A", "Affect vertices in VGroup A"},
{MOD_WVG_SET_B, "B", 0, "VGroup B", "Affect vertices in VGroup B (might add some to VGroup A)"},
@@ -3778,7 +3778,7 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
{
- static EnumPropertyItem weightvg_proximity_modes_items[] = {
+ static const EnumPropertyItem weightvg_proximity_modes_items[] = {
{MOD_WVG_PROXIMITY_OBJECT, "OBJECT", 0, "Object",
"Use distance between affected and target objects"},
{MOD_WVG_PROXIMITY_GEOMETRY, "GEOMETRY", 0, "Geometry",
@@ -3787,14 +3787,14 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem proximity_geometry_items[] = {
+ static const EnumPropertyItem proximity_geometry_items[] = {
{MOD_WVG_PROXIMITY_GEOM_VERTS, "VERTEX", 0, "Vertex", "Compute distance to nearest vertex"},
{MOD_WVG_PROXIMITY_GEOM_EDGES, "EDGE", 0, "Edge", "Compute distance to nearest edge"},
{MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", 0, "Face", "Compute distance to nearest face"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem weightvg_proximity_falloff_type_items[] = {
+ static const EnumPropertyItem weightvg_proximity_falloff_type_items[] = {
{MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", "Null action"},
/* No curve mapping here! */
{MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
@@ -3870,7 +3870,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
static void rna_def_modifier_remesh(BlenderRNA *brna)
{
- static EnumPropertyItem mode_items[] = {
+ static const EnumPropertyItem mode_items[] = {
{MOD_REMESH_CENTROID, "BLOCKS", 0, "Blocks", "Output a blocky surface with no smoothing"},
{MOD_REMESH_MASS_POINT, "SMOOTH", 0, "Smooth", "Output a smooth surface with no sharp-features detection"},
{MOD_REMESH_SHARP_FEATURES, "SHARP", 0, "Sharp",
@@ -3937,7 +3937,7 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem geometry_items[] = {
+ static const EnumPropertyItem geometry_items[] = {
{MOD_OCEAN_GEOM_GENERATE, "GENERATE", 0, "Generate",
"Generate ocean surface geometry at the specified resolution"},
{MOD_OCEAN_GEOM_DISPLACE, "DISPLACE", 0, "Displace", "Displace existing geometry according to simulation"},
@@ -4174,13 +4174,13 @@ static void rna_def_modifier_triangulate(BlenderRNA *brna)
static void rna_def_modifier_meshcache(BlenderRNA *brna)
{
- static EnumPropertyItem prop_format_type_items[] = {
+ static const EnumPropertyItem prop_format_type_items[] = {
{MOD_MESHCACHE_TYPE_MDD, "MDD", 0, "MDD ", ""},
{MOD_MESHCACHE_TYPE_PC2, "PC2", 0, "PC2", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_deform_mode_items[] = {
+ static const EnumPropertyItem prop_deform_mode_items[] = {
{MOD_MESHCACHE_DEFORM_OVERWRITE, "OVERWRITE", 0, "Overwrite",
"Replace vertex coords with cached values"},
{MOD_MESHCACHE_DEFORM_INTEGRATE, "INTEGRATE", 0, "Integrate",
@@ -4188,7 +4188,7 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_interpolation_type_items[] = {
+ static const EnumPropertyItem prop_interpolation_type_items[] = {
{MOD_MESHCACHE_INTERP_NONE, "NONE", 0, "None ", ""},
{MOD_MESHCACHE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""},
/* for cardinal we'd need to read 4x cache's */
@@ -4196,7 +4196,7 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_time_type_items[] = {
+ static const EnumPropertyItem prop_time_type_items[] = {
/* use 'eval_frame' */
{MOD_MESHCACHE_TIME_FRAME, "FRAME", 0, "Frame", "Control playback using a frame-number "
"(ignoring time FPS and start frame from the file)"},
@@ -4207,7 +4207,7 @@ static void rna_def_modifier_meshcache(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_time_play_items[] = {
+ static const EnumPropertyItem prop_time_play_items[] = {
{MOD_MESHCACHE_PLAY_CFEA, "SCENE", 0, "Scene", "Use the time from the scene"},
{MOD_MESHCACHE_PLAY_EVAL, "CUSTOM", 0, "Custom", "Use the modifier's own time evaluation"},
{0, NULL, 0, NULL, NULL}
@@ -4338,7 +4338,7 @@ static void rna_def_modifier_meshseqcache(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object Path", "Path to the object in the Alembic archive used to lookup geometric data");
RNA_def_property_update(prop, 0, "rna_MeshSequenceCache_object_path_update");
- static EnumPropertyItem read_flag_items[] = {
+ static const EnumPropertyItem read_flag_items[] = {
{MOD_MESHSEQ_READ_VERT, "VERT", 0, "Vertex", ""},
{MOD_MESHSEQ_READ_POLY, "POLY", 0, "Faces", ""},
{MOD_MESHSEQ_READ_UV, "UV", 0, "UV", ""},
@@ -4472,7 +4472,7 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem DT_layer_vert_items[] = {
+ static const EnumPropertyItem DT_layer_vert_items[] = {
{DT_TYPE_MDEFORMVERT, "VGROUP_WEIGHTS", 0, "Vertex Group(s)", "Transfer active or all vertex groups"},
#if 0 /* TODO */
{DT_TYPE_SHAPEKEY, "SHAPEKEYS", 0, "Shapekey(s)", "Transfer active or all shape keys"},
@@ -4484,7 +4484,7 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem DT_layer_edge_items[] = {
+ static const EnumPropertyItem DT_layer_edge_items[] = {
{DT_TYPE_SHARP_EDGE, "SHARP_EDGE", 0, "Sharp", "Transfer sharp mark"},
{DT_TYPE_SEAM, "SEAM", 0, "UV Seam", "Transfer UV seam mark"},
{DT_TYPE_CREASE, "CREASE", 0, "Subsurf Crease", "Transfer crease values"},
@@ -4493,14 +4493,14 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem DT_layer_loop_items[] = {
+ static const EnumPropertyItem DT_layer_loop_items[] = {
{DT_TYPE_LNOR, "CUSTOM_NORMAL", 0, "Custom Normals", "Transfer custom normals"},
{DT_TYPE_VCOL, "VCOL", 0, "VCol", "Vertex (face corners) colors"},
{DT_TYPE_UV, "UV", 0, "UVs", "Transfer UV layers"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem DT_layer_poly_items[] = {
+ static const EnumPropertyItem DT_layer_poly_items[] = {
{DT_TYPE_SHARP_FACE, "SMOOTH", 0, "Smooth", "Transfer flat/smooth mark"},
{DT_TYPE_FREESTYLE_FACE, "FREESTYLE_FACE", 0, "Freestyle Mark", "Transfer Freestyle face mark"},
{0, NULL, 0, NULL, NULL}
@@ -4695,7 +4695,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_mode_items[] = {
+ static const EnumPropertyItem prop_mode_items[] = {
{MOD_NORMALEDIT_MODE_RADIAL, "RADIAL", 0, "Radial",
"From an ellipsoid (shape defined by the boundbox's dimensions, target is optional)"},
{MOD_NORMALEDIT_MODE_DIRECTIONAL, "DIRECTIONAL", 0, "Directional",
@@ -4703,7 +4703,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mix_mode_items[] = {
+ static const EnumPropertyItem prop_mix_mode_items[] = {
{MOD_NORMALEDIT_MIX_COPY, "COPY", 0, "Copy", "Copy new normals (overwrite existing)"},
{MOD_NORMALEDIT_MIX_ADD, "ADD", 0, "Add", "Copy sum of new and old normals"},
{MOD_NORMALEDIT_MIX_SUB, "SUB", 0, "Subtract", "Copy new normals minus old normals"},
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index 925bc048bc3..850b1cd706b 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -211,7 +211,7 @@ static void rna_def_moviecliUser(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem clip_render_size_items[] = {
+ static const EnumPropertyItem clip_render_size_items[] = {
{MCLIP_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""},
{MCLIP_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""},
{MCLIP_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""},
@@ -258,7 +258,7 @@ static void rna_def_movieclip(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem clip_source_items[] = {
+ static const EnumPropertyItem clip_source_items[] = {
{MCLIP_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
{MCLIP_SRC_MOVIE, "MOVIE", 0, "Movie File", "Movie file"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 0e43f12b64b..a14508ecb18 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -470,7 +470,7 @@ static void rna_NlaTrack_solo_set(PointerRNA *ptr, int value)
#else
/* enum defines exported for rna_animation.c */
-EnumPropertyItem rna_enum_nla_mode_blend_items[] = {
+const EnumPropertyItem rna_enum_nla_mode_blend_items[] = {
{NLASTRIP_MODE_REPLACE, "REPLACE", 0, "Replace",
"Result strip replaces the accumulated results by amount specified by influence"},
{NLASTRIP_MODE_ADD, "ADD", 0, "Add", "Weighted result of strip is added to the accumulated results"},
@@ -481,7 +481,7 @@ EnumPropertyItem rna_enum_nla_mode_blend_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_nla_mode_extend_items[] = {
+const EnumPropertyItem rna_enum_nla_mode_extend_items[] = {
{NLASTRIP_EXTEND_NOTHING, "NOTHING", 0, "Nothing", "Strip has no influence past its extents"},
{NLASTRIP_EXTEND_HOLD, "HOLD", 0, "Hold",
"Hold the first frame if no previous strips in track, and always hold last frame"},
@@ -520,7 +520,7 @@ static void rna_def_nlastrip(BlenderRNA *brna)
PropertyRNA *prop;
/* enum defs */
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{NLASTRIP_TYPE_CLIP, "CLIP", 0, "Action Clip", "NLA Strip references some Action"},
{NLASTRIP_TYPE_TRANSITION, "TRANSITION", 0, "Transition", "NLA Strip 'transitions' between adjacent strips"},
{NLASTRIP_TYPE_META, "META", 0, "Meta", "NLA Strip acts as a container for adjacent strips"},
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 0f59451e17c..9147d0a0bc8 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -68,21 +68,21 @@
#include "DEG_depsgraph.h"
-EnumPropertyItem rna_enum_node_socket_in_out_items[] = {
+const EnumPropertyItem rna_enum_node_socket_in_out_items[] = {
{ SOCK_IN, "IN", 0, "Input", "" },
{ SOCK_OUT, "OUT", 0, "Output", "" },
{ 0, NULL, 0, NULL, NULL }
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem rna_enum_node_socket_draw_shape_items[] = {
+static const EnumPropertyItem rna_enum_node_socket_draw_shape_items[] = {
{SOCK_DRAW_SHAPE_CIRCLE, "CIRCLE", 0, "Circle", ""},
{SOCK_DRAW_SHAPE_SQUARE, "SQUARE", 0, "Square", ""},
{SOCK_DRAW_SHAPE_DIAMOND, "DIAMOND", 0, "Diamond", ""},
{0, NULL, 0, NULL, NULL }
};
-static EnumPropertyItem node_socket_type_items[] = {
+static const EnumPropertyItem node_socket_type_items[] = {
{SOCK_CUSTOM, "CUSTOM", 0, "Custom", ""},
{SOCK_FLOAT, "VALUE", 0, "Value", ""},
{SOCK_INT, "INT", 0, "Int", ""},
@@ -94,14 +94,14 @@ static EnumPropertyItem node_socket_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_quality_items[] = {
+static const 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}
};
-static EnumPropertyItem node_chunksize_items[] = {
+static const 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"},
@@ -115,14 +115,14 @@ static EnumPropertyItem node_chunksize_items[] = {
#define DEF_ICON_BLANK_SKIP
#define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
#define DEF_VICO(name)
-EnumPropertyItem rna_enum_node_icon_items[] = {
+const EnumPropertyItem rna_enum_node_icon_items[] = {
#include "UI_icons.h"
{0, NULL, 0, NULL, NULL}};
#undef DEF_ICON_BLANK_SKIP
#undef DEF_ICON
#undef DEF_VICO
-EnumPropertyItem rna_enum_node_math_items[] = {
+const EnumPropertyItem rna_enum_node_math_items[] = {
{NODE_MATH_ADD, "ADD", 0, "Add", ""},
{NODE_MATH_SUB, "SUBTRACT", 0, "Subtract", ""},
{NODE_MATH_MUL, "MULTIPLY", 0, "Multiply", ""},
@@ -145,7 +145,7 @@ EnumPropertyItem rna_enum_node_math_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_node_vec_math_items[] = {
+const EnumPropertyItem rna_enum_node_vec_math_items[] = {
{0, "ADD", 0, "Add", ""},
{1, "SUBTRACT", 0, "Subtract", ""},
{2, "AVERAGE", 0, "Average", ""},
@@ -155,7 +155,7 @@ EnumPropertyItem rna_enum_node_vec_math_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_node_filter_items[] = {
+const EnumPropertyItem rna_enum_node_filter_items[] = {
{0, "SOFTEN", 0, "Soften", ""},
{1, "SHARPEN", 0, "Sharpen", ""},
{2, "LAPLACE", 0, "Laplace", ""},
@@ -167,7 +167,7 @@ EnumPropertyItem rna_enum_node_filter_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem node_sampler_type_items[] = {
+static const EnumPropertyItem node_sampler_type_items[] = {
{0, "NEAREST", 0, "Nearest", ""},
{1, "BILINEAR", 0, "Bilinear", ""},
{2, "BICUBIC", 0, "Bicubic", ""},
@@ -247,7 +247,7 @@ bNodeTreeType *rna_node_tree_type_from_enum(int value)
return result;
}
-EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, bNodeTreeType *), bool *r_free)
+const EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, bNodeTreeType *), bool *r_free)
{
EnumPropertyItem tmp = {0};
EnumPropertyItem *item = NULL;
@@ -323,7 +323,7 @@ bNodeType *rna_node_type_from_enum(int value)
return result;
}
-EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeType *), bool *r_free)
+const EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeType *), bool *r_free)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0};
@@ -397,7 +397,8 @@ bNodeSocketType *rna_node_socket_type_from_enum(int value)
return result;
}
-EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data, bNodeSocketType *), bool *r_free)
+const EnumPropertyItem *rna_node_socket_type_itemf(
+ void *data, int (*poll)(void *data, bNodeSocketType *), bool *r_free)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0};
@@ -433,7 +434,7 @@ EnumPropertyItem *rna_node_socket_type_itemf(void *data, int (*poll)(void *data,
return item;
}
-static EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *rna_node_static_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp;
@@ -2655,7 +2656,7 @@ static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *p
}
}
-static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
+static const EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0};
@@ -2678,12 +2679,12 @@ static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
return item;
}
-static EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Node_image_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
bNode *node = (bNode *)ptr->data;
Image *ima = (Image *)node->id;
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
RenderLayer *rl;
if (ima == NULL || ima->rr == NULL) {
@@ -2719,7 +2720,7 @@ static int rna_Node_image_has_views_get(PointerRNA *ptr)
return BLI_listbase_count_ex(&ima->rr->views, 2) > 1;
}
-static EnumPropertyItem *renderresult_views_add_enum(RenderView *rv)
+static const EnumPropertyItem *renderresult_views_add_enum(RenderView *rv)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0, "ALL", 0, "All", ""};
@@ -2745,12 +2746,12 @@ static EnumPropertyItem *renderresult_views_add_enum(RenderView *rv)
return item;
}
-static EnumPropertyItem *rna_Node_image_view_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Node_image_view_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
bNode *node = (bNode *)ptr->data;
Image *ima = (Image *)node->id;
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
RenderView *rv;
if (ima == NULL || ima->rr == NULL) {
@@ -2766,12 +2767,12 @@ static EnumPropertyItem *rna_Node_image_view_itemf(bContext *UNUSED(C), PointerR
return item;
}
-static EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Node_scene_layer_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
bNode *node = (bNode *)ptr->data;
Scene *sce = (Scene *)node->id;
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
RenderLayer *rl;
if (sce == NULL) {
@@ -2795,7 +2796,7 @@ static void rna_Node_scene_layer_update(Main *bmain, Scene *scene, PointerRNA *p
}
}
-static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
bNode *node = (bNode *)ptr->data;
@@ -3224,43 +3225,43 @@ void rna_ShaderNodePointDensity_density_minmax(bNode *self,
#else
-static EnumPropertyItem prop_image_layer_items[] = {
+static const EnumPropertyItem prop_image_layer_items[] = {
{ 0, "PLACEHOLDER", 0, "Placeholder", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_image_view_items[] = {
+static const EnumPropertyItem prop_image_view_items[] = {
{ 0, "ALL", 0, "All", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_scene_layer_items[] = {
+static const EnumPropertyItem prop_scene_layer_items[] = {
{ 0, "PLACEHOLDER", 0, "Placeholder", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_tri_channel_items[] = {
+static const EnumPropertyItem prop_tri_channel_items[] = {
{ 1, "R", 0, "R", ""},
{ 2, "G", 0, "G", ""},
{ 3, "B", 0, "B", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_flip_items[] = {
+static const EnumPropertyItem node_flip_items[] = {
{0, "X", 0, "Flip X", ""},
{1, "Y", 0, "Flip Y", ""},
{2, "XY", 0, "Flip X & Y", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_ycc_items[] = {
+static const EnumPropertyItem node_ycc_items[] = {
{ 0, "ITUBT601", 0, "ITU 601", ""},
{ 1, "ITUBT709", 0, "ITU 709", ""},
{ 2, "JFIF", 0, "Jpeg", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_glossy_items[] = {
+static const EnumPropertyItem node_glossy_items[] = {
{SHD_GLOSSY_SHARP, "SHARP", 0, "Sharp", ""},
{SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""},
{SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""},
@@ -3269,7 +3270,7 @@ static EnumPropertyItem node_glossy_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_anisotropic_items[] = {
+static const EnumPropertyItem node_anisotropic_items[] = {
{SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""},
{SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""},
{SHD_GLOSSY_MULTI_GGX, "MULTI_GGX", 0, "Multiscatter GGX", ""},
@@ -3277,7 +3278,7 @@ static EnumPropertyItem node_anisotropic_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_glass_items[] = {
+static const EnumPropertyItem node_glass_items[] = {
{SHD_GLOSSY_SHARP, "SHARP", 0, "Sharp", ""},
{SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""},
{SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""},
@@ -3285,32 +3286,32 @@ static EnumPropertyItem node_glass_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_refraction_items[] = {
+static const EnumPropertyItem node_refraction_items[] = {
{SHD_GLOSSY_SHARP, "SHARP", 0, "Sharp", ""},
{SHD_GLOSSY_BECKMANN, "BECKMANN", 0, "Beckmann", ""},
{SHD_GLOSSY_GGX, "GGX", 0, "GGX", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_toon_items[] = {
+static const EnumPropertyItem node_toon_items[] = {
{SHD_TOON_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""},
{SHD_TOON_GLOSSY, "GLOSSY", 0, "Glossy", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_hair_items[] = {
+static const EnumPropertyItem node_hair_items[] = {
{SHD_HAIR_REFLECTION, "Reflection", 0, "Reflection", ""},
{SHD_HAIR_TRANSMISSION, "Transmission", 0, "Transmission", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_script_mode_items[] = {
+static const EnumPropertyItem node_script_mode_items[] = {
{NODE_SCRIPT_INTERNAL, "INTERNAL", 0, "Internal", "Use internal text data-block"},
{NODE_SCRIPT_EXTERNAL, "EXTERNAL", 0, "External", "Use external .osl or .oso file"},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem node_principled_distribution_items[] = {
+static const EnumPropertyItem node_principled_distribution_items[] = {
{ SHD_GLOSSY_GGX, "GGX", 0, "GGX", "" },
{ SHD_GLOSSY_MULTI_GGX, "MULTI_GGX", 0, "Multiscatter GGX", "" },
{ 0, NULL, 0, NULL, NULL }
@@ -3570,7 +3571,7 @@ static void def_sh_material(StructRNA *srna)
static void def_sh_mapping(StructRNA *srna)
{
- static EnumPropertyItem prop_vect_type_items[] = {
+ static const EnumPropertyItem prop_vect_type_items[] = {
{TEXMAP_TYPE_TEXTURE, "TEXTURE", 0, "Texture", "Transform a texture by inverse mapping the texture coordinate"},
{TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"},
{TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"},
@@ -3689,7 +3690,7 @@ static void def_sh_tex(StructRNA *srna)
static void def_sh_tex_sky(StructRNA *srna)
{
- static EnumPropertyItem prop_sky_type[] = {
+ static const EnumPropertyItem prop_sky_type[] = {
{SHD_SKY_OLD, "PREETHAM", 0, "Preetham", ""},
{SHD_SKY_NEW, "HOSEK_WILKIE", 0, "Hosek / Wilkie", ""},
{0, NULL, 0, NULL, NULL}
@@ -3806,7 +3807,7 @@ static void def_sh_tex_image(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_image_extension[] = {
+ static const EnumPropertyItem prop_image_extension[] = {
{SHD_IMAGE_EXTENSION_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"},
{SHD_IMAGE_EXTENSION_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"},
{SHD_IMAGE_EXTENSION_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"},
@@ -3860,7 +3861,7 @@ static void def_sh_tex_image(StructRNA *srna)
static void def_sh_tex_gradient(StructRNA *srna)
{
- static EnumPropertyItem prop_gradient_type[] = {
+ static const EnumPropertyItem prop_gradient_type[] = {
{SHD_BLEND_LINEAR, "LINEAR", 0, "Linear", "Create a linear progression"},
{SHD_BLEND_QUADRATIC, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"},
{SHD_BLEND_EASING, "EASING", 0, "Easing", "Create a progression easing from one step to the next"},
@@ -3948,7 +3949,7 @@ static void def_sh_tex_magic(StructRNA *srna)
static void def_sh_tex_musgrave(StructRNA *srna)
{
- static EnumPropertyItem prop_musgrave_type[] = {
+ static const EnumPropertyItem prop_musgrave_type[] = {
{SHD_MUSGRAVE_MULTIFRACTAL, "MULTIFRACTAL", 0, "Multifractal", ""},
{SHD_MUSGRAVE_RIDGED_MULTIFRACTAL, "RIDGED_MULTIFRACTAL", 0, "Ridged Multifractal", ""},
{SHD_MUSGRAVE_HYBRID_MULTIFRACTAL, "HYBRID_MULTIFRACTAL", 0, "Hybrid Multifractal", ""},
@@ -3971,7 +3972,7 @@ static void def_sh_tex_musgrave(StructRNA *srna)
static void def_sh_tex_voronoi(StructRNA *srna)
{
- static EnumPropertyItem prop_coloring_items[] = {
+ static const EnumPropertyItem prop_coloring_items[] = {
{SHD_VORONOI_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"},
{SHD_VORONOI_CELLS, "CELLS", 0, "Cells", "Color cells by position"},
{0, NULL, 0, NULL, NULL}
@@ -3991,13 +3992,13 @@ static void def_sh_tex_voronoi(StructRNA *srna)
static void def_sh_tex_wave(StructRNA *srna)
{
- static EnumPropertyItem prop_wave_type_items[] = {
+ static const EnumPropertyItem prop_wave_type_items[] = {
{SHD_WAVE_BANDS, "BANDS", 0, "Bands", "Use standard wave texture in bands"},
{SHD_WAVE_RINGS, "RINGS", 0, "Rings", "Use wave texture in rings"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_wave_profile_items[] = {
+ static const EnumPropertyItem prop_wave_profile_items[] = {
{SHD_WAVE_PROFILE_SIN, "SIN", 0, "Sine", "Use a standard sine profile"},
{SHD_WAVE_PROFILE_SAW, "SAW", 0, "Saw", "Use a sawtooth profile"},
{0, NULL, 0, NULL, NULL}
@@ -4040,14 +4041,14 @@ static void def_sh_tex_coord(StructRNA *srna)
static void def_sh_vect_transform(StructRNA *srna)
{
- static EnumPropertyItem prop_vect_type_items[] = {
+ static const EnumPropertyItem prop_vect_type_items[] = {
{SHD_VECT_TRANSFORM_TYPE_POINT, "POINT", 0, "Point", "Transform a point"},
{SHD_VECT_TRANSFORM_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"},
{SHD_VECT_TRANSFORM_TYPE_NORMAL, "NORMAL", 0, "Normal", "Transform a normal vector with unit length"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_vect_space_items[] = {
+ static const EnumPropertyItem prop_vect_space_items[] = {
{SHD_VECT_TRANSFORM_SPACE_WORLD, "WORLD", 0, "World", ""},
{SHD_VECT_TRANSFORM_SPACE_OBJECT, "OBJECT", 0, "Object", ""},
{SHD_VECT_TRANSFORM_SPACE_CAMERA, "CAMERA", 0, "Camera", ""},
@@ -4092,7 +4093,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem point_source_items[] = {
+ static const EnumPropertyItem point_source_items[] = {
{SHD_POINTDENSITY_SOURCE_PSYS, "PARTICLE_SYSTEM", 0, "Particle System",
"Generate point density from a particle system"},
{SHD_POINTDENSITY_SOURCE_OBJECT, "OBJECT", 0, "Object Vertices",
@@ -4110,13 +4111,13 @@ static void def_sh_tex_pointdensity(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem space_items[] = {
+ static const EnumPropertyItem space_items[] = {
{SHD_POINTDENSITY_SPACE_OBJECT, "OBJECT", 0, "Object Space", ""},
{SHD_POINTDENSITY_SPACE_WORLD, "WORLD", 0, "World Space", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem particle_color_source_items[] = {
+ static const EnumPropertyItem particle_color_source_items[] = {
{SHD_POINTDENSITY_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age",
"Lifetime mapped as 0.0 - 1.0 intensity"},
{SHD_POINTDENSITY_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed",
@@ -4126,7 +4127,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem vertex_color_source_items[] = {
+ static const EnumPropertyItem vertex_color_source_items[] = {
{SHD_POINTDENSITY_COLOR_VERTCOL, "VERTEX_COLOR", 0, "Vertex Color", "Vertex color layer"},
{SHD_POINTDENSITY_COLOR_VERTWEIGHT, "VERTEX_WEIGHT", 0, "Vertex Weight", "Vertex group weight"},
{SHD_POINTDENSITY_COLOR_VERTNOR, "VERTEX_NORMAL", 0, "Vertex Normal",
@@ -4135,7 +4136,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna)
};
/* TODO(sergey): Use some mnemonic names for the hardcoded values here. */
- static EnumPropertyItem calc_mode_items[] = {
+ static const EnumPropertyItem calc_mode_items[] = {
{0, "VIEWPORT", 0, "Viewport", "Canculate density using viewport settings"},
{1, "RENDER", 0, "Render", "Canculate duplis using render settings"},
{0, NULL, 0, NULL, NULL}
@@ -4348,7 +4349,7 @@ static void def_sh_uvalongstroke(StructRNA *srna)
static void def_sh_normal_map(StructRNA *srna)
{
- static EnumPropertyItem prop_space_items[] = {
+ static const EnumPropertyItem prop_space_items[] = {
{SHD_NORMAL_MAP_TANGENT, "TANGENT", 0, "Tangent Space", "Tangent space normal mapping"},
{SHD_NORMAL_MAP_OBJECT, "OBJECT", 0, "Object Space", "Object space normal mapping"},
{SHD_NORMAL_MAP_WORLD, "WORLD", 0, "World Space", "World space normal mapping"},
@@ -4375,13 +4376,13 @@ static void def_sh_normal_map(StructRNA *srna)
static void def_sh_tangent(StructRNA *srna)
{
- static EnumPropertyItem prop_direction_type_items[] = {
+ static const EnumPropertyItem prop_direction_type_items[] = {
{SHD_TANGENT_RADIAL, "RADIAL", 0, "Radial", "Radial tangent around the X, Y or Z axis"},
{SHD_TANGENT_UVMAP, "UV_MAP", 0, "UV Map", "Tangent from UV map"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_axis_items[] = {
+ static const EnumPropertyItem prop_axis_items[] = {
{SHD_TANGENT_AXIS_X, "X", 0, "X", "X axis"},
{SHD_TANGENT_AXIS_Y, "Y", 0, "Y", "Y axis"},
{SHD_TANGENT_AXIS_Z, "Z", 0, "Z", "Z axis"},
@@ -4412,7 +4413,7 @@ static void def_sh_tangent(StructRNA *srna)
static void def_sh_subsurface(StructRNA *srna)
{
- static EnumPropertyItem prop_subsurface_falloff_items[] = {
+ static const EnumPropertyItem prop_subsurface_falloff_items[] = {
{SHD_SUBSURFACE_CUBIC, "CUBIC", 0, "Cubic", "Simple cubic falloff function"},
{SHD_SUBSURFACE_GAUSSIAN, "GAUSSIAN", 0, "Gaussian", "Normal distribution, multiple can be combined to fit more complex profiles"},
{SHD_SUBSURFACE_BURLEY, "BURLEY", 0, "Christensen-Burley", "Approximation to physically based volume scattering"},
@@ -4524,7 +4525,7 @@ static void def_cmp_blur(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem filter_type_items[] = {
+ static const EnumPropertyItem filter_type_items[] = {
{R_FILTER_BOX, "FLAT", 0, "Flat", ""},
{R_FILTER_TENT, "TENT", 0, "Tent", ""},
{R_FILTER_QUAD, "QUAD", 0, "Quadratic", ""},
@@ -4536,7 +4537,7 @@ static void def_cmp_blur(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem aspect_correction_type_items[] = {
+ static const EnumPropertyItem aspect_correction_type_items[] = {
{CMP_NODE_BLUR_ASPECT_NONE, "NONE", 0, "None", ""},
{CMP_NODE_BLUR_ASPECT_Y, "Y", 0, "Y", ""},
{CMP_NODE_BLUR_ASPECT_X, "X", 0, "X", ""},
@@ -4723,7 +4724,7 @@ static void def_cmp_levels(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem channel_items[] = {
+ static const EnumPropertyItem channel_items[] = {
{1, "COMBINED_RGB", 0, "C", "Combined RGB"},
{2, "RED", 0, "R", "Red Channel"},
{3, "GREEN", 0, "G", "Green Channel"},
@@ -4807,7 +4808,7 @@ static void def_cmp_image(StructRNA *srna)
PropertyRNA *prop;
#if 0
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{IMA_SRC_FILE, "IMAGE", 0, "Image", ""},
{IMA_SRC_MOVIE, "MOVIE", "Movie", ""},
{IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""},
@@ -4981,7 +4982,7 @@ static void def_cmp_dilate_erode(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem mode_items[] = {
+ static const EnumPropertyItem mode_items[] = {
{CMP_NODE_DILATEERODE_STEP, "STEP", 0, "Step", ""},
{CMP_NODE_DILATEERODE_DISTANCE_THRESH, "THRESHOLD", 0, "Threshold", ""},
{CMP_NODE_DILATEERODE_DISTANCE, "DISTANCE", 0, "Distance", ""},
@@ -5061,7 +5062,7 @@ static void def_cmp_scale(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem space_items[] = {
+ static const EnumPropertyItem space_items[] = {
{CMP_SCALE_RELATIVE, "RELATIVE", 0, "Relative", ""},
{CMP_SCALE_ABSOLUTE, "ABSOLUTE", 0, "Absolute", ""},
{CMP_SCALE_SCENEPERCENT, "SCENE_SIZE", 0, "Scene Size", ""},
@@ -5162,7 +5163,7 @@ static void def_cmp_distance_matte(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem color_space_items[] = {
+ static const EnumPropertyItem color_space_items[] = {
{1, "RGB", 0, "RGB", "RGB color space"},
{2, "YCC", 0, "YCC", "YCbCr Suppression"},
{0, NULL, 0, NULL, NULL}
@@ -5196,21 +5197,21 @@ static void def_cmp_color_spill(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem channel_items[] = {
+ static const EnumPropertyItem channel_items[] = {
{1, "R", 0, "R", "Red Spill Suppression"},
{2, "G", 0, "G", "Green Spill Suppression"},
{3, "B", 0, "B", "Blue Spill Suppression"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem limit_channel_items[] = {
+ static const EnumPropertyItem limit_channel_items[] = {
{0, "R", 0, "R", "Limit by Red"},
{1, "G", 0, "G", "Limit by Green"},
{2, "B", 0, "B", "Limit by Blue"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem algorithm_items[] = {
+ static const EnumPropertyItem algorithm_items[] = {
{0, "SIMPLE", 0, "Simple", "Simple Limit Algorithm"},
{1, "AVERAGE", 0, "Average", "Average Limit Algorithm"},
{0, NULL, 0, NULL, NULL}
@@ -5340,7 +5341,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem color_space_items[] = {
+ static const EnumPropertyItem color_space_items[] = {
{CMP_NODE_CHANNEL_MATTE_CS_RGB, "RGB", 0, "RGB", "RGB Color Space"},
{CMP_NODE_CHANNEL_MATTE_CS_HSV, "HSV", 0, "HSV", "HSV Color Space"},
{CMP_NODE_CHANNEL_MATTE_CS_YUV, "YUV", 0, "YUV", "YUV Color Space"},
@@ -5348,7 +5349,7 @@ static void def_cmp_channel_matte(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem algorithm_items[] = {
+ static const EnumPropertyItem algorithm_items[] = {
{0, "SINGLE", 0, "Single", "Limit by single channel"},
{1, "MAX", 0, "Max", "Limit by max of other channels "},
{0, NULL, 0, NULL, NULL}
@@ -5445,13 +5446,13 @@ static void def_cmp_double_edge_mask(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem BufEdgeMode_items[] = {
+ static const EnumPropertyItem BufEdgeMode_items[] = {
{0, "BLEED_OUT", 0, "Bleed Out", "Allow mask pixels to bleed along edges"},
{1, "KEEP_IN", 0, "Keep In", "Restrict mask pixels from touching edges"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem InnerEdgeMode_items[] = {
+ static const EnumPropertyItem InnerEdgeMode_items[] = {
{0, "ALL", 0, "All", "All pixels on inner mask edge are considered during mask calculation"},
{1, "ADJACENT_ONLY", 0, "Adjacent Only",
"Only inner mask pixels adjacent to outer mask pixels are considered during mask calculation"},
@@ -5486,7 +5487,7 @@ static void def_cmp_defocus(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem bokeh_items[] = {
+ static const EnumPropertyItem bokeh_items[] = {
{8, "OCTAGON", 0, "Octagonal", "8 sides"},
{7, "HEPTAGON", 0, "Heptagonal", "7 sides"},
{6, "HEXAGON", 0, "Hexagonal", "6 sides"},
@@ -5730,7 +5731,7 @@ static void def_cmp_premul_key(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{0, "STRAIGHT_TO_PREMUL", 0, "Straight to Premul", ""},
{1, "PREMUL_TO_STRAIGHT", 0, "Premul to Straight", ""},
{0, NULL, 0, NULL, NULL}
@@ -5748,7 +5749,7 @@ static void def_cmp_glare(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{3, "GHOSTS", 0, "Ghosts", ""},
{2, "STREAKS", 0, "Streaks", ""},
{1, "FOG_GLOW", 0, "Fog Glow", ""},
@@ -5756,7 +5757,7 @@ static void def_cmp_glare(StructRNA *srna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem quality_items[] = {
+ static const EnumPropertyItem quality_items[] = {
{0, "HIGH", 0, "High", ""},
{1, "MEDIUM", 0, "Medium", ""},
{2, "LOW", 0, "Low", ""},
@@ -5844,7 +5845,7 @@ static void def_cmp_tonemap(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{1, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
{0, "RH_SIMPLE", 0, "Rh Simple", ""},
{0, NULL, 0, NULL, NULL}
@@ -5931,7 +5932,7 @@ static void def_cmp_colorbalance(StructRNA *srna)
PropertyRNA *prop;
static float default_1[3] = {1.f, 1.f, 1.f};
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{0, "LIFT_GAMMA_GAIN", 0, "Lift/Gamma/Gain", ""},
{1, "OFFSET_POWER_SLOPE", 0, "Offset/Power/Slope (ASC-CDL)", "ASC-CDL standard color correction"},
{0, NULL, 0, NULL, NULL}
@@ -6080,7 +6081,7 @@ static void def_cmp_moviedistortion(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem distortion_type_items[] = {
+ static const EnumPropertyItem distortion_type_items[] = {
{0, "UNDISTORT", 0, "Undistort", ""},
{1, "DISTORT", 0, "Distort", ""},
{0, NULL, 0, NULL, NULL}
@@ -6104,7 +6105,7 @@ static void def_cmp_mask(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem aspect_type_items[] = {
+ static const EnumPropertyItem aspect_type_items[] = {
{0, "SCENE", 0, "Scene Size", ""},
{CMP_NODEFLAG_MASK_FIXED, "FIXED", 0, "Fixed", "Use pixel size for the buffer"},
{CMP_NODEFLAG_MASK_FIXED_SCENE, "FIXED_SCENE", 0, "Fixed/Scene", "Pixel size scaled by scene percentage"},
@@ -6178,7 +6179,7 @@ static void dev_cmd_transform(StructRNA *srna)
/* -- Compositor Nodes ------------------------------------------------------ */
-static EnumPropertyItem node_masktype_items[] = {
+static const EnumPropertyItem node_masktype_items[] = {
{0, "ADD", 0, "Add", ""},
{1, "SUBTRACT", 0, "Subtract", ""},
{2, "MULTIPLY", 0, "Multiply", ""},
@@ -6554,7 +6555,7 @@ static void def_cmp_colorcorrection(StructRNA *srna)
static void def_cmp_viewer(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem tileorder_items[] = {
+ static const EnumPropertyItem tileorder_items[] = {
{0, "CENTEROUT", 0, "Center", "Expand from center"},
{1, "RANDOM", 0, "Random", "Random tiles"},
{2, "BOTTOMUP", 0, "Bottom up", "Expand from bottom"},
@@ -6701,7 +6702,7 @@ static void def_cmp_trackpos(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem position_items[] = {
+ static const EnumPropertyItem position_items[] = {
{CMP_TRACKPOS_ABSOLUTE, "ABSOLUTE", 0,
"Absolute", "Output absolute position of a marker"},
{CMP_TRACKPOS_RELATIVE_START, "RELATIVE_START", 0,
@@ -6746,7 +6747,7 @@ static void def_cmp_trackpos(StructRNA *srna)
static void def_cmp_translate(StructRNA *srna)
{
- static EnumPropertyItem translate_items[] = {
+ static const EnumPropertyItem translate_items[] = {
{CMP_NODE_WRAP_NONE, "NONE", 0, "None", "No wrapping on X and Y"},
{CMP_NODE_WRAP_X, "XAXIS", 0, "X Axis", "Wrap all pixels on the X axis"},
{CMP_NODE_WRAP_Y, "YAXIS", 0, "Y Axis", "Wrap all pixels on the Y axis"},
@@ -7702,11 +7703,11 @@ static void rna_def_node(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem dummy_static_type_items[] = {
+ static const EnumPropertyItem dummy_static_type_items[] = {
{NODE_CUSTOM, "CUSTOM", 0, "Custom", "Custom Node"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem node_shading_compatibilities[] = {
+ static const EnumPropertyItem node_shading_compatibilities[] = {
{NODE_OLD_SHADING, "OLD_SHADING", 0, "Old Shading", "Old shading system compatibility"},
{NODE_NEW_SHADING, "NEW_SHADING", 0, "New Shading", "New shading system compatibility"},
{0, NULL, 0, NULL, NULL}
@@ -8163,7 +8164,7 @@ static void rna_def_nodetree(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem static_type_items[] = {
+ static const EnumPropertyItem static_type_items[] = {
{NTREE_SHADER, "SHADER", ICON_MATERIAL, "Shader", "Shader nodes"},
{NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"},
{NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"},
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index e57333fb8a7..02f3b048f3a 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -61,7 +61,7 @@
#include "WM_api.h"
#include "WM_types.h"
-EnumPropertyItem rna_enum_object_mode_items[] = {
+const EnumPropertyItem rna_enum_object_mode_items[] = {
{OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object Mode", ""},
{OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit Mode", ""},
{OB_MODE_POSE, "POSE", ICON_POSE_HLT, "Pose Mode", ""},
@@ -74,7 +74,7 @@ EnumPropertyItem rna_enum_object_mode_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_object_empty_drawtype_items[] = {
+const EnumPropertyItem rna_enum_object_empty_drawtype_items[] = {
{OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""},
{OB_ARROWS, "ARROWS", 0, "Arrows", ""},
{OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
@@ -87,7 +87,7 @@ EnumPropertyItem rna_enum_object_empty_drawtype_items[] = {
};
-static EnumPropertyItem parent_type_items[] = {
+static const EnumPropertyItem parent_type_items[] = {
{PAROBJECT, "OBJECT", 0, "Object", "The object is parented to an object"},
{PARSKEL, "ARMATURE", 0, "Armature", ""},
{PARSKEL, "LATTICE", 0, "Lattice", "The object is parented to a lattice"}, /* PARSKEL reuse will give issues */
@@ -105,7 +105,7 @@ static EnumPropertyItem parent_type_items[] = {
#define DUPLI_ITEM_GROUP \
{OB_DUPLIGROUP, "GROUP", 0, "Group", "Enable group instancing"}
-static EnumPropertyItem dupli_items[] = {
+static const EnumPropertyItem dupli_items[] = {
DUPLI_ITEMS_SHARED,
DUPLI_ITEM_GROUP,
{0, NULL, 0, NULL, NULL}
@@ -119,7 +119,7 @@ static EnumPropertyItem dupli_items_nogroup[] = {
#undef DUPLI_ITEMS_SHARED
#undef DUPLI_ITEM_GROUP
-static EnumPropertyItem collision_bounds_items[] = {
+static const EnumPropertyItem collision_bounds_items[] = {
{OB_BOUND_BOX, "BOX", ICON_MESH_CUBE, "Box", ""},
{OB_BOUND_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""},
{OB_BOUND_CYLINDER, "CYLINDER", ICON_MESH_CYLINDER, "Cylinder", ""},
@@ -131,7 +131,7 @@ static EnumPropertyItem collision_bounds_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_metaelem_type_items[] = {
+const EnumPropertyItem rna_enum_metaelem_type_items[] = {
{MB_BALL, "BALL", ICON_META_BALL, "Ball", ""},
{MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""},
{MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
@@ -145,7 +145,7 @@ EnumPropertyItem rna_enum_metaelem_type_items[] = {
#define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""}
#define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""}
-EnumPropertyItem rna_enum_object_type_items[] = {
+const EnumPropertyItem rna_enum_object_type_items[] = {
{OB_MESH, "MESH", 0, "Mesh", ""},
OBTYPE_CU_CURVE,
OBTYPE_CU_SURF,
@@ -163,14 +163,14 @@ EnumPropertyItem rna_enum_object_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_object_type_curve_items[] = {
+const EnumPropertyItem rna_enum_object_type_curve_items[] = {
OBTYPE_CU_CURVE,
OBTYPE_CU_SURF,
OBTYPE_CU_FONT,
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_object_axis_items[] = {
+const EnumPropertyItem rna_enum_object_axis_items[] = {
{OB_POSX, "POS_X", 0, "+X", ""},
{OB_POSY, "POS_Y", 0, "+Y", ""},
{OB_POSZ, "POS_Z", 0, "+Z", ""},
@@ -452,7 +452,7 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, int value)
ED_object_parent(ob, ob->parent, value, ob->parsubstr);
}
-static EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Object_parent_type_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = (Object *)ptr->data;
@@ -493,7 +493,7 @@ static void rna_Object_empty_draw_type_set(PointerRNA *ptr, int value)
BKE_object_empty_draw_type_set(ob, value);
}
-static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = (Object *)ptr->data;
@@ -526,12 +526,12 @@ static void rna_Object_parent_bone_set(PointerRNA *ptr, const char *value)
ED_object_parent(ob, ob->parent, ob->partype, value);
}
-static EnumPropertyItem *rna_Object_dupli_type_itemf(
+static const EnumPropertyItem *rna_Object_dupli_type_itemf(
bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
Object *ob = (Object *)ptr->data;
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
if (ob->type == OB_EMPTY) {
item = dupli_items;
@@ -1703,7 +1703,7 @@ static void rna_def_vertex_group(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem assign_mode_items[] = {
+ static const EnumPropertyItem assign_mode_items[] = {
{WEIGHT_REPLACE, "REPLACE", 0, "Replace", "Replace"},
{WEIGHT_ADD, "ADD", 0, "Add", "Add"},
{WEIGHT_SUBTRACT, "SUBTRACT", 0, "Subtract", "Subtract"},
@@ -1808,7 +1808,7 @@ static void rna_def_material_slot(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem link_items[] = {
+ static const EnumPropertyItem link_items[] = {
{1, "OBJECT", 0, "Object", ""},
{0, "DATA", 0, "Data", ""},
{0, NULL, 0, NULL, NULL}
@@ -1849,7 +1849,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem body_type_items[] = {
+ static const EnumPropertyItem body_type_items[] = {
{OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, "No Collision", "Disable collision for this object"},
{OB_BODY_TYPE_STATIC, "STATIC", 0, "Static", "Stationary object"},
{OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, "Dynamic", "Linear physics"},
@@ -2432,14 +2432,14 @@ static void rna_def_object(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem up_items[] = {
+ static const EnumPropertyItem up_items[] = {
{OB_POSX, "X", 0, "X", ""},
{OB_POSY, "Y", 0, "Y", ""},
{OB_POSZ, "Z", 0, "Z", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem drawtype_items[] = {
+ static const EnumPropertyItem drawtype_items[] = {
{OB_BOUNDBOX, "BOUNDS", 0, "Bounds", "Draw the bounds of the object"},
{OB_WIRE, "WIRE", 0, "Wire", "Draw the object as a wireframe"},
{OB_SOLID, "SOLID", 0, "Solid", "Draw the object as a solid (if solid drawing is enabled in the viewport)"},
@@ -2448,7 +2448,7 @@ static void rna_def_object(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem boundtype_items[] = {
+ static const EnumPropertyItem boundtype_items[] = {
{OB_BOUND_BOX, "BOX", 0, "Box", "Draw bounds as box"},
{OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", "Draw bounds as sphere"},
{OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", "Draw bounds as cylinder"},
@@ -2460,7 +2460,7 @@ static void rna_def_object(BlenderRNA *brna)
/* XXX: this RNA enum define is currently duplicated for objects,
* since there is some text here which is not applicable */
- static EnumPropertyItem prop_rotmode_items[] = {
+ static const EnumPropertyItem prop_rotmode_items[] = {
{ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock"},
{ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order - prone to Gimbal Lock (default)"},
{ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order - prone to Gimbal Lock"},
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index d1dcfa41e28..5486db84b0b 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -50,7 +50,7 @@
#include "rna_internal.h" /* own include */
-static EnumPropertyItem space_items[] = {
+static const EnumPropertyItem space_items[] = {
{CONSTRAINT_SPACE_WORLD, "WORLD", 0, "World Space",
"The most gobal space in Blender"},
{CONSTRAINT_SPACE_POSE, "POSE", 0, "Pose Space",
@@ -545,13 +545,13 @@ void RNA_api_object(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem mesh_type_items[] = {
+ static const EnumPropertyItem mesh_type_items[] = {
{eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"},
{eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem dupli_eval_mode_items[] = {
+ static const EnumPropertyItem dupli_eval_mode_items[] = {
{DAG_EVAL_VIEWPORT, "VIEWPORT", 0, "Viewport", "Generate duplis using viewport settings"},
{DAG_EVAL_PREVIEW, "PREVIEW", 0, "Preview", "Generate duplis using preview settings"},
{DAG_EVAL_RENDER, "RENDER", 0, "Render", "Generate duplis using render settings"},
@@ -559,7 +559,7 @@ void RNA_api_object(StructRNA *srna)
};
#ifndef NDEBUG
- static EnumPropertyItem mesh_dm_info_items[] = {
+ static const EnumPropertyItem mesh_dm_info_items[] = {
{0, "SOURCE", 0, "Source", "Source mesh"},
{1, "DEFORM", 0, "Deform", "Objects deform mesh"},
{2, "FINAL", 0, "Final", "Objects final mesh"},
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 2ae674ea961..198a47c007e 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -41,7 +41,7 @@
#include "WM_api.h"
#include "WM_types.h"
-static EnumPropertyItem effector_shape_items[] = {
+static const EnumPropertyItem effector_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface", ""},
@@ -55,20 +55,20 @@ static EnumPropertyItem effector_shape_items[] = {
/* type specific return values only used from functions */
-static EnumPropertyItem curve_shape_items[] = {
+static const EnumPropertyItem curve_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem empty_shape_items[] = {
+static const EnumPropertyItem empty_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem vortex_shape_items[] = {
+static const EnumPropertyItem vortex_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Surface falloff (New)", ""},
@@ -76,14 +76,14 @@ static EnumPropertyItem vortex_shape_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem curve_vortex_shape_items[] = {
+static const EnumPropertyItem curve_vortex_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{PFIELD_SHAPE_SURFACE, "SURFACE", 0, "Curve (New)", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem empty_vortex_shape_items[] = {
+static const EnumPropertyItem empty_vortex_shape_items[] = {
{PFIELD_SHAPE_POINT, "POINT", 0, "Point", ""},
{PFIELD_SHAPE_PLANE, "PLANE", 0, "Plane", ""},
{0, NULL, 0, NULL, NULL}
@@ -739,7 +739,7 @@ static void rna_softbody_dependency_update(Main *bmain, Scene *scene, PointerRNA
rna_softbody_update(bmain, scene, ptr);
}
-static EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Effector_shape_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
Object *ob = NULL;
@@ -798,7 +798,7 @@ static void rna_def_pointcache(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem point_cache_compress_items[] = {
+ static const EnumPropertyItem point_cache_compress_items[] = {
{PTCACHE_COMPRESS_NO, "NO", 0, "No", "No compression"},
{PTCACHE_COMPRESS_LZO, "LIGHT", 0, "Light", "Fast but not so effective compression"},
{PTCACHE_COMPRESS_LZMA, "HEAVY", 0, "Heavy", "Effective but slow compression"},
@@ -1126,7 +1126,7 @@ static void rna_def_field(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem field_type_items[] = {
+ static const EnumPropertyItem field_type_items[] = {
{0, "NONE", 0, "None", ""},
{PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", "Radial field toward the center of object"},
{PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", "Constant force along the force object's local Z axis"},
@@ -1149,28 +1149,28 @@ static void rna_def_field(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem falloff_items[] = {
+ static const EnumPropertyItem falloff_items[] = {
{PFIELD_FALL_SPHERE, "SPHERE", 0, "Sphere", ""},
{PFIELD_FALL_TUBE, "TUBE", 0, "Tube", ""},
{PFIELD_FALL_CONE, "CONE", 0, "Cone", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem texture_items[] = {
+ static const EnumPropertyItem texture_items[] = {
{PFIELD_TEX_RGB, "RGB", 0, "RGB", ""},
{PFIELD_TEX_GRAD, "GRADIENT", 0, "Gradient", ""},
{PFIELD_TEX_CURL, "CURL", 0, "Curl", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem zdirection_items[] = {
+ static const EnumPropertyItem zdirection_items[] = {
{PFIELD_Z_BOTH, "BOTH", 0, "Both Z", ""},
{PFIELD_Z_POS, "POSITIVE", 0, "+Z", ""},
{PFIELD_Z_NEG, "NEGATIVE", 0, "-Z", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem guide_kink_items[] = {
+ static const EnumPropertyItem guide_kink_items[] = {
{0, "NONE", 0, "Nothing", ""},
{1, "CURL", 0, "Curl", ""},
{2, "RADIAL", 0, "Radial", ""},
@@ -1568,7 +1568,7 @@ static void rna_def_softbody(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem collision_type_items[] = {
+ static const EnumPropertyItem collision_type_items[] = {
{SBC_MODE_MANUAL, "MANUAL", 0, "Manual", "Manual adjust"},
{SBC_MODE_AVG, "AVERAGE", 0, "Average", "Average Spring length * Ball Size"},
{SBC_MODE_MIN, "MINIMAL", 0, "Minimal", "Minimal Spring length * Ball Size"},
@@ -1577,7 +1577,7 @@ static void rna_def_softbody(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem aerodynamics_type[] = {
+ static const EnumPropertyItem aerodynamics_type[] = {
{0, "SIMPLE", 0, "Simple", "Edges receive a drag force from surrounding media"},
{1, "LIFT_FORCE", 0, "Lift Force", "Edges receive a lift force when passing through surrounding media"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_packedfile.c b/source/blender/makesrna/intern/rna_packedfile.c
index f3da03714a1..c7891680adb 100644
--- a/source/blender/makesrna/intern/rna_packedfile.c
+++ b/source/blender/makesrna/intern/rna_packedfile.c
@@ -35,7 +35,7 @@
#include "rna_internal.h"
-EnumPropertyItem rna_enum_unpack_method_items[] = {
+const EnumPropertyItem rna_enum_unpack_method_items[] = {
{PF_USE_LOCAL, "USE_LOCAL", 0, "Use Local File", ""},
{PF_WRITE_LOCAL, "WRITE_LOCAL", 0, "Write Local File (overwrite existing)", ""},
{PF_USE_ORIGINAL, "USE_ORIGINAL", 0, "Use Original File", ""},
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 93801a508c5..021417648d0 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -55,7 +55,7 @@
#include "WM_api.h"
#ifdef RNA_RUNTIME
-static EnumPropertyItem part_from_items[] = {
+static const EnumPropertyItem part_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
@@ -64,7 +64,7 @@ static EnumPropertyItem part_from_items[] = {
#endif
#ifndef RNA_RUNTIME
-static EnumPropertyItem part_reactor_from_items[] = {
+static const EnumPropertyItem part_reactor_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
@@ -72,7 +72,7 @@ static EnumPropertyItem part_reactor_from_items[] = {
};
#endif
-static EnumPropertyItem part_dist_items[] = {
+static const EnumPropertyItem part_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{PART_DISTR_GRID, "GRID", 0, "Grid", ""},
@@ -80,14 +80,14 @@ static EnumPropertyItem part_dist_items[] = {
};
#ifdef RNA_RUNTIME
-static EnumPropertyItem part_hair_dist_items[] = {
+static const EnumPropertyItem part_hair_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
#endif
-static EnumPropertyItem part_draw_as_items[] = {
+static const EnumPropertyItem part_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -98,7 +98,7 @@ static EnumPropertyItem part_draw_as_items[] = {
};
#ifdef RNA_RUNTIME
-static EnumPropertyItem part_hair_draw_as_items[] = {
+static const EnumPropertyItem part_hair_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
@@ -106,7 +106,7 @@ static EnumPropertyItem part_hair_draw_as_items[] = {
};
#endif
-static EnumPropertyItem part_ren_as_items[] = {
+static const EnumPropertyItem part_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_HALO, "HALO", 0, "Halo", ""},
{PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -118,7 +118,7 @@ static EnumPropertyItem part_ren_as_items[] = {
};
#ifdef RNA_RUNTIME
-static EnumPropertyItem part_hair_ren_as_items[] = {
+static const EnumPropertyItem part_hair_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{PART_DRAW_OB, "OBJECT", 0, "Object", ""},
@@ -399,7 +399,7 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o
}
-static EnumPropertyItem *rna_Particle_Material_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_Particle_Material_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = CTX_data_pointer_get(C, "object").data;
@@ -1149,7 +1149,7 @@ static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
return strlen(tstr);
}
-static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
/*if (part->type==PART_REACTOR) */
@@ -1158,7 +1158,7 @@ static EnumPropertyItem *rna_Particle_from_itemf(bContext *UNUSED(C), PointerRNA
return part_from_items;
}
-static EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ParticleSettings *part = ptr->id.data;
@@ -1169,7 +1169,7 @@ static EnumPropertyItem *rna_Particle_dist_itemf(bContext *UNUSED(C), PointerRNA
return part_dist_items;
}
-static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ParticleSettings *part = ptr->id.data;
@@ -1180,7 +1180,7 @@ static EnumPropertyItem *rna_Particle_draw_as_itemf(bContext *UNUSED(C), Pointer
return part_draw_as_items;
}
-static EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_Particle_ren_as_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ParticleSettings *part = ptr->id.data;
@@ -1434,7 +1434,7 @@ static void rna_def_particle(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem alive_items[] = {
+ static const EnumPropertyItem alive_items[] = {
/*{PARS_KILLED, "KILLED", 0, "Killed", ""}, */
{PARS_DEAD, "DEAD", 0, "Dead", ""},
{PARS_UNBORN, "UNBORN", 0, "Unborn", ""},
@@ -1578,7 +1578,7 @@ static void rna_def_fluid_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem sph_solver_items[] = {
+ static const EnumPropertyItem sph_solver_items[] = {
{SPH_SOLVER_DDR, "DDR", 0, "Double-Density", "An artistic solver with strong surface tension effects (original)"},
{SPH_SOLVER_CLASSICAL, "CLASSICAL", 0, "Classical", "A more physically-accurate solver"},
{0, NULL, 0, NULL, NULL}
@@ -1728,7 +1728,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem texco_items[] = {
+ static const EnumPropertyItem texco_items[] = {
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates"},
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Use linked object's coordinates for texture coordinates"},
{TEXCO_UV, "UV", 0, "UV", "Use UV coordinates for texture coordinates"},
@@ -1738,7 +1738,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mapping_items[] = {
+ static const EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
{MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
{MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
@@ -1746,7 +1746,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_x_mapping_items[] = {
+ static const EnumPropertyItem prop_x_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -1754,7 +1754,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_y_mapping_items[] = {
+ static const EnumPropertyItem prop_y_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -1762,7 +1762,7 @@ static void rna_def_particle_settings_mtex(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_z_mapping_items[] = {
+ static const EnumPropertyItem prop_z_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -1971,14 +1971,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{PART_EMITTER, "EMITTER", 0, "Emitter", ""},
/*{PART_REACTOR, "REACTOR", 0, "Reactor", ""}, */
{PART_HAIR, "HAIR", 0, "Hair", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem phys_type_items[] = {
+ static const EnumPropertyItem phys_type_items[] = {
{PART_PHYS_NO, "NO", 0, "No", ""},
{PART_PHYS_NEWTON, "NEWTON", 0, "Newtonian", ""},
{PART_PHYS_KEYED, "KEYED", 0, "Keyed", ""},
@@ -1987,7 +1987,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem rot_mode_items[] = {
+ static const EnumPropertyItem rot_mode_items[] = {
{0, "NONE", 0, "None", ""},
{PART_ROT_NOR, "NOR", 0, "Normal", ""},
{PART_ROT_NOR_TAN, "NOR_TAN", 0, "Normal-Tangent", ""},
@@ -2001,7 +2001,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ave_mode_items[] = {
+ static const EnumPropertyItem ave_mode_items[] = {
{0, "NONE", 0, "None", ""},
{PART_AVE_VELOCITY, "VELOCITY", 0, "Velocity", ""},
{PART_AVE_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""},
@@ -2013,14 +2013,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem react_event_items[] = {
+ static const EnumPropertyItem react_event_items[] = {
{PART_EVENT_DEATH, "DEATH", 0, "Death", ""},
{PART_EVENT_COLLIDE, "COLLIDE", 0, "Collision", ""},
{PART_EVENT_NEAR, "NEAR", 0, "Near", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem child_type_items[] = {
+ static const EnumPropertyItem child_type_items[] = {
{0, "NONE", 0, "None", ""},
{PART_CHILD_PARTICLES, "SIMPLE", 0, "Simple", ""},
{PART_CHILD_FACES, "INTERPOLATED", 0, "Interpolated", ""},
@@ -2028,7 +2028,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
};
/*TODO: names, tooltips */
- static EnumPropertyItem integrator_type_items[] = {
+ static const EnumPropertyItem integrator_type_items[] = {
{PART_INT_EULER, "EULER", 0, "Euler", ""},
{PART_INT_VERLET, "VERLET", 0, "Verlet", ""},
{PART_INT_MIDPOINT, "MIDPOINT", 0, "Midpoint", ""},
@@ -2036,7 +2036,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem kink_type_items[] = {
+ static const EnumPropertyItem kink_type_items[] = {
{PART_KINK_NO, "NO", 0, "Nothing", ""},
{PART_KINK_CURL, "CURL", 0, "Curl", ""},
{PART_KINK_RADIAL, "RADIAL", 0, "Radial", ""},
@@ -2046,7 +2046,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bb_align_items[] = {
+ static const EnumPropertyItem bb_align_items[] = {
{PART_BB_X, "X", 0, "X", ""},
{PART_BB_Y, "Y", 0, "Y", ""},
{PART_BB_Z, "Z", 0, "Z", ""},
@@ -2055,7 +2055,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bb_anim_items[] = {
+ static const EnumPropertyItem bb_anim_items[] = {
{PART_BB_ANIM_NONE, "NONE", 0, "None", ""},
{PART_BB_ANIM_AGE, "AGE", 0, "Age", ""},
{PART_BB_ANIM_FRAME, "FRAME", 0, "Frame", ""},
@@ -2063,14 +2063,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bb_split_offset_items[] = {
+ static const EnumPropertyItem bb_split_offset_items[] = {
{PART_BB_OFF_NONE, "NONE", 0, "None", ""},
{PART_BB_OFF_LINEAR, "LINEAR", 0, "Linear", ""},
{PART_BB_OFF_RANDOM, "RANDOM", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem draw_col_items[] = {
+ static const EnumPropertyItem draw_col_items[] = {
{PART_DRAW_COL_NONE, "NONE", 0, "None", ""},
{PART_DRAW_COL_MAT, "MATERIAL", 0, "Material", ""},
{PART_DRAW_COL_VEL, "VELOCITY", 0, "Velocity", ""},
@@ -2078,7 +2078,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem part_mat_items[] = {
+ static const EnumPropertyItem part_mat_items[] = {
{0, "DUMMY", 0, "Dummy", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -3182,7 +3182,7 @@ static void rna_def_particle_target(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem mode_items[] = {
+ static const EnumPropertyItem mode_items[] = {
{PTARGET_MODE_FRIEND, "FRIEND", 0, "Friend", ""},
{PTARGET_MODE_NEUTRAL, "NEUTRAL", 0, "Neutral", ""},
{PTARGET_MODE_ENEMY, "ENEMY", 0, "Enemy", ""},
@@ -3245,7 +3245,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem resolution_items[] = {
+ static const EnumPropertyItem resolution_items[] = {
{eModifierMode_Realtime, "PREVIEW", 0, "Preview", "Apply modifier preview settings"},
{eModifierMode_Render, "RENDER", 0, "Render", "Apply modifier render settings"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index d9e7d3f6a84..b4c721a88b3 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -52,7 +52,7 @@
/* XXX: this RNA enum define is currently duplicated for objects,
* since there is some text here which is not applicable */
-EnumPropertyItem rna_enum_posebone_rotmode_items[] = {
+const EnumPropertyItem rna_enum_posebone_rotmode_items[] = {
{ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
{ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order (prone to Gimbal Lock)"},
{ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order (prone to Gimbal Lock)"},
@@ -66,7 +66,7 @@ EnumPropertyItem rna_enum_posebone_rotmode_items[] = {
};
/* Bone and Group Color Sets */
-EnumPropertyItem rna_enum_color_sets_items[] = {
+const EnumPropertyItem rna_enum_color_sets_items[] = {
{0, "DEFAULT", 0, "Default Colors", ""},
{1, "THEME01", VICO_COLORSET_01_VEC, "01 - Theme Color Set", ""},
{2, "THEME02", VICO_COLORSET_02_VEC, "02 - Theme Color Set", ""},
@@ -731,13 +731,13 @@ static void rna_def_bone_group(BlenderRNA *brna)
rna_def_actionbone_group_common(srna, NC_OBJECT | ND_POSE, "rna_Pose_update");
}
-static EnumPropertyItem prop_iksolver_items[] = {
+static const EnumPropertyItem prop_iksolver_items[] = {
{IKSOLVER_STANDARD, "LEGACY", 0, "Standard", "Original IK solver"},
{IKSOLVER_ITASC, "ITASC", 0, "iTaSC", "Multi constraint, stateful IK solver"},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_solver_items[] = {
+static const EnumPropertyItem prop_solver_items[] = {
{ITASC_SOLVER_SDLS, "SDLS", 0, "SDLS", "Selective Damped Least Square"},
{ITASC_SOLVER_DLS, "DLS", 0, "DLS", "Damped Least Square with Numerical Filtering"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index fb70870f49b..7ee792b5d1f 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -43,7 +43,7 @@
#include "WM_types.h"
-EnumPropertyItem rna_enum_gameproperty_type_items[] = {
+const EnumPropertyItem rna_enum_gameproperty_type_items[] = {
{GPROP_BOOL, "BOOL", 0, "Boolean", "Boolean Property"},
{GPROP_INT, "INT", 0, "Integer", "Integer Property"},
{GPROP_FLOAT, "FLOAT", 0, "Float", "Floating-Point Property"},
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 8304fa452e4..5ab4488b1b7 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -48,7 +48,7 @@
#include "ED_render.h"
/* Deprecated, only provided for API compatibility. */
-EnumPropertyItem rna_enum_render_pass_type_items[] = {
+const EnumPropertyItem rna_enum_render_pass_type_items[] = {
{SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
{SCE_PASS_Z, "Z", 0, "Z", ""},
{SCE_PASS_RGBA, "COLOR", 0, "Color", ""},
@@ -84,7 +84,7 @@ EnumPropertyItem rna_enum_render_pass_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_bake_pass_type_items[] = {
+const EnumPropertyItem rna_enum_bake_pass_type_items[] = {
{SCE_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
{SCE_PASS_AO, "AO", 0, "AO", ""},
{SCE_PASS_SHADOW, "SHADOW", 0, "Shadow", ""},
@@ -486,7 +486,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem render_pass_type_items[] = {
+ static const EnumPropertyItem render_pass_type_items[] = {
{SOCK_FLOAT, "VALUE", 0, "Value", ""},
{SOCK_VECTOR, "VECTOR", 0, "Vector", ""},
{SOCK_RGBA, "COLOR", 0, "Color", ""},
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index 1ed375706df..bc85e9c6503 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -44,13 +44,13 @@
#include "WM_types.h"
/* roles of objects in RigidBody Sims */
-EnumPropertyItem rna_enum_rigidbody_object_type_items[] = {
+const EnumPropertyItem rna_enum_rigidbody_object_type_items[] = {
{RBO_TYPE_ACTIVE, "ACTIVE", 0, "Active", "Object is directly controlled by simulation results"},
{RBO_TYPE_PASSIVE, "PASSIVE", 0, "Passive", "Object is directly controlled by animation system"},
{0, NULL, 0, NULL, NULL}};
/* collision shapes of objects in rigid body sim */
-EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = {
+const EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = {
{RB_SHAPE_BOX, "BOX", ICON_MESH_CUBE, "Box", "Box-like shapes (i.e. cubes), including planes (i.e. ground planes)"},
{RB_SHAPE_SPHERE, "SPHERE", ICON_MESH_UVSPHERE, "Sphere", ""},
{RB_SHAPE_CAPSULE, "CAPSULE", ICON_MESH_CAPSULE, "Capsule", ""},
@@ -64,7 +64,7 @@ EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = {
{0, NULL, 0, NULL, NULL}};
/* collision shapes of constraints in rigid body sim */
-EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = {
+const EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = {
{RBC_TYPE_FIXED, "FIXED", ICON_NONE, "Fixed", "Glue rigid bodies together"},
{RBC_TYPE_POINT, "POINT", ICON_NONE, "Point", "Constrain rigid bodies to move around common pivot point"},
{RBC_TYPE_HINGE, "HINGE", ICON_NONE, "Hinge", "Restrict rigid body rotation to one axis"},
@@ -78,7 +78,7 @@ EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = {
#ifndef RNA_RUNTIME
/* mesh source for collision shape creation */
-static EnumPropertyItem rigidbody_mesh_source_items[] = {
+static const EnumPropertyItem rigidbody_mesh_source_items[] = {
{RBO_MESH_BASE, "BASE", 0, "Base", "Base mesh"},
{RBO_MESH_DEFORM, "DEFORM", 0, "Deform", "Deformations (shape keys, deform modifiers)"},
{RBO_MESH_FINAL, "FINAL", 0, "Final", "All modifiers"},
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 502a9c42363..1d87bdb972e 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -36,7 +36,7 @@
#include "rna_internal.h"
-EnumPropertyItem rna_enum_property_type_items[] = {
+const EnumPropertyItem rna_enum_property_type_items[] = {
{PROP_BOOLEAN, "BOOLEAN", 0, "Boolean", ""},
{PROP_INT, "INT", 0, "Integer", ""},
{PROP_FLOAT, "FLOAT", 0, "Float", ""},
@@ -50,7 +50,7 @@ EnumPropertyItem rna_enum_property_type_items[] = {
/* XXX Keep in sync with bpy_props.c's property_subtype_xxx_items ???
* Currently it is not...
*/
-EnumPropertyItem rna_enum_property_subtype_items[] = {
+const EnumPropertyItem rna_enum_property_subtype_items[] = {
{PROP_NONE, "NONE", 0, "None", ""},
/* strings */
@@ -90,7 +90,7 @@ EnumPropertyItem rna_enum_property_subtype_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_property_unit_items[] = {
+const EnumPropertyItem rna_enum_property_unit_items[] = {
{PROP_UNIT_NONE, "NONE", 0, "None", ""},
{PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""},
{PROP_UNIT_AREA, "AREA", 0, "Area", ""},
@@ -824,7 +824,7 @@ static int rna_StringProperty_max_length_get(PointerRNA *ptr)
return ((StringPropertyRNA *)prop)->maxlength;
}
-static EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr,
+static const EnumPropertyItem *rna_EnumProperty_default_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *prop_parent, bool *r_free)
{
PropertyRNA *prop = (PropertyRNA *)ptr->data;
@@ -870,7 +870,7 @@ static void rna_EnumProperty_items_begin(CollectionPropertyIterator *iter, Point
{
PropertyRNA *prop = (PropertyRNA *)ptr->data;
/* EnumPropertyRNA *eprop; *//* UNUSED */
- EnumPropertyItem *item = NULL;
+ const EnumPropertyItem *item = NULL;
int totitem;
bool free;
@@ -1118,7 +1118,7 @@ static void rna_def_property(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem subtype_items[] = {
+ static const EnumPropertyItem subtype_items[] = {
{PROP_NONE, "NONE", 0, "None", ""},
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
{PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
@@ -1442,7 +1442,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
/* the itemf func is used instead, keep blender happy */
- static EnumPropertyItem default_dummy_items[] = {
+ static const EnumPropertyItem default_dummy_items[] = {
{PROP_NONE, "DUMMY", 0, "Dummy", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3e1f8f06d92..ab1802ed0e0 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -78,7 +78,7 @@
#include "BLI_threads.h"
#ifdef WITH_OPENEXR
-EnumPropertyItem rna_enum_exr_codec_items[] = {
+const EnumPropertyItem rna_enum_exr_codec_items[] = {
{R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
{R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""},
{R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
@@ -95,14 +95,14 @@ EnumPropertyItem rna_enum_exr_codec_items[] = {
#endif
#ifndef RNA_RUNTIME
-static EnumPropertyItem uv_sculpt_relaxation_items[] = {
+static const EnumPropertyItem uv_sculpt_relaxation_items[] = {
{UV_SCULPT_TOOL_RELAX_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", "Use Laplacian method for relaxation"},
{UV_SCULPT_TOOL_RELAX_HC, "HC", 0, "HC", "Use HC method for relaxation"},
{0, NULL, 0, NULL, NULL}
};
#endif
-EnumPropertyItem rna_enum_uv_sculpt_tool_items[] = {
+const EnumPropertyItem rna_enum_uv_sculpt_tool_items[] = {
{UV_SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", "Pinch UVs"},
{UV_SCULPT_TOOL_RELAX, "RELAX", 0, "Relax", "Relax UVs"},
{UV_SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", "Grab UVs"},
@@ -110,7 +110,7 @@ EnumPropertyItem rna_enum_uv_sculpt_tool_items[] = {
};
-EnumPropertyItem rna_enum_snap_target_items[] = {
+const EnumPropertyItem rna_enum_snap_target_items[] = {
{SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"},
{SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target"},
{SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"},
@@ -118,7 +118,7 @@ EnumPropertyItem rna_enum_snap_target_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_proportional_falloff_items[] = {
+const EnumPropertyItem rna_enum_proportional_falloff_items[] = {
{PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
{PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
{PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
@@ -131,7 +131,7 @@ EnumPropertyItem rna_enum_proportional_falloff_items[] = {
};
/* subset of the enum - only curves, missing random and const */
-EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = {
+const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = {
{PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
{PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
{PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
@@ -142,7 +142,7 @@ EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = {
};
-EnumPropertyItem rna_enum_proportional_editing_items[] = {
+const EnumPropertyItem rna_enum_proportional_editing_items[] = {
{PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"},
{PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", "Proportional Editing enabled"},
{PROP_EDIT_PROJECTED, "PROJECTED", ICON_PROP_ON, "Projected (2D)",
@@ -153,14 +153,14 @@ EnumPropertyItem rna_enum_proportional_editing_items[] = {
};
/* keep for operators, not used here */
-EnumPropertyItem rna_enum_mesh_select_mode_items[] = {
+const EnumPropertyItem rna_enum_mesh_select_mode_items[] = {
{SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
{SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"},
{SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_snap_element_items[] = {
+const EnumPropertyItem rna_enum_snap_element_items[] = {
{SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
{SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
{SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"},
@@ -169,7 +169,7 @@ EnumPropertyItem rna_enum_snap_element_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_snap_node_element_items[] = {
+const EnumPropertyItem rna_enum_snap_node_element_items[] = {
{SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_GRID, "Grid", "Snap to grid"},
{SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"},
{SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"},
@@ -178,14 +178,14 @@ EnumPropertyItem rna_enum_snap_node_element_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem snap_uv_element_items[] = {
+static const EnumPropertyItem snap_uv_element_items[] = {
{SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
{SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
{0, NULL, 0, NULL, NULL}
};
#endif
-EnumPropertyItem rna_enum_curve_fit_method_items[] = {
+const EnumPropertyItem rna_enum_curve_fit_method_items[] = {
{CURVE_PAINT_FIT_METHOD_REFIT, "REFIT", 0, "Refit", "Incrementally re-fit the curve (high quality)"},
{CURVE_PAINT_FIT_METHOD_SPLIT, "SPLIT", 0, "Split", "Split the curve until the tolerance is met (fast)"},
{0, NULL, 0, NULL, NULL}};
@@ -270,7 +270,7 @@ EnumPropertyItem rna_enum_curve_fit_method_items[] = {
#ifdef RNA_RUNTIME
-static EnumPropertyItem image_only_type_items[] = {
+static const EnumPropertyItem image_only_type_items[] = {
IMAGE_TYPE_ITEMS_IMAGE_ONLY
@@ -278,7 +278,7 @@ static EnumPropertyItem image_only_type_items[] = {
};
#endif
-EnumPropertyItem rna_enum_image_type_items[] = {
+const EnumPropertyItem rna_enum_image_type_items[] = {
{0, "", 0, N_("Image"), NULL},
IMAGE_TYPE_ITEMS_IMAGE_ONLY
@@ -295,7 +295,7 @@ EnumPropertyItem rna_enum_image_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_image_color_mode_items[] = {
+const EnumPropertyItem rna_enum_image_color_mode_items[] = {
{R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
{R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
{R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
@@ -308,7 +308,7 @@ EnumPropertyItem rna_enum_image_color_mode_items[] = {
#define IMAGE_COLOR_MODE_RGBA rna_enum_image_color_mode_items[2]
#endif
-EnumPropertyItem rna_enum_image_color_depth_items[] = {
+const EnumPropertyItem rna_enum_image_color_depth_items[] = {
/* 1 (monochrome) not used */
{R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"},
{R_IMF_CHAN_DEPTH_10, "10", 0, "10", "10 bit color channels"},
@@ -319,13 +319,13 @@ EnumPropertyItem rna_enum_image_color_depth_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_normal_space_items[] = {
+const EnumPropertyItem rna_enum_normal_space_items[] = {
{R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
{R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_normal_swizzle_items[] = {
+const EnumPropertyItem rna_enum_normal_swizzle_items[] = {
{R_BAKE_POSX, "POS_X", 0, "+X", ""},
{R_BAKE_POSY, "POS_Y", 0, "+Y", ""},
{R_BAKE_POSZ, "POS_Z", 0, "+Z", ""},
@@ -335,7 +335,7 @@ EnumPropertyItem rna_enum_normal_swizzle_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_bake_save_mode_items[] = {
+const EnumPropertyItem rna_enum_bake_save_mode_items[] = {
{R_BAKE_SAVE_INTERNAL, "INTERNAL", 0, "Internal", "Save the baking map in an internal image data-block"},
{R_BAKE_SAVE_EXTERNAL, "EXTERNAL", 0, "External", "Save the baking map in an external file"},
{0, NULL, 0, NULL, NULL}
@@ -347,19 +347,19 @@ EnumPropertyItem rna_enum_bake_save_mode_items[] = {
"Single file with an encoded stereo pair"},
#define R_IMF_VIEWS_ENUM_MV {R_IMF_VIEWS_MULTIVIEW, "MULTIVIEW", 0, "Multi-View", "Single file with all the views"},
-EnumPropertyItem rna_enum_views_format_items[] = {
+const EnumPropertyItem rna_enum_views_format_items[] = {
R_IMF_VIEWS_ENUM_IND
R_IMF_VIEWS_ENUM_S3D
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_views_format_multilayer_items[] = {
+const EnumPropertyItem rna_enum_views_format_multilayer_items[] = {
R_IMF_VIEWS_ENUM_IND
R_IMF_VIEWS_ENUM_MV
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_views_format_multiview_items[] = {
+const EnumPropertyItem rna_enum_views_format_multiview_items[] = {
R_IMF_VIEWS_ENUM_IND
R_IMF_VIEWS_ENUM_S3D
R_IMF_VIEWS_ENUM_MV
@@ -370,7 +370,7 @@ EnumPropertyItem rna_enum_views_format_multiview_items[] = {
#undef R_IMF_VIEWS_ENUM_S3D
#undef R_IMF_VIEWS_ENUM_MV
-EnumPropertyItem rna_enum_stereo3d_display_items[] = {
+const EnumPropertyItem rna_enum_stereo3d_display_items[] = {
{S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph",
"Render views for left and right eyes as two differently filtered colors in a single image "
"(anaglyph glasses are required)"},
@@ -383,21 +383,21 @@ EnumPropertyItem rna_enum_stereo3d_display_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[] = {
+const EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[] = {
{S3D_ANAGLYPH_REDCYAN, "RED_CYAN", 0, "Red-Cyan", ""},
{S3D_ANAGLYPH_GREENMAGENTA, "GREEN_MAGENTA", 0, "Green-Magenta", ""},
{S3D_ANAGLYPH_YELLOWBLUE, "YELLOW_BLUE", 0, "Yellow-Blue", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_stereo3d_interlace_type_items[] = {
+const EnumPropertyItem rna_enum_stereo3d_interlace_type_items[] = {
{S3D_INTERLACE_ROW, "ROW_INTERLEAVED", 0, "Row Interleaved", ""},
{S3D_INTERLACE_COLUMN, "COLUMN_INTERLEAVED", 0, "Column Interleaved", ""},
{S3D_INTERLACE_CHECKERBOARD, "CHECKERBOARD_INTERLEAVED", 0, "Checkerboard Interleaved", ""},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = {
+const EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = {
{R_BAKE_PASS_FILTER_NONE, "NONE", 0, "None", ""},
{R_BAKE_PASS_FILTER_AO, "AO", 0, "AO", ""},
{R_BAKE_PASS_FILTER_EMIT, "EMIT", 0, "Emit", ""},
@@ -412,7 +412,7 @@ EnumPropertyItem rna_enum_bake_pass_filter_type_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = {
+static const EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = {
/* interpolation */
{0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"},
{GP_IPO_LINEAR, "LINEAR", ICON_IPO_LINEAR, "Linear", "Straight-line interpolation between A and B (i.e. no ease in/out)"},
@@ -438,7 +438,7 @@ static EnumPropertyItem rna_enum_gpencil_interpolation_mode_items[] = {
#endif
-EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = {
+const EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = {
{COLLECTION_MODE_OBJECT, "OBJECT", 0, "Object", ""},
{COLLECTION_MODE_EDIT, "EDIT", 0, "Edit", ""},
{COLLECTION_MODE_PAINT_WEIGHT, "PAINT_WEIGHT", 0, "Weight Paint", ""},
@@ -1150,7 +1150,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(
+static const EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ID *id = ptr->id.data;
@@ -1162,7 +1162,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(
+static const EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -1207,7 +1207,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(
+static const EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -1219,11 +1219,11 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(
const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
const int is_float = ELEM(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER);
- EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0];
- EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1];
- EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2];
- EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3];
- EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4];
+ const EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0];
+ const EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1];
+ const EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2];
+ const EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3];
+ const EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4];
int totitem = 0;
EnumPropertyItem *item = NULL;
@@ -1270,7 +1270,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(
}
}
-static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf(
+static const EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -1292,7 +1292,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf(
#ifdef WITH_OPENEXR
/* OpenEXR */
-static EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(
+static const EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
ImageFormatData *imf = (ImageFormatData *)ptr->data;
@@ -1513,7 +1513,7 @@ static void rna_ViewRenderSettings_engine_set(PointerRNA *ptr, int value)
}
}
-static EnumPropertyItem *rna_ViewRenderSettings_engine_itemf(
+static const EnumPropertyItem *rna_ViewRenderSettings_engine_itemf(
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
RenderEngineType *type;
@@ -3341,7 +3341,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem uv_select_mode_items[] = {
+ static const EnumPropertyItem uv_select_mode_items[] = {
{UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode"},
{UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode"},
{UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode"},
@@ -3353,20 +3353,20 @@ static void rna_def_tool_settings(BlenderRNA *brna)
* with 1st position only for for on/off (and exposed as boolean), while others are mutually
* exclusive options but which will only have any effect when autokey is enabled
*/
- static EnumPropertyItem auto_key_items[] = {
+ static const EnumPropertyItem auto_key_items[] = {
{AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
{AUTOKEY_MODE_EDITKEYS & ~AUTOKEY_ON, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem retarget_roll_items[] = {
+ static const EnumPropertyItem retarget_roll_items[] = {
{SK_RETARGET_ROLL_NONE, "NONE", 0, "None", "Don't adjust roll"},
{SK_RETARGET_ROLL_VIEW, "VIEW", 0, "View", "Roll bones to face the view"},
{SK_RETARGET_ROLL_JOINT, "JOINT", 0, "Joint", "Roll bone to original joint plane offset"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem sketch_convert_items[] = {
+ static const EnumPropertyItem sketch_convert_items[] = {
{SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones"},
{SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length"},
{SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive",
@@ -3375,7 +3375,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem edge_tag_items[] = {
+ static const EnumPropertyItem edge_tag_items[] = {
{EDGE_MODE_SELECT, "SELECT", 0, "Select", ""},
{EDGE_MODE_TAG_SEAM, "SEAM", 0, "Tag Seam", ""},
{EDGE_MODE_TAG_SHARP, "SHARP", 0, "Tag Sharp", ""},
@@ -3385,21 +3385,21 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem draw_groupuser_items[] = {
+ static const EnumPropertyItem draw_groupuser_items[] = {
{OB_DRAW_GROUPUSER_NONE, "NONE", 0, "None", ""},
{OB_DRAW_GROUPUSER_ACTIVE, "ACTIVE", 0, "Active", "Show vertices with no weights in the active group"},
{OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in any group"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem vertex_group_select_items[] = {
+ static const EnumPropertyItem vertex_group_select_items[] = {
{WT_VGROUP_ALL, "ALL", 0, "All", "All Vertex Groups"},
{WT_VGROUP_BONE_DEFORM, "BONE_DEFORM", 0, "Deform", "Vertex Groups assigned to Deform Bones"},
{WT_VGROUP_BONE_DEFORM_OFF, "OTHER_DEFORM", 0, "Other", "Vertex Groups assigned to non Deform Bones"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem gpencil_source_3d_items[] = {
+ static const EnumPropertyItem gpencil_source_3d_items[] = {
{GP_TOOL_SOURCE_SCENE, "SCENE", 0, "Scene",
"Grease Pencil data attached to the current scene is used, "
"unless the active object already has Grease Pencil data (i.e. for old files)"},
@@ -3409,7 +3409,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem gpencil_stroke_placement_items[] = {
+ static const EnumPropertyItem gpencil_stroke_placement_items[] = {
{GP_PROJECT_VIEWSPACE, "CURSOR", 0, "Cursor", "Draw stroke at the 3D cursor"},
{0, "VIEW", 0, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */
{GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", 0, "Surface", "Stick stroke to surfaces"},
@@ -3970,7 +3970,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_CurvePaintSettings_path");
RNA_def_struct_ui_text(srna, "Curve Paint Settings", "");
- static EnumPropertyItem curve_type_items[] = {
+ static const EnumPropertyItem curve_type_items[] = {
{CU_POLY, "POLY", 0, "Poly", ""},
{CU_BEZIER, "BEZIER", 0, "Bezier", ""},
{0, NULL, 0, NULL, NULL}};
@@ -4037,7 +4037,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -1.0f, 1.0, 1, 2);
RNA_def_property_ui_text(prop, "Offset", "Offset the stroke from the surface");
- static EnumPropertyItem depth_mode_items[] = {
+ static const EnumPropertyItem depth_mode_items[] = {
{CURVE_PAINT_PROJECT_CURSOR, "CURSOR", 0, "Cursor", ""},
{CURVE_PAINT_PROJECT_SURFACE, "SURFACE", 0, "Surface", ""},
{0, NULL, 0, NULL, NULL}};
@@ -4047,7 +4047,7 @@ static void rna_def_curve_paint_settings(BlenderRNA *brna)
RNA_def_property_enum_items(prop, depth_mode_items);
RNA_def_property_ui_text(prop, "Depth", "Method of projecting depth");
- static EnumPropertyItem surface_plane_items[] = {
+ static const EnumPropertyItem surface_plane_items[] = {
{CURVE_PAINT_SURFACE_PLANE_NORMAL_VIEW, "NORMAL_VIEW", 0, "Normal/View", "Draw perpendicular to the surface"},
{CURVE_PAINT_SURFACE_PLANE_NORMAL_SURFACE, "NORMAL_SURFACE", 0, "Normal/Surface", "Draw aligned to the surface"},
{CURVE_PAINT_SURFACE_PLANE_VIEW, "VIEW", 0, "View", "Draw aligned to the viewport"},
@@ -4064,7 +4064,7 @@ static void rna_def_statvis(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem stat_type[] = {
+ static const EnumPropertyItem stat_type[] = {
{SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""},
{SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""},
{SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""},
@@ -4180,14 +4180,14 @@ static void rna_def_unit_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem unit_systems[] = {
+ static const EnumPropertyItem unit_systems[] = {
{USER_UNIT_NONE, "NONE", 0, "None", ""},
{USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
{USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem rotation_units[] = {
+ static const EnumPropertyItem rotation_units[] = {
{0, "DEGREES", 0, "Degrees", "Use degrees for measuring angles and rotations"},
{USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""},
{0, NULL, 0, NULL, NULL}
@@ -4670,42 +4670,42 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem edge_type_negation_items[] = {
+ static const EnumPropertyItem edge_type_negation_items[] = {
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions"},
{FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive",
"Select feature edges not satisfying the given edge type conditions"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem edge_type_combination_items[] = {
+ static const EnumPropertyItem edge_type_combination_items[] = {
{0, "OR", 0, "Logical OR", "Select feature edges satisfying at least one of edge type conditions"},
{FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND",
"Select feature edges satisfying all edge type conditions"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem group_negation_items[] = {
+ static const EnumPropertyItem group_negation_items[] = {
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging to some object in the group"},
{FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive",
"Select feature edges not belonging to any object in the group"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem face_mark_negation_items[] = {
+ static const EnumPropertyItem face_mark_negation_items[] = {
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given face mark conditions"},
{FREESTYLE_LINESET_FM_NOT, "EXCLUSIVE", 0, "Exclusive",
"Select feature edges not satisfying the given face mark conditions"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem face_mark_condition_items[] = {
+ static const EnumPropertyItem face_mark_condition_items[] = {
{0, "ONE", 0, "One Face", "Select a feature edge if either of its adjacent faces is marked"},
{FREESTYLE_LINESET_FM_BOTH, "BOTH", 0, "Both Faces",
"Select a feature edge if both of its adjacent faces are marked"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem freestyle_ui_mode_items[] = {
+ static const EnumPropertyItem freestyle_ui_mode_items[] = {
{FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode",
"Advanced mode for using style modules written in Python"},
{FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode",
@@ -4713,7 +4713,7 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem visibility_items[] = {
+ static const EnumPropertyItem visibility_items[] = {
{FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges"},
{FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges"},
{FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range",
@@ -5040,7 +5040,7 @@ static void rna_def_scene_game_recast_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem rna_enum_partitioning_items[] = {
+ static const EnumPropertyItem rna_enum_partitioning_items[] = {
{RC_PARTITION_WATERSHED, "WATERSHED", 0, "Watershed", "Classic Recast partitioning method generating the nicest tessellation"},
{RC_PARTITION_MONOTONE, "MONOTONE", 0, "Monotone", "Fastest navmesh generation method, may create long thin polygons"},
{RC_PARTITION_LAYERS, "LAYERS", 0, "Layers", "Reasonably fast method that produces better triangles than monotone partitioning"},
@@ -5320,7 +5320,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem aasamples_items[] = {
+ static const EnumPropertyItem aasamples_items[] = {
{0, "SAMPLES_0", 0, "Off", ""},
{2, "SAMPLES_2", 0, "2x", ""},
{4, "SAMPLES_4", 0, "4x", ""},
@@ -5329,7 +5329,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem framing_types_items[] = {
+ static const EnumPropertyItem framing_types_items[] = {
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
"Show the entire viewport in the display window, using bar horizontally or vertically"},
{SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend",
@@ -5339,7 +5339,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem dome_modes_items[] = {
+ static const EnumPropertyItem dome_modes_items[] = {
{DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
{DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
{DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
@@ -5348,7 +5348,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem stereo_modes_items[] = {
+ static const EnumPropertyItem stereo_modes_items[] = {
{STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
{STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
{STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
@@ -5359,40 +5359,40 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem stereo_items[] = {
+ static const EnumPropertyItem stereo_items[] = {
{STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome environments"},
{STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environment"},
{STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem physics_engine_items[] = {
+ static const EnumPropertyItem physics_engine_items[] = {
{WOPHY_NONE, "NONE", 0, "None", "Don't use a physics engine"},
{WOPHY_BULLET, "BULLET", 0, "Bullet", "Use the Bullet physics engine"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem material_items[] = {
+ static const EnumPropertyItem material_items[] = {
{GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"},
{GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem obstacle_simulation_items[] = {
+ static const EnumPropertyItem obstacle_simulation_items[] = {
{OBSTSIMULATION_NONE, "NONE", 0, "None", ""},
{OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""},
{OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem vsync_items[] = {
+ static const EnumPropertyItem vsync_items[] = {
{VSYNC_OFF, "OFF", 0, "Off", "Disable vsync"},
{VSYNC_ON, "ON", 0, "On", "Enable vsync"},
{VSYNC_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", "Enable adaptive vsync (if supported)"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem storage_items[] = {
+ static const EnumPropertyItem storage_items[] = {
{RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Choose the best supported mode"},
{RAS_STORE_VA, "VERTEX_ARRAY", 0, "Vertex Arrays", "Usually the best choice (good performance with display lists)"},
{RAS_STORE_VBO, "VERTEX_BUFFER_OBJECT", 0, "Vertex Buffer Objects",
@@ -6111,13 +6111,13 @@ static void rna_def_scene_layer_engine_settings_eevee(BlenderRNA *brna)
PropertyRNA *prop;
/* Keep in sync with eevee_private.h */
- static EnumPropertyItem eevee_shadow_method_items[] = {
+ static const EnumPropertyItem eevee_shadow_method_items[] = {
{1, "ESM", 0, "ESM", "Exponential Shadow Mapping"},
{2, "VSM", 0, "VSM", "Variance Shadow Mapping"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem eevee_shadow_size_items[] = {
+ static const EnumPropertyItem eevee_shadow_size_items[] = {
{64, "64", 0, "64px", ""},
{128, "128", 0, "128px", ""},
{256, "256", 0, "256px", ""},
@@ -6513,7 +6513,7 @@ static void rna_def_layer_collection_engine_settings_clay(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem clay_matcap_items[] = {
+ static const EnumPropertyItem clay_matcap_items[] = {
{ICON_MATCAP_01, "01", ICON_MATCAP_01, "", ""},
{ICON_MATCAP_02, "02", ICON_MATCAP_02, "", ""},
{ICON_MATCAP_03, "03", ICON_MATCAP_03, "", ""},
@@ -7292,7 +7292,7 @@ static void rna_def_image_format_stereo3d_format(BlenderRNA *brna)
PropertyRNA *prop;
/* rna_enum_stereo3d_display_items, without (S3D_DISPLAY_PAGEFLIP) */
- static EnumPropertyItem stereo3d_display_items[] = {
+ static const EnumPropertyItem stereo3d_display_items[] = {
{S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph",
"Render views for left and right eyes as two differently filtered colors in a single image "
"(anaglyph glasses are required)"},
@@ -7349,7 +7349,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
{
#ifdef WITH_OPENJPEG
- static EnumPropertyItem jp2_codec_items[] = {
+ static const EnumPropertyItem jp2_codec_items[] = {
{R_IMF_JP2_CODEC_JP2, "JP2", 0, "JP2", ""},
{R_IMF_JP2_CODEC_J2K, "J2K", 0, "J2K", ""},
{0, NULL, 0, NULL, NULL}
@@ -7357,7 +7357,7 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
#endif
#ifdef WITH_TIFF
- static EnumPropertyItem tiff_codec_items[] = {
+ static const EnumPropertyItem tiff_codec_items[] = {
{R_IMF_TIFF_CODEC_NONE, "NONE", 0, "None", ""},
{R_IMF_TIFF_CODEC_DEFLATE, "DEFLATE", 0, "Deflate", ""},
{R_IMF_TIFF_CODEC_LZW, "LZW", 0, "LZW", ""},
@@ -7532,7 +7532,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
#ifdef WITH_FFMPEG
/* Container types */
- static EnumPropertyItem ffmpeg_format_items[] = {
+ static const EnumPropertyItem ffmpeg_format_items[] = {
{FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
{FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
{FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
@@ -7547,7 +7547,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ffmpeg_codec_items[] = {
+ static const EnumPropertyItem ffmpeg_codec_items[] = {
{AV_CODEC_ID_NONE, "NONE", 0, "None", ""},
{AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
{AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
@@ -7564,7 +7564,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ffmpeg_preset_items[] = {
+ static const EnumPropertyItem ffmpeg_preset_items[] = {
{FFM_PRESET_ULTRAFAST, "ULTRAFAST", 0, "Ultra fast; biggest file", ""},
{FFM_PRESET_SUPERFAST, "SUPERFAST", 0, "Super fast", ""},
{FFM_PRESET_VERYFAST, "VERYFAST", 0, "Very fast", ""},
@@ -7577,7 +7577,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ffmpeg_crf_items[] = {
+ static const EnumPropertyItem ffmpeg_crf_items[] = {
{FFM_CRF_NONE, "NONE", 0, "None; use constant bit-rate",
"Use constant bit rate, rather than constant output quality"},
{FFM_CRF_LOSSLESS, "LOSSLESS", 0, "Lossless", ""},
@@ -7590,7 +7590,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ffmpeg_audio_codec_items[] = {
+ static const EnumPropertyItem ffmpeg_audio_codec_items[] = {
{AV_CODEC_ID_NONE, "NONE", 0, "None", ""},
{AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""},
{AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""},
@@ -7603,7 +7603,7 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
};
#endif
- static EnumPropertyItem audio_channel_items[] = {
+ static const EnumPropertyItem audio_channel_items[] = {
{1, "MONO", 0, "Mono", "Set audio channels to mono"},
{2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
{4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
@@ -7771,7 +7771,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem pixel_filter_items[] = {
+ static const EnumPropertyItem pixel_filter_items[] = {
{R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"},
{R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"},
{R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"},
@@ -7782,13 +7782,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem alpha_mode_items[] = {
+ static const EnumPropertyItem alpha_mode_items[] = {
{R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
{R_ALPHAPREMUL, "TRANSPARENT", 0, "Transparent", "World background is transparent with premultiplied alpha"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem display_mode_items[] = {
+ static const EnumPropertyItem display_mode_items[] = {
{R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
{R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
{R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
@@ -7797,7 +7797,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
};
/* Bake */
- static EnumPropertyItem bake_mode_items[] = {
+ static const EnumPropertyItem bake_mode_items[] = {
{RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"},
{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"},
{RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"},
@@ -7815,7 +7815,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bake_normal_space_items[] = {
+ static const EnumPropertyItem bake_normal_space_items[] = {
{R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"},
{R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"},
{R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
@@ -7823,14 +7823,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bake_qyad_split_items[] = {
+ static const EnumPropertyItem bake_qyad_split_items[] = {
{0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"},
{1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"},
{2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem pixel_size_items[] = {
+ static const EnumPropertyItem pixel_size_items[] = {
{0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the UI scale"},
{1, "1", 0, "1x", "Render at full resolution"},
{2, "2", 0, "2x", "Render at 50% resolution"},
@@ -7839,7 +7839,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem octree_resolution_items[] = {
+ static const EnumPropertyItem octree_resolution_items[] = {
{64, "64", 0, "64", ""},
{128, "128", 0, "128", ""},
{256, "256", 0, "256", ""},
@@ -7847,7 +7847,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem raytrace_structure_items[] = {
+ static const EnumPropertyItem raytrace_structure_items[] = {
{R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select acceleration structure"},
{R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure"},
{R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", "Use vBVH"},
@@ -7856,7 +7856,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem fixed_oversample_items[] = {
+ static const EnumPropertyItem fixed_oversample_items[] = {
{5, "5", 0, "5", ""},
{8, "8", 0, "8", ""},
{11, "11", 0, "11", ""},
@@ -7864,26 +7864,26 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem field_order_items[] = {
+ static const EnumPropertyItem field_order_items[] = {
{0, "EVEN_FIRST", 0, "Upper First", "Upper field first"},
{R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem threads_mode_items[] = {
+ static const EnumPropertyItem threads_mode_items[] = {
{0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
{R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem freestyle_thickness_items[] = {
+ static const EnumPropertyItem freestyle_thickness_items[] = {
{R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"},
{R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative",
"Unit line thickness is scaled by the proportion of the present vertical image "
"resolution to 480 pixels"},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem views_format_items[] = {
+ static const EnumPropertyItem views_format_items[] = {
{SCE_VIEWS_FORMAT_STEREO_3D, "STEREO_3D", 0, "Stereo 3D",
"Single stereo camera system, adjust the stereo settings in the camera panel"},
{SCE_VIEWS_FORMAT_MULTIVIEW, "MULTIVIEW", 0, "Multi-View",
@@ -8698,7 +8698,7 @@ static void rna_def_scene_view_render(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem engine_items[] = {
+ static const EnumPropertyItem engine_items[] = {
{0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"},
{0, NULL, 0, NULL, NULL}
};
@@ -8982,7 +8982,7 @@ void RNA_def_scene(BlenderRNA *brna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem audio_distance_model_items[] = {
+ static const EnumPropertyItem audio_distance_model_items[] = {
{0, "NONE", 0, "None", "No distance attenuation"},
{1, "INVERSE", 0, "Inverse", "Inverse distance model"},
{2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"},
@@ -8993,7 +8993,7 @@ void RNA_def_scene(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem sync_mode_items[] = {
+ static const EnumPropertyItem sync_mode_items[] = {
{0, "NONE", 0, "No Sync", "Do not sync, play every frame"},
{SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"},
{AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"},
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index baa29df3fc3..e4c39aa3b60 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -49,7 +49,7 @@
# include "../../alembic/ABC_alembic.h"
#endif
-EnumPropertyItem rna_enum_abc_compression_items[] = {
+const EnumPropertyItem rna_enum_abc_compression_items[] = {
#ifdef WITH_ALEMBIC
{ ABC_ARCHIVE_OGAWA, "OGAWA", 0, "Ogawa", "" },
{ ABC_ARCHIVE_HDF5, "HDF5", 0, "HDF5", "" },
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 003445889c3..0221a40cb5d 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -37,7 +37,7 @@
#include "DNA_scene_types.h"
#include "DNA_workspace_types.h"
-EnumPropertyItem rna_enum_region_type_items[] = {
+const EnumPropertyItem rna_enum_region_type_items[] = {
{RGN_TYPE_WINDOW, "WINDOW", 0, "Window", ""},
{RGN_TYPE_HEADER, "HEADER", 0, "Header", ""},
{RGN_TYPE_CHANNELS, "CHANNELS", 0, "Channels", ""},
@@ -129,7 +129,7 @@ static int rna_Screen_fullscreen_get(PointerRNA *ptr)
/* UI compatible list: should not be needed, but for now we need to keep EMPTY
* at least in the static version of this enum for python scripts. */
-static EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_Area_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
/* +1 to skip SPACE_EMPTY */
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index cfe8670b0f5..551b38771f9 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -49,7 +49,7 @@
#include "BLI_utildefines.h"
#include "bmesh.h"
-static EnumPropertyItem particle_edit_hair_brush_items[] = {
+static const EnumPropertyItem particle_edit_hair_brush_items[] = {
{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"},
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"},
@@ -61,7 +61,7 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = {
+const EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = {
{GP_EDITBRUSH_TYPE_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth stroke points"},
{GP_EDITBRUSH_TYPE_THICKNESS, "THICKNESS", 0, "Thickness", "Adjust thickness of strokes"},
{ GP_EDITBRUSH_TYPE_STRENGTH, "STRENGTH", 0, "Strength", "Adjust color strength of strokes" },
@@ -77,7 +77,7 @@ EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = {
+static const EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = {
{ GP_LOCKAXIS_NONE, "GP_LOCKAXIS_NONE", 0, "None", "" },
{ GP_LOCKAXIS_X, "GP_LOCKAXIS_X", 0, "X", "Project strokes to plane locked to X" },
{ GP_LOCKAXIS_Y, "GP_LOCKAXIS_Y", 0, "Y", "Project strokes to plane locked to Y" },
@@ -86,7 +86,7 @@ static EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = {
};
#endif
-EnumPropertyItem rna_enum_symmetrize_direction_items[] = {
+const EnumPropertyItem rna_enum_symmetrize_direction_items[] = {
{BMO_SYMMETRIZE_NEGATIVE_X, "NEGATIVE_X", 0, "-X to +X", ""},
{BMO_SYMMETRIZE_POSITIVE_X, "POSITIVE_X", 0, "+X to -X", ""},
@@ -118,7 +118,7 @@ static void rna_GPencil_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
}
-static EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = {
+static const EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = {
{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"},
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"},
@@ -128,7 +128,7 @@ static EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem particle_edit_cache_brush_items[] = {
+static const EnumPropertyItem particle_edit_cache_brush_items[] = {
{PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths"},
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth paths"},
@@ -188,7 +188,7 @@ static void rna_ParticleEdit_tool_set(PointerRNA *ptr, int value)
pset->brushtype = value;
}
-static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
SceneLayer *sl = CTX_data_scene_layer(C);
@@ -540,7 +540,7 @@ static void rna_def_paint(BlenderRNA *brna)
static void rna_def_sculpt(BlenderRNA *brna)
{
- static EnumPropertyItem detail_refine_items[] = {
+ static const EnumPropertyItem detail_refine_items[] = {
{SCULPT_DYNTOPO_SUBDIVIDE, "SUBDIVIDE", 0,
"Subdivide Edges", "Subdivide long edges to add mesh detail where needed"},
{SCULPT_DYNTOPO_COLLAPSE, "COLLAPSE", 0,
@@ -550,7 +550,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem detail_type_items[] = {
+ static const EnumPropertyItem detail_type_items[] = {
{0, "RELATIVE", 0,
"Relative Detail", "Mesh detail is relative to the brush size and detail size"},
{SCULPT_DYNTOPO_DETAIL_CONSTANT, "CONSTANT", 0,
@@ -712,7 +712,7 @@ static void rna_def_image_paint(BlenderRNA *brna)
PropertyRNA *prop;
FunctionRNA *func;
- static EnumPropertyItem paint_type_items[] = {
+ static const EnumPropertyItem paint_type_items[] = {
{IMAGEPAINT_MODE_MATERIAL, "MATERIAL", 0,
"Material", "Detect image slots from the material"},
{IMAGEPAINT_MODE_IMAGE, "IMAGE", 0,
@@ -843,26 +843,26 @@ static void rna_def_particle_edit(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem select_mode_items[] = {
+ static const EnumPropertyItem select_mode_items[] = {
{SCE_SELECT_PATH, "PATH", ICON_PARTICLE_PATH, "Path", "Path edit mode"},
{SCE_SELECT_POINT, "POINT", ICON_PARTICLE_POINT, "Point", "Point select mode"},
{SCE_SELECT_END, "TIP", ICON_PARTICLE_TIP, "Tip", "Tip select mode"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem puff_mode[] = {
+ static const EnumPropertyItem puff_mode[] = {
{0, "ADD", 0, "Add", "Make hairs more puffy"},
{1, "SUB", 0, "Sub", "Make hairs less puffy"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem length_mode[] = {
+ static const EnumPropertyItem length_mode[] = {
{0, "GROW", 0, "Grow", "Make hairs longer"},
{1, "SHRINK", 0, "Shrink", "Make hairs shorter"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem edit_type_items[] = {
+ static const EnumPropertyItem edit_type_items[] = {
{PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""},
{PE_TYPE_SOFTBODY, "SOFT_BODY", 0, "Soft body", ""},
{PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
@@ -1028,7 +1028,7 @@ static void rna_def_particle_edit(BlenderRNA *brna)
static void rna_def_gpencil_sculpt(BlenderRNA *brna)
{
- static EnumPropertyItem prop_direction_items[] = {
+ static const EnumPropertyItem prop_direction_items[] = {
{0, "ADD", 0, "Add", "Add effect of brush"},
{GP_EDITBRUSH_FLAG_INVERT, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index d0afab7a1e3..735df471721 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -45,7 +45,7 @@
#include "WM_types.h"
/* Always keep in alphabetical order */
-static EnumPropertyItem sensor_type_items[] = {
+static const EnumPropertyItem sensor_type_items[] = {
{SENS_ACTUATOR, "ACTUATOR", 0, "Actuator", ""},
{SENS_ALWAYS, "ALWAYS", 0, "Always", ""},
{SENS_ARMATURE, "ARMATURE", 0, "Armature", ""},
@@ -137,7 +137,7 @@ static int rna_Sensor_controllers_length(PointerRNA *ptr)
return (int) sens->totlinks;
}
-EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
Object *ob = NULL;
@@ -392,7 +392,7 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem mouse_event_items[] = {
+ static const EnumPropertyItem mouse_event_items[] = {
{BL_SENS_MOUSE_LEFT_BUTTON, "LEFTCLICK", 0, "Left Button", ""},
{BL_SENS_MOUSE_MIDDLE_BUTTON, "MIDDLECLICK", 0, "Middle Button", ""},
{BL_SENS_MOUSE_RIGHT_BUTTON, "RIGHTCLICK", 0, "Right Button", ""},
@@ -501,7 +501,7 @@ static void rna_def_property_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{SENS_PROP_EQUAL, "PROPEQUAL", 0, "Equal", ""},
{SENS_PROP_NEQUAL, "PROPNEQUAL", 0, "Not Equal", ""},
{SENS_PROP_INTERVAL, "PROPINTERVAL", 0, "Interval", ""},
@@ -547,7 +547,7 @@ static void rna_def_armature_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_type_items[] = {
+ static const EnumPropertyItem prop_type_items[] = {
{SENS_ARM_STATE_CHANGED, "STATECHG", 0, "State Changed", ""},
{SENS_ARM_LIN_ERROR_BELOW, "LINERRORBELOW", 0, "Lin error below", ""},
{SENS_ARM_LIN_ERROR_ABOVE, "LINERRORABOVE", 0, "Lin error above", ""},
@@ -675,7 +675,7 @@ static void rna_def_radar_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem axis_items[] = {
+ static const EnumPropertyItem axis_items[] = {
{SENS_RADAR_X_AXIS, "XAXIS", 0, "+X axis", ""},
{SENS_RADAR_Y_AXIS, "YAXIS", 0, "+Y axis", ""},
{SENS_RADAR_Z_AXIS, "ZAXIS", 0, "+Z axis", ""},
@@ -731,7 +731,7 @@ static void rna_def_ray_sensor(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem axis_items[] = {
+ static const EnumPropertyItem axis_items[] = {
{SENS_RAY_X_AXIS, "XAXIS", 0, "+X axis", ""},
{SENS_RAY_Y_AXIS, "YAXIS", 0, "+Y axis", ""},
{SENS_RAY_Z_AXIS, "ZAXIS", 0, "+Z axis", ""},
@@ -817,7 +817,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem event_type_joystick_items[] = {
+ static const EnumPropertyItem event_type_joystick_items[] = {
{SENS_JOY_BUTTON, "BUTTON", 0, "Button", ""},
{SENS_JOY_AXIS, "AXIS", 0, "Axis", ""},
{SENS_JOY_HAT, "HAT", 0, "Hat", ""},
@@ -825,7 +825,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem axis_direction_items[] = {
+ static const EnumPropertyItem axis_direction_items[] = {
{SENS_JOY_X_AXIS, "RIGHTAXIS", 0, "Right Axis", ""},
{SENS_JOY_Y_AXIS, "UPAXIS", 0, "Up Axis", ""},
{SENS_JOY_NEG_X_AXIS, "LEFTAXIS", 0, "Left Axis", ""},
@@ -833,7 +833,7 @@ static void rna_def_joystick_sensor(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem hat_direction_items[] = {
+ static const EnumPropertyItem hat_direction_items[] = {
{SENS_JOY_HAT_UP, "UP", 0, "Up", ""},
{SENS_JOY_HAT_DOWN, "DOWN", 0, "Down", ""},
{SENS_JOY_HAT_LEFT, "LEFT", 0, "Left", ""},
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 520a1c2f730..fbc29039539 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -60,7 +60,7 @@ typedef struct EffectInfo {
int inputs;
} EffectInfo;
-EnumPropertyItem rna_enum_sequence_modifier_type_items[] = {
+const EnumPropertyItem rna_enum_sequence_modifier_type_items[] = {
{seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""},
{seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""},
{seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""},
@@ -1328,7 +1328,7 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "StripColorBalance");
}
-static EnumPropertyItem blend_mode_items[] = {
+static const EnumPropertyItem blend_mode_items[] = {
{SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
{SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
@@ -2308,13 +2308,13 @@ static void rna_def_gaussian_blur(StructRNA *srna)
static void rna_def_text(StructRNA *srna)
{
- static EnumPropertyItem text_align_x_items[] = {
+ static const EnumPropertyItem text_align_x_items[] = {
{SEQ_TEXT_ALIGN_X_LEFT, "LEFT", 0, "Left", ""},
{SEQ_TEXT_ALIGN_X_CENTER, "CENTER", 0, "Center", ""},
{SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", 0, "Right", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem text_align_y_items[] = {
+ static const EnumPropertyItem text_align_y_items[] = {
{SEQ_TEXT_ALIGN_Y_TOP, "TOP", 0, "Top", ""},
{SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", 0, "Center", ""},
{SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", 0, "Bottom", ""},
@@ -2592,7 +2592,7 @@ static void rna_def_tonemap_modifier(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
+ static const EnumPropertyItem type_items[] = {
{SEQ_TONEMAP_RD_PHOTORECEPTOR, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
{SEQ_TONEMAP_RH_SIMPLE, "RH_SIMPLE", 0, "Rh Simple", ""},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 76f5a4934cf..e1d3f3958a5 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -457,7 +457,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *parm;
FunctionRNA *func;
- static EnumPropertyItem seq_effect_items[] = {
+ static const EnumPropertyItem seq_effect_items[] = {
{SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
{SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 687541b96b0..7c0c5267daf 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -405,7 +405,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_noise_type_items[] = {
+ static const EnumPropertyItem prop_noise_type_items[] = {
{MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
#ifdef WITH_FFTW3
{MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
@@ -414,7 +414,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_compression_items[] = {
+ static const EnumPropertyItem prop_compression_items[] = {
{ VDB_COMPRESSION_ZIP, "ZIP", 0, "Zip", "Effective but slow compression" },
#ifdef WITH_OPENVDB_BLOSC
{ VDB_COMPRESSION_BLOSC, "BLOSC", 0, "Blosc", "Multithreaded compression, similar in size and quality as 'Zip'" },
@@ -423,26 +423,26 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
{ 0, NULL, 0, NULL, NULL }
};
- static EnumPropertyItem smoke_cache_comp_items[] = {
+ static const EnumPropertyItem smoke_cache_comp_items[] = {
{SM_CACHE_LIGHT, "CACHELIGHT", 0, "Light", "Fast but not so effective compression"},
{SM_CACHE_HEAVY, "CACHEHEAVY", 0, "Heavy", "Effective but slow compression"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem smoke_highres_sampling_items[] = {
+ static const EnumPropertyItem smoke_highres_sampling_items[] = {
{SM_HRES_FULLSAMPLE, "FULLSAMPLE", 0, "Full Sample", ""},
{SM_HRES_LINEAR, "LINEAR", 0, "Linear", ""},
{SM_HRES_NEAREST, "NEAREST", 0, "Nearest", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem smoke_data_depth_items[] = {
+ static const EnumPropertyItem smoke_data_depth_items[] = {
{16, "16", 0, "Float (Half)", "Half float (16 bit data)"},
{0, "32", 0, "Float (Full)", "Full float (32 bit data)"}, /* default */
{0, NULL, 0, NULL, NULL},
};
- static EnumPropertyItem smoke_domain_colli_items[] = {
+ static const EnumPropertyItem smoke_domain_colli_items[] = {
{SM_BORDER_OPEN, "BORDEROPEN", 0, "Open", "Smoke doesn't collide with any border"},
{SM_BORDER_VERTICAL, "BORDERVERTICAL", 0, "Vertically Open",
"Smoke doesn't collide with top and bottom sides"},
@@ -450,7 +450,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem cache_file_type_items[] = {
+ static const EnumPropertyItem cache_file_type_items[] = {
{PTCACHE_FILE_PTCACHE, "POINTCACHE", 0, "Point Cache", "Blender specific point cache file format"},
#ifdef WITH_OPENVDB
{PTCACHE_FILE_OPENVDB, "OPENVDB", 0, "OpenVDB", "OpenVDB file format"},
@@ -458,19 +458,19 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem smoke_view_items[] = {
+ static const EnumPropertyItem smoke_view_items[] = {
{MOD_SMOKE_SLICE_VIEW_ALIGNED, "VIEW_ALIGNED", 0, "View", "Slice volume parallel to the view plane"},
{MOD_SMOKE_SLICE_AXIS_ALIGNED, "AXIS_ALIGNED", 0, "Axis", "Slice volume parallel to the major axis"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem axis_slice_method_items[] = {
+ static const EnumPropertyItem axis_slice_method_items[] = {
{AXIS_SLICE_FULL, "FULL", 0, "Full", "Slice the whole domain object"},
{AXIS_SLICE_SINGLE, "SINGLE", 0, "Single", "Perform a single slice of the domain object"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem axis_slice_position_items[] = {
+ static const EnumPropertyItem axis_slice_position_items[] = {
{SLICE_AXIS_AUTO, "AUTO", 0, "Auto", "Adjust slice direction according to the view direction"},
{SLICE_AXIS_X, "X", 0, "X", "Slice along the X axis"},
{SLICE_AXIS_Y, "Y", 0, "Y", "Slice along the Y axis"},
@@ -478,7 +478,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem vector_draw_items[] = {
+ static const EnumPropertyItem vector_draw_items[] = {
{VECTOR_DRAW_NEEDLE, "NEEDLE", 0, "Needle", "Draw vectors as needles"},
{VECTOR_DRAW_STREAMLINE, "STREAMLINE", 0, "Streamlines", "Draw vectors as streamlines"},
{0, NULL, 0, NULL, NULL}
@@ -830,7 +830,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
"Render a simulation field while mapping its voxels values to the colors of a ramp");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
- static EnumPropertyItem coba_field_items[] = {
+ static const EnumPropertyItem coba_field_items[] = {
{FLUID_FIELD_COLOR_R, "COLOR_R", 0, "Red", "Red component of the color field"},
{FLUID_FIELD_COLOR_G, "COLOR_G", 0, "Green", "Green component of the color field"},
{FLUID_FIELD_COLOR_B, "COLOR_B", 0, "Blue", "Blue component of the color field"},
@@ -862,7 +862,7 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem smoke_flow_types[] = {
+ static const EnumPropertyItem smoke_flow_types[] = {
{MOD_SMOKE_FLOW_TYPE_OUTFLOW, "OUTFLOW", 0, "Outflow", "Delete smoke from simulation"},
{MOD_SMOKE_FLOW_TYPE_SMOKE, "SMOKE", 0, "Smoke", "Add smoke"},
{MOD_SMOKE_FLOW_TYPE_SMOKEFIRE, "BOTH", 0, "Fire + Smoke", "Add fire and smoke"},
@@ -870,13 +870,13 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem smoke_flow_sources[] = {
+ static const EnumPropertyItem smoke_flow_sources[] = {
{MOD_SMOKE_FLOW_SOURCE_PARTICLES, "PARTICLES", ICON_PARTICLES, "Particle System", "Emit smoke from particles"},
{MOD_SMOKE_FLOW_SOURCE_MESH, "MESH", ICON_META_CUBE, "Mesh", "Emit smoke from mesh surface or volume"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem smoke_flow_texture_types[] = {
+ static const EnumPropertyItem smoke_flow_texture_types[] = {
{MOD_SMOKE_FLOW_TEXTURE_MAP_AUTO, "AUTO", 0, "Generated", "Generated coordinates centered to flow object"},
{MOD_SMOKE_FLOW_TEXTURE_MAP_UV, "UV", 0, "UV", "Use UV layer for texture coordinates"},
{0, NULL, 0, NULL, NULL}
@@ -1037,7 +1037,7 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
static void rna_def_smoke_coll_settings(BlenderRNA *brna)
{
- static EnumPropertyItem smoke_coll_type_items[] = {
+ static const EnumPropertyItem smoke_coll_type_items[] = {
{SM_COLL_STATIC, "COLLSTATIC", 0, "Static", "Non moving obstacle"},
{SM_COLL_RIGID, "COLLRIGID", 0, "Rigid", "Rigid obstacle"},
{SM_COLL_ANIMATED, "COLLANIMATED", 0, "Animated", "Animated obstacle"},
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 016392754d1..3e6328ec131 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -61,7 +61,7 @@
#include "RNA_enum_types.h"
-EnumPropertyItem rna_enum_space_type_items[] = {
+const EnumPropertyItem rna_enum_space_type_items[] = {
/* empty must be here for python, is skipped for UI */
{SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""},
{SPACE_VIEW3D, "VIEW_3D", ICON_VIEW3D, "3D View", "3D viewport"},
@@ -96,7 +96,7 @@ EnumPropertyItem rna_enum_space_type_items[] = {
#define V3D_S3D_CAMERA_VIEWS {STEREO_MONO_ID, "MONO", ICON_RESTRICT_RENDER_OFF, "Views", ""},
#endif
-static EnumPropertyItem stereo3d_camera_items[] = {
+static const EnumPropertyItem stereo3d_camera_items[] = {
V3D_S3D_CAMERA_LEFT
V3D_S3D_CAMERA_RIGHT
V3D_S3D_CAMERA_S3D
@@ -104,7 +104,7 @@ static EnumPropertyItem stereo3d_camera_items[] = {
};
#ifdef RNA_RUNTIME
-static EnumPropertyItem multiview_camera_items[] = {
+static const EnumPropertyItem multiview_camera_items[] = {
V3D_S3D_CAMERA_VIEWS
V3D_S3D_CAMERA_S3D
{0, NULL, 0, NULL, NULL}
@@ -117,14 +117,14 @@ static EnumPropertyItem multiview_camera_items[] = {
#undef V3D_S3D_CAMERA_VIEWS
#ifndef RNA_RUNTIME
-static EnumPropertyItem stereo3d_eye_items[] = {
+static const EnumPropertyItem stereo3d_eye_items[] = {
{STEREO_LEFT_ID, "LEFT_EYE", ICON_NONE, "Left Eye"},
{STEREO_RIGHT_ID, "RIGHT_EYE", ICON_NONE, "Right Eye"},
{0, NULL, 0, NULL, NULL}
};
#endif
-static EnumPropertyItem pivot_items_full[] = {
+static const EnumPropertyItem pivot_items_full[] = {
{V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
"Pivot around bounding box center of selected object(s)"},
{V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "3D Cursor", "Pivot around the 3D cursor"},
@@ -136,7 +136,7 @@ static EnumPropertyItem pivot_items_full[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem draw_channels_items[] = {
+static const EnumPropertyItem draw_channels_items[] = {
{SI_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha",
"Draw image with RGB colors and alpha transparency"},
{0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"},
@@ -149,7 +149,7 @@ static EnumPropertyItem draw_channels_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem transform_orientation_items[] = {
+static const EnumPropertyItem transform_orientation_items[] = {
{V3D_MANIP_GLOBAL, "GLOBAL", 0, "Global", "Align the transformation axes to world space"},
{V3D_MANIP_LOCAL, "LOCAL", 0, "Local", "Align the transformation axes to the selected objects' local space"},
{V3D_MANIP_NORMAL, "NORMAL", 0, "Normal",
@@ -162,7 +162,7 @@ static EnumPropertyItem transform_orientation_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem autosnap_items[] = {
+static const EnumPropertyItem autosnap_items[] = {
{SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
/* {-1, "", 0, "", ""}, */
{SACTSNAP_STEP, "STEP", 0, "Frame Step", "Snap to 1.0 frame intervals"},
@@ -176,7 +176,7 @@ static EnumPropertyItem autosnap_items[] = {
};
#endif
-EnumPropertyItem rna_enum_viewport_shade_items[] = {
+const EnumPropertyItem rna_enum_viewport_shade_items[] = {
{OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"},
{OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"},
{OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"},
@@ -187,14 +187,14 @@ EnumPropertyItem rna_enum_viewport_shade_items[] = {
};
-EnumPropertyItem rna_enum_clip_editor_mode_items[] = {
+const EnumPropertyItem rna_enum_clip_editor_mode_items[] = {
{SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"},
{SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing tools"},
{0, NULL, 0, NULL, NULL}
};
/* Actually populated dynamically trough a function, but helps for context-less access (e.g. doc, i18n...). */
-static EnumPropertyItem buttons_context_items[] = {
+static const EnumPropertyItem buttons_context_items[] = {
{BCONTEXT_SCENE, "SCENE", ICON_SCENE_DATA, "Scene", "Scene"},
{BCONTEXT_RENDER, "RENDER", ICON_SCENE, "Render", "Render"},
{BCONTEXT_RENDER_LAYER, "RENDER_LAYER", ICON_RENDERLAYERS, "Render Layers", "Render layers"},
@@ -215,7 +215,7 @@ static EnumPropertyItem buttons_context_items[] = {
};
/* Actually populated dynamically trough a function, but helps for context-less access (e.g. doc, i18n...). */
-static EnumPropertyItem buttons_texture_context_items[] = {
+static const EnumPropertyItem buttons_texture_context_items[] = {
{SB_TEXC_MATERIAL, "MATERIAL", ICON_MATERIAL, "", "Show material textures"},
{SB_TEXC_WORLD, "WORLD", ICON_WORLD, "", "Show world textures"},
{SB_TEXC_LAMP, "LAMP", ICON_LAMP, "", "Show lamp textures"},
@@ -226,7 +226,7 @@ static EnumPropertyItem buttons_texture_context_items[] = {
};
-static EnumPropertyItem fileselectparams_recursion_level_items[] = {
+static const EnumPropertyItem fileselectparams_recursion_level_items[] = {
{0, "NONE", 0, "None", "Only list current directory's content, with no recursion"},
{1, "BLEND", 0, "Blend File", "List .blend files' content"},
{2, "ALL_1", 0, "One Level", "List all sub-directories' content, one level of recursion"},
@@ -235,7 +235,7 @@ static EnumPropertyItem fileselectparams_recursion_level_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_file_sort_items[] = {
+const EnumPropertyItem rna_enum_file_sort_items[] = {
{FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"},
{FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension/type"},
{FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"},
@@ -444,7 +444,8 @@ static PointerRNA rna_View3D_current_orientation_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, orientation);
}
-EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *rna_TransformOrientation_itemf(
+ bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
WorkSpace *workspace;
ListBase *transform_orientations;
@@ -753,7 +754,7 @@ static void rna_SpaceView3D_viewport_shade_set(PointerRNA *ptr, int value)
v3d->drawtype = value;
}
-static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
wmWindow *win = CTX_wm_window(C);
@@ -780,7 +781,7 @@ static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *C, Point
return item;
}
-static EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
Scene *scene = CTX_data_scene(C);
@@ -882,7 +883,7 @@ static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr, PointerRNA value)
ED_space_image_set_mask(NULL, sima, (Mask *)value.data);
}
-static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
SpaceImage *sima = (SpaceImage *)ptr->data;
@@ -1004,10 +1005,10 @@ static void rna_SpaceImageEditor_scopes_update(struct bContext *C, struct Pointe
ED_space_image_release_buffer(sima, ibuf, lock);
}
-static EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
- static EnumPropertyItem pivot_items[] = {
+ static const EnumPropertyItem pivot_items[] = {
{V3D_AROUND_CENTER_BOUNDS, "CENTER", ICON_ROTATE, "Bounding Box Center", ""},
{V3D_AROUND_CENTER_MEAN, "MEDIAN", ICON_ROTATECENTER, "Median Point", ""},
{V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
@@ -1107,7 +1108,7 @@ static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value)
sbuts->mainbuser = value;
}
-static EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C), PointerRNA *ptr,
PropertyRNA *UNUSED(prop), bool *r_free)
{
SpaceButs *sbuts = (SpaceButs *)(ptr->data);
@@ -1202,7 +1203,7 @@ static void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
sbuts->re_align = 1;
}
-static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
@@ -1555,7 +1556,7 @@ static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type)
else
return true;
}
-static EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_node_tree_type_itemf(C, rna_SpaceNodeEditor_tree_type_poll, r_free);
@@ -1657,7 +1658,7 @@ static int rna_FileSelectParams_use_lib_get(PointerRNA *ptr)
return params && (params->type == FILE_LOADLIB);
}
-static EnumPropertyItem *rna_FileSelectParams_recursion_level_itemf(
+static const EnumPropertyItem *rna_FileSelectParams_recursion_level_itemf(
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
FileSelectParams *params = ptr->data;
@@ -1946,7 +1947,7 @@ static void rna_FileBrowser_FSMenuRecent_active_range(PointerRNA *ptr, int *min,
#else
-static EnumPropertyItem dt_uv_items[] = {
+static const EnumPropertyItem dt_uv_items[] = {
{SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Draw white edges with black outline"},
{SI_UVDT_DASH, "DASH", 0, "Dash", "Draw dashed black-white edges"},
{SI_UVDT_BLACK, "BLACK", 0, "Black", "Draw black edges"},
@@ -1982,7 +1983,7 @@ static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *m
{
PropertyRNA *prop;
- static EnumPropertyItem overlay_mode_items[] = {
+ static const EnumPropertyItem overlay_mode_items[] = {
{MASK_OVERLAY_ALPHACHANNEL, "ALPHACHANNEL", ICON_NONE, "Alpha Channel", "Show alpha channel of the mask"},
{MASK_OVERLAY_COMBINED, "COMBINED", ICON_NONE, "Combined", "Combine space background image with the mask"},
{0, NULL, 0, NULL, NULL}
@@ -2024,7 +2025,7 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem sticky_mode_items[] = {
+ static const EnumPropertyItem sticky_mode_items[] = {
{SI_STICKY_DISABLE, "DISABLED", ICON_STICKY_UVS_DISABLE, "Disabled", "Sticky vertex selection disabled"},
{SI_STICKY_LOC, "SHARED_LOCATION", ICON_STICKY_UVS_LOC, "Shared Location",
"Select UVs that are at the same location and share a mesh vertex"},
@@ -2033,13 +2034,13 @@ static void rna_def_space_image_uv(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem dt_uvstretch_items[] = {
+ static const EnumPropertyItem dt_uvstretch_items[] = {
{SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"},
{SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem other_uv_filter_items[] = {
+ static const EnumPropertyItem other_uv_filter_items[] = {
{SI_FILTER_ALL, "ALL", 0, "All", "No filter, show all islands from other objects"},
{SI_FILTER_SAME_IMAGE, "SAME_IMAGE", ICON_IMAGE_DATA, "Same Image",
"Only show others' UV islands whose active image matches image of the active face"},
@@ -2147,7 +2148,7 @@ static void rna_def_space_outliner(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem display_mode_items[] = {
+ static const EnumPropertyItem display_mode_items[] = {
{SO_ALL_SCENES, "ALL_SCENES", 0, "All Scenes", "Display data-blocks in all scenes"},
{SO_CUR_SCENE, "CURRENT_SCENE", 0, "Current Scene", "Display data-blocks in current scene"},
{SO_VISIBLE, "VISIBLE_LAYERS", 0, "Visible Layers", "Display data-blocks in visible layers"},
@@ -2211,7 +2212,7 @@ static void rna_def_background_image(BlenderRNA *brna)
PropertyRNA *prop;
/* note: combinations work but don't flip so arnt that useful */
- static EnumPropertyItem bgpic_axis_items[] = {
+ static const EnumPropertyItem bgpic_axis_items[] = {
{0, "", 0, N_("X Axis"), ""},
{(1 << RV3D_VIEW_LEFT), "LEFT", 0, "Left", "Show background image while looking to the left"},
{(1 << RV3D_VIEW_RIGHT), "RIGHT", 0, "Right", "Show background image while looking to the right"},
@@ -2230,7 +2231,7 @@ static void rna_def_background_image(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bgpic_source_items[] = {
+ static const EnumPropertyItem bgpic_source_items[] = {
{V3D_BGPIC_IMAGE, "IMAGE", 0, "Image", ""},
{V3D_BGPIC_MOVIE, "MOVIE_CLIP", 0, "Movie Clip", ""},
{0, NULL, 0, NULL, NULL}
@@ -2398,7 +2399,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem manipulators_items[] = {
+ static const EnumPropertyItem manipulators_items[] = {
{V3D_MANIP_TRANSLATE, "TRANSLATE", ICON_MAN_TRANS, "Translate",
"Use the manipulator for movement transformations"},
{V3D_MANIP_ROTATE, "ROTATE", ICON_MAN_ROT, "Rotate",
@@ -2408,14 +2409,14 @@ static void rna_def_space_view3d(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem rv3d_persp_items[] = {
+ static const EnumPropertyItem rv3d_persp_items[] = {
{RV3D_PERSP, "PERSP", 0, "Perspective", ""},
{RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""},
{RV3D_CAMOB, "CAMERA", 0, "Camera", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem bundle_drawtype_items[] = {
+ static const EnumPropertyItem bundle_drawtype_items[] = {
{OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""},
{OB_ARROWS, "ARROWS", 0, "Arrows", ""},
{OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
@@ -2426,7 +2427,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem view3d_matcap_items[] = {
+ static const EnumPropertyItem view3d_matcap_items[] = {
{ICON_MATCAP_01, "01", ICON_MATCAP_01, "", ""},
{ICON_MATCAP_02, "02", ICON_MATCAP_02, "", ""},
{ICON_MATCAP_03, "03", ICON_MATCAP_03, "", ""},
@@ -2960,7 +2961,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem align_items[] = {
+ static const EnumPropertyItem align_items[] = {
{BUT_HORIZONTAL, "HORIZONTAL", 0, "Horizontal", ""},
{BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""},
{0, NULL, 0, NULL, NULL}
@@ -3013,7 +3014,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
static void rna_def_space_image(BlenderRNA *brna)
{
- static EnumPropertyItem image_space_mode_items[] = {
+ static const EnumPropertyItem image_space_mode_items[] = {
{SI_MODE_VIEW, "VIEW", ICON_FILE_IMAGE, "View", "View the image and UV edit in mesh editmode"},
{SI_MODE_PAINT, "PAINT", ICON_TPAINT_HLT, "Paint", "2D image painting mode"},
{SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing"},
@@ -3166,14 +3167,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem view_type_items[] = {
+ static const EnumPropertyItem view_type_items[] = {
{SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
{SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""},
{SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer and Image Preview", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem display_mode_items[] = {
+ static const EnumPropertyItem display_mode_items[] = {
{SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""},
{SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""},
{SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""},
@@ -3181,7 +3182,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem proxy_render_size_items[] = {
+ static const EnumPropertyItem proxy_render_size_items[] = {
{SEQ_PROXY_RENDER_SIZE_NONE, "NONE", 0, "No display", ""},
{SEQ_PROXY_RENDER_SIZE_SCENE, "SCENE", 0, "Scene render size", ""},
{SEQ_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""},
@@ -3192,21 +3193,21 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem overlay_type_items[] = {
+ static const EnumPropertyItem overlay_type_items[] = {
{SEQ_DRAW_OVERLAY_RECT, "RECTANGLE", 0, "Rectangle", "Show rectangle area overlay"},
{SEQ_DRAW_OVERLAY_REFERENCE, "REFERENCE", 0, "Reference", "Show reference frame only"},
{SEQ_DRAW_OVERLAY_CURRENT, "CURRENT", 0, "Current", "Show current frame only"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem preview_channels_items[] = {
+ static const EnumPropertyItem preview_channels_items[] = {
{SEQ_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha",
"Draw image with RGB colors and alpha transparency"},
{0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem waveform_type_draw_items[] = {
+ static const EnumPropertyItem waveform_type_draw_items[] = {
{SEQ_NO_WAVEFORMS, "NO_WAVEFORMS", 0, "Waveforms Off",
"No waveforms drawn for any sound strips"},
{SEQ_ALL_WAVEFORMS, "ALL_WAVEFORMS", 0, "Waveforms On",
@@ -3558,7 +3559,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem mode_items[] = {
+ static const EnumPropertyItem mode_items[] = {
{SIPO_MODE_ANIMATION, "FCURVES", ICON_IPO, "F-Curve",
"Edit animation/keyframes displayed as 2D curves"},
{SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"},
@@ -3566,7 +3567,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
};
/* this is basically the same as the one for the 3D-View, but with some entries omitted */
- static EnumPropertyItem gpivot_items[] = {
+ static const EnumPropertyItem gpivot_items[] = {
{V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", ""},
{V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", ""},
{V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, "Individual Centers", ""},
@@ -3814,7 +3815,7 @@ static void rna_def_space_time(BlenderRNA *brna)
static void rna_def_console_line(BlenderRNA *brna)
{
- static EnumPropertyItem console_line_type_items[] = {
+ static const EnumPropertyItem console_line_type_items[] = {
{CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""},
{CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""},
{CONSOLE_LINE_INFO, "INFO", 0, "Info", ""},
@@ -3893,14 +3894,14 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem file_display_items[] = {
+ static const EnumPropertyItem file_display_items[] = {
{FILE_SHORTDISPLAY, "LIST_SHORT", ICON_SHORTDISPLAY, "Short List", "Display files as short list"},
{FILE_LONGDISPLAY, "LIST_LONG", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"},
{FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem display_size_items[] = {
+ static const EnumPropertyItem display_size_items[] = {
{32, "TINY", 0, "Tiny", ""},
{64, "SMALL", 0, "Small", ""},
{128, "NORMAL", 0, "Normal", ""},
@@ -3908,7 +3909,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem file_filter_idtypes_items[] = {
+ static const EnumPropertyItem file_filter_idtypes_items[] = {
{FILTER_ID_AC, "ACTION", ICON_ANIM_DATA, "Actions", "Show/hide Action data-blocks"},
{FILTER_ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armatures", "Show/hide Armature data-blocks"},
{FILTER_ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brushes", "Show/hide Brushes data-blocks"},
@@ -3945,7 +3946,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem file_filter_idcategories_items[] = {
+ static const EnumPropertyItem file_filter_idcategories_items[] = {
{FILTER_ID_SCE,
"SCENE", ICON_SCENE_DATA, "Scenes", "Show/hide scenes"},
{FILTER_ID_AC,
@@ -4269,7 +4270,7 @@ static void rna_def_space_info(BlenderRNA *brna)
static void rna_def_space_userpref(BlenderRNA *brna)
{
- static EnumPropertyItem filter_type_items[] = {
+ static const EnumPropertyItem filter_type_items[] = {
{0, "NAME", 0, "Name", "Filter based on the operator name"},
{1, "KEY", 0, "Key-Binding", "Filter based on key bindings"},
{0, NULL, 0, NULL, NULL}};
@@ -4353,7 +4354,7 @@ static void rna_def_space_node(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem texture_id_type_items[] = {
+ static const EnumPropertyItem texture_id_type_items[] = {
{SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"},
{SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
{SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"},
@@ -4363,7 +4364,7 @@ static void rna_def_space_node(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem shader_type_items[] = {
+ static const EnumPropertyItem shader_type_items[] = {
{SNODE_SHADER_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit shader nodes from Object"},
{SNODE_SHADER_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit shader nodes from World"},
#ifdef WITH_FREESTYLE
@@ -4372,7 +4373,7 @@ static void rna_def_space_node(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem backdrop_channels_items[] = {
+ static const EnumPropertyItem backdrop_channels_items[] = {
{SNODE_USE_ALPHA, "COLOR_ALPHA", ICON_IMAGE_RGB_ALPHA, "Color and Alpha",
"Draw image with RGB colors and alpha transparency"},
{0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors"},
@@ -4383,13 +4384,13 @@ static void rna_def_space_node(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem insert_ofs_dir_items[] = {
+ static const EnumPropertyItem insert_ofs_dir_items[] = {
{SNODE_INSERTOFS_DIR_RIGHT, "RIGHT", 0, "Right"},
{SNODE_INSERTOFS_DIR_LEFT, "LEFT", 0, "Left"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem dummy_items[] = {
+ static const EnumPropertyItem dummy_items[] = {
{0, "DUMMY", 0, "", ""},
{0, NULL, 0, NULL, NULL}};
@@ -4584,20 +4585,20 @@ static void rna_def_space_clip(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem view_items[] = {
+ static const EnumPropertyItem view_items[] = {
{SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
{SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"},
{SC_VIEW_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dopesheet", "Dopesheet view for tracking data"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem gpencil_source_items[] = {
+ static const EnumPropertyItem gpencil_source_items[] = {
{SC_GPENCIL_SRC_CLIP, "CLIP", 0, "Clip", "Show grease pencil data-block which belongs to movie clip"},
{SC_GPENCIL_SRC_TRACK, "TRACK", 0, "Track", "Show grease pencil data-block which belongs to active track"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem pivot_items[] = {
+ static const EnumPropertyItem pivot_items[] = {
{V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
"Pivot around bounding box center of selected object(s)"},
{V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", "Pivot around the 2D cursor"},
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 9490dfd0478..040273925cb 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -52,7 +52,7 @@
#include "WM_types.h"
#ifndef RNA_RUNTIME
-static EnumPropertyItem texture_filter_items[] = {
+static const EnumPropertyItem texture_filter_items[] = {
{TXF_BOX, "BOX", 0, "Box", ""},
{TXF_EWA, "EWA", 0, "EWA", ""},
{TXF_FELINE, "FELINE", 0, "FELINE", ""},
@@ -61,7 +61,7 @@ static EnumPropertyItem texture_filter_items[] = {
};
#endif
-EnumPropertyItem rna_enum_texture_type_items[] = {
+const EnumPropertyItem rna_enum_texture_type_items[] = {
{0, "NONE", 0, "None", ""},
{TEX_BLEND, "BLEND", ICON_TEXTURE, "Blend", "Procedural - create a ramp texture"},
{TEX_CLOUDS, "CLOUDS", ICON_TEXTURE, "Clouds", "Procedural - create a cloud-like fractal noise texture"},
@@ -85,7 +85,7 @@ EnumPropertyItem rna_enum_texture_type_items[] = {
};
#ifndef RNA_RUNTIME
-static EnumPropertyItem blend_type_items[] = {
+static const EnumPropertyItem blend_type_items[] = {
{MTEX_BLEND, "MIX", 0, "Mix", ""},
{MTEX_ADD, "ADD", 0, "Add", ""},
{MTEX_SUB, "SUBTRACT", 0, "Subtract", ""},
@@ -362,8 +362,9 @@ static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
}
-static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *UNUSED(C), PointerRNA *ptr,
- PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *rna_TextureSlot_output_node_itemf(
+ bContext *UNUSED(C), PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), bool *r_free)
{
MTex *mtex = ptr->data;
Tex *tex = mtex->tex;
@@ -483,7 +484,7 @@ static char *rna_OceanTex_path(PointerRNA *UNUSED(ptr))
static void rna_def_texmapping(BlenderRNA *brna)
{
- static EnumPropertyItem prop_mapping_items[] = {
+ static const EnumPropertyItem prop_mapping_items[] = {
{MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
{MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
{MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
@@ -491,7 +492,7 @@ static void rna_def_texmapping(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_vect_type_items[] = {
+ static const EnumPropertyItem prop_vect_type_items[] = {
{TEXMAP_TYPE_TEXTURE, "TEXTURE", 0, "Texture", "Transform a texture by inverse mapping the texture coordinate"},
{TEXMAP_TYPE_POINT, "POINT", 0, "Point", "Transform a point"},
{TEXMAP_TYPE_VECTOR, "VECTOR", 0, "Vector", "Transform a direction vector"},
@@ -499,7 +500,7 @@ static void rna_def_texmapping(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_xyz_mapping_items[] = {
+ static const EnumPropertyItem prop_xyz_mapping_items[] = {
{0, "NONE", 0, "None", ""},
{1, "X", 0, "X", ""},
{2, "Y", 0, "Y", ""},
@@ -636,7 +637,7 @@ static void rna_def_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem output_node_items[] = {
+ static const EnumPropertyItem output_node_items[] = {
{0, "DUMMY", 0, "Dummy", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -782,14 +783,14 @@ static void rna_def_environment_map(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_source_items[] = {
+ static const EnumPropertyItem prop_source_items[] = {
{ENV_STATIC, "STATIC", 0, "Static", "Calculate environment map only once"},
{ENV_ANIM, "ANIMATED", 0, "Animated", "Calculate environment map at each rendering"},
{ENV_LOAD, "IMAGE_FILE", 0, "Image File", "Load a saved environment map image from disk"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_mapping_items[] = {
+ static const EnumPropertyItem prop_mapping_items[] = {
{ENV_CUBE, "CUBE", 0, "Cube", "Use environment map with six cube sides"},
{ENV_PLANE, "PLANE", 0, "Plane", "Only one side is rendered, with Z axis pointing in direction of image"},
{0, NULL, 0, NULL, NULL}
@@ -865,7 +866,7 @@ static void rna_def_environment_map(BlenderRNA *brna)
RNA_api_environment_map(srna);
}
-static EnumPropertyItem prop_noise_basis_items[] = {
+static const EnumPropertyItem prop_noise_basis_items[] = {
{TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original",
"Noise algorithm - Blender original: Smooth interpolated noise"},
{TEX_STDPERLIN, "ORIGINAL_PERLIN", 0, "Original Perlin",
@@ -888,7 +889,7 @@ static EnumPropertyItem prop_noise_basis_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem prop_noise_type[] = {
+static const EnumPropertyItem prop_noise_type[] = {
{TEX_NOISESOFT, "SOFT_NOISE", 0, "Soft", "Generate soft noise (smooth transitions)"},
{TEX_NOISEPERL, "HARD_NOISE", 0, "Hard", "Generate hard noise (sharp transitions)"},
{0, NULL, 0, NULL, NULL}
@@ -900,7 +901,7 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_clouds_stype[] = {
+ static const EnumPropertyItem prop_clouds_stype[] = {
{TEX_DEFAULT, "GRAYSCALE", 0, "Grayscale", ""},
{TEX_COLOR, "COLOR", 0, "Color", ""},
{0, NULL, 0, NULL, NULL}
@@ -954,7 +955,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_wood_stype[] = {
+ static const EnumPropertyItem prop_wood_stype[] = {
{TEX_BAND, "BANDS", 0, "Bands", "Use standard wood texture in bands"},
{TEX_RING, "RINGS", 0, "Rings", "Use wood texture in rings"},
{TEX_BANDNOISE, "BANDNOISE", 0, "Band Noise", "Add noise to standard wood"},
@@ -962,7 +963,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_wood_noisebasis2[] = {
+ static const EnumPropertyItem prop_wood_noisebasis2[] = {
{TEX_SIN, "SIN", 0, "Sine", "Use a sine wave to produce bands"},
{TEX_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"},
{TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
@@ -1024,14 +1025,14 @@ static void rna_def_texture_marble(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_marble_stype[] = {
+ static const EnumPropertyItem prop_marble_stype[] = {
{TEX_SOFT, "SOFT", 0, "Soft", "Use soft marble"},
{TEX_SHARP, "SHARP", 0, "Sharp", "Use more clearly defined marble"},
{TEX_SHARPER, "SHARPER", 0, "Sharper", "Use very clearly defined marble"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_marble_noisebasis2[] = {
+ static const EnumPropertyItem prop_marble_noisebasis2[] = {
{TEX_SIN, "SIN", 0, "Sin", "Use a sine wave to produce bands"},
{TEX_SAW, "SAW", 0, "Saw", "Use a saw wave to produce bands"},
{TEX_TRI, "TRI", 0, "Tri", "Use a triangle wave to produce bands"},
@@ -1124,7 +1125,7 @@ static void rna_def_texture_blend(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_blend_progression[] = {
+ static const EnumPropertyItem prop_blend_progression[] = {
{TEX_LIN, "LINEAR", 0, "Linear", "Create a linear progression"},
{TEX_QUAD, "QUADRATIC", 0, "Quadratic", "Create a quadratic progression"},
{TEX_EASE, "EASING", 0, "Easing", "Create a progression easing from one step to the next"},
@@ -1165,7 +1166,7 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_stucci_stype[] = {
+ static const EnumPropertyItem prop_stucci_stype[] = {
{TEX_PLASTIC, "PLASTIC", 0, "Plastic", "Use standard stucci"},
{TEX_WALLIN, "WALL_IN", 0, "Wall in", "Create Dimples"},
{TEX_WALLOUT, "WALL_OUT", 0, "Wall out", "Create Ridges"},
@@ -1223,7 +1224,7 @@ static void rna_def_texture_image(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_image_extension[] = {
+ static const EnumPropertyItem prop_image_extension[] = {
{TEX_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"},
{TEX_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"},
{TEX_CLIPCUBE, "CLIP_CUBE", 0, "Clip Cube",
@@ -1414,7 +1415,7 @@ static void rna_def_texture_musgrave(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_musgrave_type[] = {
+ static const EnumPropertyItem prop_musgrave_type[] = {
{TEX_MFRACTAL, "MULTIFRACTAL", 0, "Multifractal", "Use Perlin noise as a basis"},
{TEX_RIDGEDMF, "RIDGED_MULTIFRACTAL", 0, "Ridged Multifractal",
"Use Perlin noise with inflection as a basis"},
@@ -1496,7 +1497,7 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem prop_distance_metric_items[] = {
+ static const EnumPropertyItem prop_distance_metric_items[] = {
{TEX_DISTANCE, "DISTANCE", 0, "Actual Distance", "sqrt(x*x+y*y+z*z)"},
{TEX_DISTANCE_SQUARED, "DISTANCE_SQUARED", 0, "Distance Squared", "(x*x+y*y+z*z)"},
{TEX_MANHATTAN, "MANHATTAN", 0, "Manhattan",
@@ -1513,7 +1514,7 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_coloring_items[] = {
+ static const EnumPropertyItem prop_coloring_items[] = {
/* XXX: OK names / descriptions? */
{TEX_INTENSITY, "INTENSITY", 0, "Intensity", "Only calculate intensity"},
{TEX_COL1, "POSITION", 0, "Position", "Color cells by position"},
@@ -1636,28 +1637,28 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem point_source_items[] = {
+ static const EnumPropertyItem point_source_items[] = {
{TEX_PD_PSYS, "PARTICLE_SYSTEM", 0, "Particle System", "Generate point density from a particle system"},
{TEX_PD_OBJECT, "OBJECT", 0, "Object Vertices", "Generate point density from an object's vertices"},
/*{TEX_PD_FILE, "FILE", 0, "File", ""}, */
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem particle_cache_items[] = {
+ static const EnumPropertyItem particle_cache_items[] = {
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Emit Object Location", ""},
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Emit Object Space", ""},
{TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem vertex_cache_items[] = {
+ static const EnumPropertyItem vertex_cache_items[] = {
{TEX_PD_OBJECTLOC, "OBJECT_LOCATION", 0, "Object Location", ""},
{TEX_PD_OBJECTSPACE, "OBJECT_SPACE", 0, "Object Space", ""},
{TEX_PD_WORLDSPACE, "WORLD_SPACE", 0, "Global Space", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem falloff_items[] = {
+ static const EnumPropertyItem falloff_items[] = {
{TEX_PD_FALLOFF_STD, "STANDARD", 0, "Standard", ""},
{TEX_PD_FALLOFF_SMOOTH, "SMOOTH", 0, "Smooth", ""},
{TEX_PD_FALLOFF_SOFT, "SOFT", 0, "Soft", ""},
@@ -1668,7 +1669,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem particle_color_source_items[] = {
+ static const EnumPropertyItem particle_color_source_items[] = {
{TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
{TEX_PD_COLOR_PARTAGE, "PARTICLE_AGE", 0, "Particle Age", "Lifetime mapped as 0.0 - 1.0 intensity"},
{TEX_PD_COLOR_PARTSPEED, "PARTICLE_SPEED", 0, "Particle Speed",
@@ -1677,7 +1678,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem vertex_color_source_items[] = {
+ static const EnumPropertyItem vertex_color_source_items[] = {
{TEX_PD_COLOR_CONSTANT, "CONSTANT", 0, "Constant", ""},
{TEX_PD_COLOR_VERTCOL, "VERTEX_COLOR", 0, "Vertex Color", "Vertex color layer"},
{TEX_PD_COLOR_VERTWEIGHT, "VERTEX_WEIGHT", 0, "Vertex Weight", "Vertex group weight"},
@@ -1685,7 +1686,7 @@ static void rna_def_texture_pointdensity(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem turbulence_influence_items[] = {
+ static const EnumPropertyItem turbulence_influence_items[] = {
{TEX_PD_NOISE_STATIC, "STATIC", 0, "Static",
"Noise patterns will remain unchanged, faster and suitable for stills"},
{TEX_PD_NOISE_VEL, "PARTICLE_VELOCITY", 0, "Particle Velocity",
@@ -1849,7 +1850,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem interpolation_type_items[] = {
+ static const EnumPropertyItem interpolation_type_items[] = {
{TEX_VD_NEARESTNEIGHBOR, "NEREASTNEIGHBOR", 0, "Nearest Neighbor",
"No interpolation, fast but blocky and low quality"},
{TEX_VD_LINEAR, "TRILINEAR", 0, "Linear", "Good smoothness and speed"},
@@ -1860,7 +1861,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem file_format_items[] = {
+ static const EnumPropertyItem file_format_items[] = {
{TEX_VD_BLENDERVOXEL, "BLENDER_VOXEL", 0, "Blender Voxel", "Default binary voxel file format"},
{TEX_VD_RAW_8BIT, "RAW_8BIT", 0, "8 bit RAW", "8 bit grayscale binary data"},
/*{TEX_VD_RAW_16BIT, "RAW_16BIT", 0, "16 bit RAW", ""}, */
@@ -1871,14 +1872,14 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem voxeldata_extension[] = {
+ static const EnumPropertyItem voxeldata_extension[] = {
{TEX_EXTEND, "EXTEND", 0, "Extend", "Extend by repeating edge pixels of the image"},
{TEX_CLIP, "CLIP", 0, "Clip", "Clip to image size and set exterior pixels as transparent"},
{TEX_REPEAT, "REPEAT", 0, "Repeat", "Cause the image to repeat horizontally and vertically"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem smoked_type_items[] = {
+ static const EnumPropertyItem smoked_type_items[] = {
{TEX_VD_SMOKEDENSITY, "SMOKEDENSITY", 0, "Smoke", "Use smoke density and color as texture data"},
{TEX_VD_SMOKEFLAME, "SMOKEFLAME", 0, "Flame", "Use flame temperature as texture data"},
{TEX_VD_SMOKEHEAT, "SMOKEHEAT", 0, "Heat", "Use smoke heat as texture data. Values from -2.0 to 2.0 are used"},
@@ -1886,7 +1887,7 @@ static void rna_def_texture_voxeldata(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem hair_type_items[] = {
+ static const EnumPropertyItem hair_type_items[] = {
{TEX_VD_HAIRDENSITY, "HAIRDENSITY", 0, "Density", "Use hair density as texture data"},
{TEX_VD_HAIRRESTDENSITY, "HAIRRESTDENSITY", 0, "Rest Density", "Use hair rest density as texture data"},
{TEX_VD_HAIRVELOCITY, "HAIRVELOCITY", 0, "Velocity", "Use hair velocity as texture data"},
@@ -1993,7 +1994,7 @@ static void rna_def_texture_ocean(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem ocean_output_items[] = {
+ static const EnumPropertyItem ocean_output_items[] = {
{TEX_OCN_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Output XYZ displacement in RGB channels"},
/*{TEX_OCN_NORMALS, "NORMALS", 0, "Normals", "Outputs wave normals"}, *//* these are in nor channel now */
{TEX_OCN_FOAM, "FOAM", 0, "Foam", "Output Foam (wave overlap) amount in single channel"},
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index ea45b08458c..d23017429c1 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -827,7 +827,7 @@ static void rna_trackingCameras_matrix_from_frame(ID *id, MovieTrackingReconstru
#else
-static EnumPropertyItem tracker_motion_model[] = {
+static const EnumPropertyItem tracker_motion_model[] = {
{TRACK_MOTION_MODEL_HOMOGRAPHY, "Perspective", 0, "Perspective",
"Search for markers that are perspectively deformed (homography) between frames"},
{TRACK_MOTION_MODEL_AFFINE, "Affine", 0, "Affine",
@@ -843,7 +843,7 @@ static EnumPropertyItem tracker_motion_model[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem pattern_match_items[] = {
+static const EnumPropertyItem pattern_match_items[] = {
{TRACK_MATCH_KEYFRAME, "KEYFRAME", 0, "Keyframe", "Track pattern from keyframe to next frame"},
{TRACK_MATCH_PREVFRAME, "PREV_FRAME", 0, "Previous frame", "Track pattern from current frame to next frame"},
{0, NULL, 0, NULL, NULL}
@@ -854,7 +854,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem speed_items[] = {
+ static const EnumPropertyItem speed_items[] = {
{0, "FASTEST", 0, "Fastest", "Track as fast as it's possible"},
{TRACKING_SPEED_DOUBLE, "DOUBLE", 0, "Double", "Track with double speed"},
{TRACKING_SPEED_REALTIME, "REALTIME", 0, "Realtime", "Track with realtime speed"},
@@ -863,14 +863,14 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem cleanup_items[] = {
+ static const EnumPropertyItem cleanup_items[] = {
{TRACKING_CLEAN_SELECT, "SELECT", 0, "Select", "Select unclean tracks"},
{TRACKING_CLEAN_DELETE_TRACK, "DELETE_TRACK", 0, "Delete Track", "Delete unclean tracks"},
{TRACKING_CLEAN_DELETE_SEGMENT, "DELETE_SEGMENTS", 0, "Delete Segments", "Delete unclean segments of tracks"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem refine_items[] = {
+ static const EnumPropertyItem refine_items[] = {
{0, "NONE", 0, "Nothing", "Do not refine camera intrinsics"},
{REFINE_FOCAL_LENGTH, "FOCAL_LENGTH", 0, "Focal Length", "Refine focal length"},
{REFINE_FOCAL_LENGTH | REFINE_RADIAL_DISTORTION_K1, "FOCAL_LENGTH_RADIAL_K1", 0, "Focal length, K1",
@@ -1086,14 +1086,14 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem distortion_model_items[] = {
+ static const EnumPropertyItem distortion_model_items[] = {
{TRACKING_DISTORTION_MODEL_POLYNOMIAL, "POLYNOMIAL", 0, "Polynomial", "Radial distortion model which fits common cameras"},
{TRACKING_DISTORTION_MODEL_DIVISION, "DIVISION", 0, "Divisions", "Division distortion model which "
"better represents wide-angle cameras"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem camera_units_items[] = {
+ static const EnumPropertyItem camera_units_items[] = {
{CAMERA_UNITS_PX, "PIXELS", 0, "px", "Use pixels for units of focal length"},
{CAMERA_UNITS_MM, "MILLIMETERS", 0, "mm", "Use millimeters for units of focal length"},
{0, NULL, 0, NULL, NULL}
@@ -1674,7 +1674,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem filter_items[] = {
+ static const EnumPropertyItem filter_items[] = {
{TRACKING_FILTER_NEAREST, "NEAREST", 0, "Nearest", "No interpolation, use nearest neighbor pixel"},
{TRACKING_FILTER_BILINEAR, "BILINEAR", 0, "Bilinear", "Simple interpolation between adjacent pixels"},
{TRACKING_FILTER_BICUBIC, "BICUBIC", 0, "Bicubic", "High quality pixel interpolation"},
@@ -2125,7 +2125,7 @@ static void rna_def_trackingDopesheet(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem sort_items[] = {
+ static const EnumPropertyItem sort_items[] = {
{TRACKING_DOPE_SORT_NAME, "NAME", 0, "Name", "Sort channels by their names"},
{TRACKING_DOPE_SORT_LONGEST, "LONGEST", 0, "Longest", "Sort channels by longest tracked segment"},
{TRACKING_DOPE_SORT_TOTAL, "TOTAL", 0, "Total", "Sort channels by overall amount of tracked segments"},
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 08038b0b1ff..f2527a8a5e9 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -43,7 +43,7 @@
#include "WM_types.h"
/* see WM_types.h */
-EnumPropertyItem rna_enum_operator_context_items[] = {
+const EnumPropertyItem rna_enum_operator_context_items[] = {
{WM_OP_INVOKE_DEFAULT, "INVOKE_DEFAULT", 0, "Invoke Default", ""},
{WM_OP_INVOKE_REGION_WIN, "INVOKE_REGION_WIN", 0, "Invoke Region Window", ""},
{WM_OP_INVOKE_REGION_CHANNELS, "INVOKE_REGION_CHANNELS", 0, "Invoke Region Channels", ""},
@@ -59,7 +59,7 @@ EnumPropertyItem rna_enum_operator_context_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_uilist_layout_type_items[] = {
+const EnumPropertyItem rna_enum_uilist_layout_type_items[] = {
{UILST_LAYOUT_DEFAULT, "DEFAULT", 0, "Default Layout", "Use the default, multi-rows layout"},
{UILST_LAYOUT_COMPACT, "COMPACT", 0, "Compact Layout", "Use the compact, single-row layout"},
{UILST_LAYOUT_GRID, "GRID", 0, "Grid Layout", "Use the grid-based layout"},
@@ -896,7 +896,7 @@ static void rna_def_ui_layout(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem alignment_items[] = {
+ static const EnumPropertyItem alignment_items[] = {
{UI_LAYOUT_ALIGN_EXPAND, "EXPAND", 0, "Expand", ""},
{UI_LAYOUT_ALIGN_LEFT, "LEFT", 0, "Left", ""},
{UI_LAYOUT_ALIGN_CENTER, "CENTER", 0, "Center", ""},
@@ -950,7 +950,7 @@ static void rna_def_panel(BlenderRNA *brna)
PropertyRNA *parm;
FunctionRNA *func;
- static EnumPropertyItem panel_flag_items[] = {
+ static const EnumPropertyItem panel_flag_items[] = {
{PNL_DEFAULT_CLOSED, "DEFAULT_CLOSED", 0, "Default Closed",
"Defines if the panel has to be open or collapsed at the time of its creation"},
{PNL_NO_HEADER, "HIDE_HEADER", 0, "Hide Header",
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index fd7346379a1..5e36250497c 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -50,7 +50,7 @@
#define DEF_ICON_BLANK_SKIP
#define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""},
#define DEF_VICO(name) {VICO_##name, (#name), 0, (#name), ""},
-EnumPropertyItem rna_enum_icon_items[] = {
+const EnumPropertyItem rna_enum_icon_items[] = {
#include "UI_icons.h"
{0, NULL, 0, NULL, NULL}
};
@@ -285,7 +285,7 @@ static int rna_ui_get_rnaptr_icon(bContext *C, PointerRNA *ptr_icon)
static const char *rna_ui_get_enum_name(bContext *C, PointerRNA *ptr, const char *propname, const char *identifier)
{
PropertyRNA *prop = NULL;
- EnumPropertyItem *items = NULL, *item;
+ const EnumPropertyItem *items = NULL, *item;
bool free;
const char *name = "";
@@ -305,7 +305,7 @@ static const char *rna_ui_get_enum_name(bContext *C, PointerRNA *ptr, const char
}
}
if (free) {
- MEM_freeN(items);
+ MEM_freeN((void *)items);
}
}
@@ -316,7 +316,7 @@ static const char *rna_ui_get_enum_description(bContext *C, PointerRNA *ptr, con
const char *identifier)
{
PropertyRNA *prop = NULL;
- EnumPropertyItem *items = NULL, *item;
+ const EnumPropertyItem *items = NULL, *item;
bool free;
const char *desc = "";
@@ -336,7 +336,7 @@ static const char *rna_ui_get_enum_description(bContext *C, PointerRNA *ptr, con
}
}
if (free) {
- MEM_freeN(items);
+ MEM_freeN((void *)items);
}
}
@@ -346,7 +346,7 @@ static const char *rna_ui_get_enum_description(bContext *C, PointerRNA *ptr, con
static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propname, const char *identifier)
{
PropertyRNA *prop = NULL;
- EnumPropertyItem *items = NULL, *item;
+ const EnumPropertyItem *items = NULL, *item;
bool free;
int icon = ICON_NONE;
@@ -366,7 +366,7 @@ static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propna
}
}
if (free) {
- MEM_freeN(items);
+ MEM_freeN((void *)items);
}
}
@@ -421,7 +421,7 @@ void RNA_api_ui_layout(StructRNA *srna)
FunctionRNA *func;
PropertyRNA *parm;
- static EnumPropertyItem curve_type_items[] = {
+ static const EnumPropertyItem curve_type_items[] = {
{0, "NONE", 0, "None", ""},
{'v', "VECTOR", 0, "Vector", ""},
{'c', "COLOR", 0, "Color", ""},
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index d5f488d549e..7a10c5145f4 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -53,7 +53,7 @@
#include "GPU_buffers.h"
#ifdef WITH_OPENSUBDIV
-static EnumPropertyItem opensubdiv_compute_type_items[] = {
+static const EnumPropertyItem opensubdiv_compute_type_items[] = {
{USER_OPENSUBDIV_COMPUTE_NONE, "NONE", 0, "None", ""},
{USER_OPENSUBDIV_COMPUTE_CPU, "CPU", 0, "CPU", ""},
{USER_OPENSUBDIV_COMPUTE_OPENMP, "OPENMP", 0, "OpenMP", ""},
@@ -65,19 +65,19 @@ static EnumPropertyItem opensubdiv_compute_type_items[] = {
};
#endif
-static EnumPropertyItem audio_device_items[] = {
+static const EnumPropertyItem audio_device_items[] = {
{0, "Null", 0, "None", "Null device - there will be no audio output"},
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_navigation_mode_items[] = {
+const EnumPropertyItem rna_enum_navigation_mode_items[] = {
{VIEW_NAVIGATION_WALK, "WALK", 0, "Walk", "Interactively walk or free navigate around the scene"},
{VIEW_NAVIGATION_FLY, "FLY", 0, "Fly", "Use fly dynamics to navigate the scene"},
{0, NULL, 0, NULL, NULL}
};
#if defined(WITH_INTERNATIONAL) || !defined(RNA_RUNTIME)
-static EnumPropertyItem rna_enum_language_default_items[] = {
+static const EnumPropertyItem rna_enum_language_default_items[] = {
{0, "DEFAULT", 0, "Default (Default)", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -456,7 +456,7 @@ static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr)
#ifdef WITH_OPENSUBDIV
-static EnumPropertyItem *rna_userdef_opensubdiv_compute_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_userdef_opensubdiv_compute_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
EnumPropertyItem *item = NULL;
@@ -503,7 +503,7 @@ static void rna_userdef_opensubdiv_update(Main *bmain, Scene *UNUSED(scene), Poi
#endif
-static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
int index = 0;
@@ -529,10 +529,10 @@ static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi
}
#ifdef WITH_INTERNATIONAL
-static EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
+static const EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
{
- EnumPropertyItem *items = BLT_lang_RNA_enum_properties();
+ const EnumPropertyItem *items = BLT_lang_RNA_enum_properties();
if (items == NULL) {
items = rna_enum_language_default_items;
}
@@ -643,7 +643,7 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem font_kerning_style[] = {
+ static const EnumPropertyItem font_kerning_style[] = {
{0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances"},
{1, "FITTED", 0, "Fitted", "Use scaled and grid-fitted kerning distances"},
{0, NULL, 0, NULL, NULL}
@@ -2947,7 +2947,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem active_theme_area[] = {
+ static const EnumPropertyItem active_theme_area[] = {
{0, "USER_INTERFACE", ICON_UI, "User Interface", ""},
{19, "STYLE", ICON_FONTPREVIEW, "Text Style", ""},
{18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""},
@@ -3279,7 +3279,7 @@ static void rna_def_userdef_walk_navigation(BlenderRNA *brna)
static void rna_def_userdef_view(BlenderRNA *brna)
{
- static EnumPropertyItem timecode_styles[] = {
+ static const EnumPropertyItem timecode_styles[] = {
{USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info",
"Most compact representation, uses '+' as separator for sub-second frame numbers, "
"with left and right truncation of the timecode as necessary"},
@@ -3295,14 +3295,14 @@ static void rna_def_userdef_view(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem zoom_frame_modes[] = {
+ static const EnumPropertyItem zoom_frame_modes[] = {
{ZOOM_FRAME_MODE_KEEP_RANGE, "KEEP_RANGE", 0, "Keep Range", ""},
{ZOOM_FRAME_MODE_SECONDS, "SECONDS", 0, "Seconds", ""},
{ZOOM_FRAME_MODE_KEYFRAMES, "KEYFRAMES", 0, "Keyframes", ""},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem line_width[] = {
+ static const EnumPropertyItem line_width[] = {
{-1, "THIN", 0, "Thin", "Thinner lines than the default"},
{ 0, "AUTO", 0, "Auto", "Automatic line width based on UI scale"},
{ 1, "THICK", 0, "Thick", "Thicker lines than the default"},
@@ -3575,7 +3575,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
- static EnumPropertyItem auto_key_modes[] = {
+ static const EnumPropertyItem auto_key_modes[] = {
{AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
{0, NULL, 0, NULL, NULL}
@@ -3805,7 +3805,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
- static EnumPropertyItem gl_texture_clamp_items[] = {
+ static const EnumPropertyItem gl_texture_clamp_items[] = {
{0, "CLAMP_OFF", 0, "Off", ""},
{8192, "CLAMP_8192", 0, "8192", ""},
{4096, "CLAMP_4096", 0, "4096", ""},
@@ -3817,7 +3817,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem anisotropic_items[] = {
+ static const EnumPropertyItem anisotropic_items[] = {
{1, "FILTER_0", 0, "Off", ""},
{2, "FILTER_2", 0, "2x", ""},
{4, "FILTER_4", 0, "4x", ""},
@@ -3826,7 +3826,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem audio_mixing_samples_items[] = {
+ static const EnumPropertyItem audio_mixing_samples_items[] = {
{256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"},
{512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
{1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"},
@@ -3838,7 +3838,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem audio_rate_items[] = {
+ static const EnumPropertyItem audio_rate_items[] = {
/* {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second"}, */
/* {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second"}, */
/* {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"}, */
@@ -3852,7 +3852,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem audio_format_items[] = {
+ static const EnumPropertyItem audio_format_items[] = {
{0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer"},
{0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer"},
{0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer"},
@@ -3862,7 +3862,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem audio_channel_items[] = {
+ static const EnumPropertyItem audio_channel_items[] = {
{1, "MONO", 0, "Mono", "Set audio channels to mono"},
{2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
{4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
@@ -3871,7 +3871,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem draw_method_items[] = {
+ static const EnumPropertyItem draw_method_items[] = {
{USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically set based on graphics card and driver"},
{USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer",
"Use a third buffer for minimal redraws at the cost of more memory"},
@@ -3885,7 +3885,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem color_picker_types[] = {
+ static const EnumPropertyItem color_picker_types[] = {
{USER_CP_CIRCLE_HSV, "CIRCLE_HSV", 0, "Circle (HSV)", "A circular Hue/Saturation color wheel, with Value slider"},
{USER_CP_CIRCLE_HSL, "CIRCLE_HSL", 0, "Circle (HSL)", "A circular Hue/Saturation color wheel, with Lightness slider"},
{USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"},
@@ -3894,7 +3894,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem multi_sample_levels[] = {
+ static const EnumPropertyItem multi_sample_levels[] = {
{USER_MULTISAMPLE_NONE, "NONE", 0, "No MultiSample", "Do not use OpenGL MultiSample"},
{USER_MULTISAMPLE_2, "2", 0, "MultiSample: 2", "Use 2x OpenGL MultiSample (requires restart)"},
{USER_MULTISAMPLE_4, "4", 0, "MultiSample: 4", "Use 4x OpenGL MultiSample (requires restart)"},
@@ -3903,14 +3903,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem image_draw_methods[] = {
+ static const EnumPropertyItem image_draw_methods[] = {
{IMAGE_DRAW_METHOD_2DTEXTURE, "2DTEXTURE", 0, "2D Texture", "Use CPU for display transform and draw image with 2D texture"},
{IMAGE_DRAW_METHOD_GLSL, "GLSL", 0, "GLSL", "Use GLSL shaders for display transform and draw image with 2D texture"},
{IMAGE_DRAW_METHOD_DRAWPIXELS, "DRAWPIXELS", 0, "DrawPixels", "Use CPU for display transform and draw image using DrawPixels"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem gpu_select_method_items[] = {
+ static const EnumPropertyItem gpu_select_method_items[] = {
{USER_SELECT_AUTO, "AUTO", 0, "Automatic", ""},
{USER_SELECT_USE_SELECT_RENDERMODE, "GL_SELECT", 0, "OpenGL Select", ""},
{USER_SELECT_USE_OCCLUSION_QUERY, "GL_QUERY", 0, "OpenGL Occlusion Queries", ""},
@@ -4210,33 +4210,33 @@ static void rna_def_userdef_input(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
- static EnumPropertyItem select_mouse_items[] = {
+ static const EnumPropertyItem select_mouse_items[] = {
{USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection"},
{0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem view_rotation_items[] = {
+ static const EnumPropertyItem view_rotation_items[] = {
{0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"},
{USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"},
{0, NULL, 0, NULL, NULL}
};
#ifdef WITH_INPUT_NDOF
- static EnumPropertyItem ndof_view_navigation_items[] = {
+ static const EnumPropertyItem ndof_view_navigation_items[] = {
{0, "FREE", 0, "Free", "Use full 6 degrees of freedom by default"},
{NDOF_MODE_ORBIT, "ORBIT", 0, "Orbit", "Orbit about the view center by default"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem ndof_view_rotation_items[] = {
+ static const EnumPropertyItem ndof_view_rotation_items[] = {
{NDOF_TURNTABLE, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"},
{0, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"},
{0, NULL, 0, NULL, NULL}
};
#endif /* WITH_INPUT_NDOF */
- static EnumPropertyItem view_zoom_styles[] = {
+ static const EnumPropertyItem view_zoom_styles[] = {
{USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"},
{USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zoom in and out based on vertical mouse movement"},
{USER_ZOOM_SCALE, "SCALE", 0, "Scale",
@@ -4244,7 +4244,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem view_zoom_axes[] = {
+ static const EnumPropertyItem view_zoom_axes[] = {
{0, "VERTICAL", 0, "Vertical", "Zoom in and out based on vertical mouse movement"},
{USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zoom in and out based on horizontal mouse movement"},
{0, NULL, 0, NULL, NULL}
@@ -4445,7 +4445,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
- static EnumPropertyItem anim_player_presets[] = {
+ static const EnumPropertyItem anim_player_presets[] = {
{0, "INTERNAL", 0, "Internal", "Built-in animation player"},
{2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"},
{3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"},
@@ -4640,7 +4640,7 @@ void RNA_def_userdef(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem user_pref_sections[] = {
+ static const EnumPropertyItem user_pref_sections[] = {
{USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
{USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
{USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 689a6406375..31393d0923d 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -45,7 +45,7 @@
#include "WM_types.h"
#ifdef RNA_RUNTIME
-static EnumPropertyItem event_keymouse_value_items[] = {
+static const EnumPropertyItem event_keymouse_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_PRESS, "PRESS", 0, "Press", ""},
{KM_RELEASE, "RELEASE", 0, "Release", ""},
@@ -54,7 +54,7 @@ static EnumPropertyItem event_keymouse_value_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem event_tweak_value_items[] = {
+static const EnumPropertyItem event_tweak_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{EVT_GESTURE_N, "NORTH", 0, "North", ""},
{EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
@@ -67,7 +67,7 @@ static EnumPropertyItem event_tweak_value_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem event_tweak_type_items[] = {
+static const 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", ""},
@@ -76,7 +76,7 @@ static EnumPropertyItem event_tweak_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem event_mouse_type_items[] = {
+static const EnumPropertyItem event_mouse_type_items[] = {
{LEFTMOUSE, "LEFTMOUSE", 0, "Left", ""},
{MIDDLEMOUSE, "MIDDLEMOUSE", 0, "Middle", ""},
{RIGHTMOUSE, "RIGHTMOUSE", 0, "Right", ""},
@@ -102,7 +102,7 @@ static EnumPropertyItem event_mouse_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem event_timer_type_items[] = {
+static const EnumPropertyItem event_timer_type_items[] = {
{TIMER, "TIMER", 0, "Timer", ""},
{TIMER0, "TIMER0", 0, "Timer 0", ""},
{TIMER1, "TIMER1", 0, "Timer 1", ""},
@@ -114,12 +114,12 @@ static EnumPropertyItem event_timer_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem event_textinput_type_items[] = {
+static const EnumPropertyItem event_textinput_type_items[] = {
{KM_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem event_ndof_type_items[] = {
+static const EnumPropertyItem event_ndof_type_items[] = {
{NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""},
/* buttons on all 3dconnexion devices */
{NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""},
@@ -171,7 +171,7 @@ static EnumPropertyItem event_ndof_type_items[] = {
#endif /* RNA_RUNTIME */
/* not returned: CAPSLOCKKEY, UNKNOWNKEY */
-EnumPropertyItem rna_enum_event_type_items[] = {
+const EnumPropertyItem rna_enum_event_type_items[] = {
/* Note we abuse 'tooltip' message here to store a 'compact' form of some (too) long names. */
{0, "NONE", 0, "", ""},
{LEFTMOUSE, "LEFTMOUSE", 0, "Left Mouse", "LMB"},
@@ -382,7 +382,7 @@ EnumPropertyItem rna_enum_event_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_event_value_items[] = {
+const EnumPropertyItem rna_enum_event_value_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{KM_NOTHING, "NOTHING", 0, "Nothing", ""},
{KM_PRESS, "PRESS", 0, "Press", ""},
@@ -400,13 +400,13 @@ EnumPropertyItem rna_enum_event_value_items[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem rna_enum_keymap_propvalue_items[] = {
+const EnumPropertyItem rna_enum_keymap_propvalue_items[] = {
{0, "NONE", 0, "", ""},
{0, NULL, 0, NULL, NULL}
};
#if 0
-static EnumPropertyItem keymap_modifiers_items[] = {
+static const EnumPropertyItem keymap_modifiers_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},
{0, "NONE", 0, "None", ""},
{1, "FIRST", 0, "First", ""},
@@ -417,7 +417,7 @@ static EnumPropertyItem keymap_modifiers_items[] = {
#ifndef RNA_RUNTIME
-static EnumPropertyItem operator_flag_items[] = {
+static const 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_UNDO_GROUPED, "UNDO_GROUPED", 0, "Grouped Undo", "Push a single undo event for repetead instances of this operator"},
@@ -432,7 +432,7 @@ static EnumPropertyItem operator_flag_items[] = {
};
#endif
-EnumPropertyItem rna_enum_operator_return_items[] = {
+const EnumPropertyItem rna_enum_operator_return_items[] = {
{OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
{OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"},
{OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"},
@@ -443,7 +443,7 @@ EnumPropertyItem rna_enum_operator_return_items[] = {
};
/* flag/enum */
-EnumPropertyItem rna_enum_wm_report_items[] = {
+const EnumPropertyItem rna_enum_wm_report_items[] = {
{RPT_DEBUG, "DEBUG", 0, "Debug", ""},
{RPT_INFO, "INFO", 0, "Info", ""},
{RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
@@ -824,7 +824,7 @@ static void rna_wmKeyMapItem_keymodifier_set(PointerRNA *ptr, int value)
}
-static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
int map_type = rna_wmKeyMapItem_map_type_get(ptr);
@@ -837,7 +837,7 @@ static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerR
else return rna_enum_event_type_items;
}
-static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
int map_type = rna_wmKeyMapItem_map_type_get(ptr);
@@ -850,7 +850,7 @@ static EnumPropertyItem *rna_KeyMapItem_value_itemf(bContext *UNUSED(C), Pointer
return rna_enum_event_value_items;
}
-static EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop),
+static const EnumPropertyItem *rna_KeyMapItem_propvalue_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop),
bool *UNUSED(r_free))
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -2147,7 +2147,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem map_type_items[] = {
+ static const EnumPropertyItem map_type_items[] = {
{KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
{KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""},
{KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""},
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index b9f0ae22fd2..188b63d7d24 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -46,7 +46,7 @@
#include "rna_internal.h" /* own include */
/* confusingm 2 enums mixed up here */
-EnumPropertyItem rna_enum_window_cursor_items[] = {
+const EnumPropertyItem rna_enum_window_cursor_items[] = {
{CURSOR_STD, "DEFAULT", 0, "Default", ""},
{CURSOR_NONE, "NONE", 0, "None", ""},
{CURSOR_WAIT, "WAIT", 0, "Wait", ""},
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 8e3e5b67a76..6c6cf24c67e 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -130,7 +130,7 @@ static void rna_def_world_mtex(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem texco_items[] = {
+ static const EnumPropertyItem texco_items[] = {
{TEXCO_VIEW, "VIEW", 0, "View", "Use view vector for the texture coordinates"},
{TEXCO_GLOB, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates (interior mist)"},
{TEXCO_ANGMAP, "ANGMAP", 0, "AngMap", "Use 360 degree angular coordinates, e.g. for spherical light probes"},
@@ -210,27 +210,27 @@ static void rna_def_lighting(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem blend_mode_items[] = {
+ static const EnumPropertyItem blend_mode_items[] = {
{WO_AOMUL, "MULTIPLY", 0, "Multiply", "Multiply direct lighting with ambient occlusion, darkening the result"},
{WO_AOADD, "ADD", 0, "Add", "Add light and shadow"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_color_items[] = {
+ static const EnumPropertyItem prop_color_items[] = {
{WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"},
{WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy"},
{WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_sample_method_items[] = {
+ static const EnumPropertyItem prop_sample_method_items[] = {
{WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", "Fastest and gives the most noise"},
{WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas"},
{WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality"},
{0, NULL, 0, NULL, NULL}
};
- static EnumPropertyItem prop_gather_method_items[] = {
+ static const EnumPropertyItem prop_gather_method_items[] = {
{WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required"},
{WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise"},
{0, NULL, 0, NULL, NULL}
@@ -391,7 +391,7 @@ static void rna_def_world_mist(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem falloff_items[] = {
+ static const EnumPropertyItem falloff_items[] = {
{0, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"},
{1, "LINEAR", 0, "Linear", "Use linear progression"},
{2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index b84fe84c2b6..daef323058c 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -60,7 +60,7 @@ enum {
extern BPy_StructRNA *bpy_context_module;
-static EnumPropertyItem property_flag_items[] = {
+static const EnumPropertyItem property_flag_items[] = {
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
@@ -74,7 +74,7 @@ static EnumPropertyItem property_flag_items[] = {
"'TEXTEDIT_UPDATE'].\n" \
" :type options: set\n" \
-static EnumPropertyItem property_flag_enum_items[] = {
+static const EnumPropertyItem property_flag_enum_items[] = {
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
{PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animatable", ""},
@@ -90,7 +90,7 @@ static EnumPropertyItem property_flag_enum_items[] = {
/* XXX Keep in sync with rna_rna.c's rna_enum_property_subtype_items ???
* Currently it is not...
*/
-static EnumPropertyItem property_subtype_string_items[] = {
+static const EnumPropertyItem property_subtype_string_items[] = {
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
{PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
{PROP_FILENAME, "FILE_NAME", 0, "Filename", ""},
@@ -104,7 +104,7 @@ static EnumPropertyItem property_subtype_string_items[] = {
" :arg subtype: Enumerator in ['FILE_PATH', 'DIR_PATH', 'FILE_NAME', 'BYTE_STRING', 'PASSWORD', 'NONE'].\n" \
" :type subtype: string\n" \
-static EnumPropertyItem property_subtype_number_items[] = {
+static const EnumPropertyItem property_subtype_number_items[] = {
{PROP_PIXEL, "PIXEL", 0, "Pixel", ""},
{PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""},
{PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
@@ -120,7 +120,7 @@ static EnumPropertyItem property_subtype_number_items[] = {
" :arg subtype: Enumerator in ['PIXEL', 'UNSIGNED', 'PERCENTAGE', 'FACTOR', 'ANGLE', 'TIME', 'DISTANCE', 'NONE'].\n" \
" :type subtype: string\n" \
-static EnumPropertyItem property_subtype_array_items[] = {
+static const EnumPropertyItem property_subtype_array_items[] = {
{PROP_COLOR, "COLOR", 0, "Color", ""},
{PROP_TRANSLATION, "TRANSLATION", 0, "Translation", ""},
{PROP_DIRECTION, "DIRECTION", 0, "Direction", ""},
@@ -1335,7 +1335,7 @@ static size_t strswapbufcpy(char *buf, const char **orig)
static int icon_id_from_name(const char *name)
{
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int id;
if (name[0]) {
@@ -1349,7 +1349,7 @@ static int icon_id_from_name(const char *name)
return 0;
}
-static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, int *defvalue, const bool is_enum_flag)
+static const EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, int *defvalue, const bool is_enum_flag)
{
EnumPropertyItem *items;
PyObject *item;
@@ -1505,7 +1505,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
return items;
}
-static EnumPropertyItem *bpy_prop_enum_itemf_cb(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
+static const EnumPropertyItem *bpy_prop_enum_itemf_cb(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
{
PyGILState_STATE gilstate;
@@ -1514,7 +1514,7 @@ static EnumPropertyItem *bpy_prop_enum_itemf_cb(struct bContext *C, PointerRNA *
PyObject *args;
PyObject *items; /* returned from the function call */
- EnumPropertyItem *eitems = NULL;
+ const EnumPropertyItem *eitems = NULL;
int err = 0;
if (C) {
@@ -2748,7 +2748,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
int id_len;
int defvalue = 0;
PyObject *items, *items_fast;
- EnumPropertyItem *eitems;
+ const EnumPropertyItem *eitems;
PropertyRNA *prop;
PyObject *pyopts = NULL;
int opts = 0;
@@ -2841,7 +2841,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
* otherwise if this is a generator it may free the strings before we copy them */
Py_DECREF(items_fast);
- MEM_freeN(eitems);
+ MEM_freeN((void *)eitems);
}
}
Py_RETURN_NONE;
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 02cb5233166..9630beb6e8b 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -758,7 +758,7 @@ thick_wrap_slice:
/* same as RNA_enum_value_from_id but raises an exception */
int pyrna_enum_value_from_id(
- EnumPropertyItem *item, const char *identifier, int *r_value,
+ const EnumPropertyItem *item, const char *identifier, int *r_value,
const char *error_prefix)
{
if (RNA_enum_value_from_id(item, identifier, r_value) == 0) {
@@ -1167,7 +1167,7 @@ static void pyrna_prop_array_dealloc(BPy_PropertyRNA *self)
static const char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop)
{
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
const char *result;
bool free = false;
@@ -1179,8 +1179,9 @@ static const char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop)
result = "";
}
- if (free)
- MEM_freeN(item);
+ if (free) {
+ MEM_freeN((void *)item);
+ }
return result;
}
@@ -1221,7 +1222,7 @@ static int pyrna_string_to_enum(
* needed when we want to use the full range of a signed short/char.
*/
BLI_bitmap *pyrna_set_to_enum_bitmap(
- EnumPropertyItem *items, PyObject *value,
+ const EnumPropertyItem *items, PyObject *value,
int type_size, bool type_convert_sign,
int bitmap_size,
const char *error_prefix)
@@ -1277,7 +1278,7 @@ error:
/* 'value' _must_ be a set type, error check before calling */
int pyrna_set_to_enum_bitfield(
- EnumPropertyItem *items, PyObject *value, int *r_value,
+ const EnumPropertyItem *items, PyObject *value, int *r_value,
const char *error_prefix)
{
/* set of enum items, concatenate all values with OR */
@@ -1315,7 +1316,7 @@ static int pyrna_prop_to_enum_bitfield(
PointerRNA *ptr, PropertyRNA *prop, PyObject *value, int *r_value,
const char *error_prefix)
{
- EnumPropertyItem *item;
+ const EnumPropertyItem *item;
int ret;
bool free = false;
@@ -1346,13 +1347,14 @@ static int pyrna_prop_to_enum_bitfield(
}
}
- if (free)
- MEM_freeN(item);
+ if (free) {
+ MEM_freeN((void *)item);
+ }
return ret;
}
-PyObject *pyrna_enum_bitfield_to_py(EnumPropertyItem *items, int value)
+PyObject *pyrna_enum_bitfield_to_py(const EnumPropertyItem *items, int value)
{
PyObject *ret = PySet_New(NULL);
const char *identifier[RNA_ENUM_BITFLAG_SIZE + 1];
@@ -1396,7 +1398,7 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val)
ret = PyUnicode_FromString(identifier);
}
else {
- EnumPropertyItem *enum_item;
+ const EnumPropertyItem *enum_item;
bool free;
/* don't throw error here, can't trust blender 100% to give the
@@ -1407,7 +1409,7 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val)
}
else {
if (free) {
- MEM_freeN(enum_item);
+ MEM_freeN((void *)enum_item);
}
RNA_property_enum_items(NULL, ptr, prop, &enum_item, NULL, &free);
@@ -1439,8 +1441,9 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val)
ret = PyUnicode_FromString("");
}
- if (free)
- MEM_freeN(enum_item);
+ if (free) {
+ MEM_freeN((void *)enum_item);
+ }
#if 0
PyErr_Format(PyExc_AttributeError,
"RNA Error: Current value \"%d\" matches no enum", val);
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index 605f79b1ad8..f666294666e 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -186,14 +186,17 @@ int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, const bool all_args, co
PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop);
unsigned int *pyrna_set_to_enum_bitmap(
- struct EnumPropertyItem *items, PyObject *value,
+ const struct EnumPropertyItem *items, PyObject *value,
int type_size, bool type_convert_sign,
int bitmap_size,
const char *error_prefix);
-PyObject *pyrna_enum_bitfield_to_py(struct EnumPropertyItem *items, int value);
-int pyrna_set_to_enum_bitfield(EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix);
+PyObject *pyrna_enum_bitfield_to_py(
+ const struct EnumPropertyItem *items, int value);
+int pyrna_set_to_enum_bitfield(
+ const struct EnumPropertyItem *items, PyObject *value, int *r_value, const char *error_prefix);
-int pyrna_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix);
+int pyrna_enum_value_from_id(
+ const EnumPropertyItem *item, const char *identifier, int *value, const char *error_prefix);
int pyrna_deferred_register_class(struct StructRNA *srna, PyTypeObject *py_class);
diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c
index df1c4155a6d..fe3565fc44e 100644
--- a/source/blender/python/intern/bpy_rna_callback.c
+++ b/source/blender/python/intern/bpy_rna_callback.c
@@ -53,7 +53,7 @@
#define RNA_CAPSULE_ID "RNA_HANDLE"
#define RNA_CAPSULE_ID_INVALID "RNA_HANDLE_REMOVED"
-static EnumPropertyItem region_draw_mode_items[] = {
+static const EnumPropertyItem region_draw_mode_items[] = {
{REGION_DRAW_POST_PIXEL, "POST_PIXEL", 0, "Post Pixel", ""},
{REGION_DRAW_POST_VIEW, "POST_VIEW", 0, "Post View", ""},
{REGION_DRAW_PRE_VIEW, "PRE_VIEW", 0, "Pre View", ""},
diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c
index 2b8ad6ccb90..c15ff50df04 100644
--- a/source/blender/python/intern/bpy_util.c
+++ b/source/blender/python/intern/bpy_util.c
@@ -47,10 +47,10 @@ static bContext *__py_context = NULL;
bContext *BPy_GetContext(void) { return __py_context; }
void BPy_SetContext(bContext *C) { __py_context = C; }
-char *BPy_enum_as_string(EnumPropertyItem *item)
+char *BPy_enum_as_string(const EnumPropertyItem *item)
{
DynStr *dynstr = BLI_dynstr_new();
- EnumPropertyItem *e;
+ const EnumPropertyItem *e;
char *cstring;
for (e = item; item->identifier; item++) {
diff --git a/source/blender/python/intern/bpy_util.h b/source/blender/python/intern/bpy_util.h
index 6000bf94aef..466941359a8 100644
--- a/source/blender/python/intern/bpy_util.h
+++ b/source/blender/python/intern/bpy_util.h
@@ -34,7 +34,7 @@
struct EnumPropertyItem;
struct ReportList;
-char *BPy_enum_as_string(struct EnumPropertyItem *item);
+char *BPy_enum_as_string(const struct EnumPropertyItem *item);
#define BLANK_PYTHON_TYPE {PyVarObject_HEAD_INIT(NULL, 0) NULL}
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index a6413369a8f..4f96e40d9ff 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -90,7 +90,7 @@ char *WM_modalkeymap_operator_items_to_string_buf(
struct wmOperatorType *ot, const int propvalue, const bool compact,
const int max_len, int *r_available_len, char **r_str);
-wmKeyMap *WM_modalkeymap_add(struct wmKeyConfig *keyconf, const char *idname, struct EnumPropertyItem *items);
+wmKeyMap *WM_modalkeymap_add(struct wmKeyConfig *keyconf, const char *idname, const struct EnumPropertyItem *items);
wmKeyMap *WM_modalkeymap_get(struct wmKeyConfig *keyconf, const char *idname);
wmKeyMapItem *WM_modalkeymap_add_item(struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, int value);
wmKeyMapItem *WM_modalkeymap_add_item_str(struct wmKeyMap *km, int type, int val, int modifier, int keymodifier, const char *value);
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index db5fc23146f..8dab50a6f29 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -785,7 +785,7 @@ wmKeyMap *WM_keymap_find_all(const bContext *C, const char *idname, int spaceid,
/* modal maps get linked to a running operator, and filter the keys before sending to modal() callback */
-wmKeyMap *WM_modalkeymap_add(wmKeyConfig *keyconf, const char *idname, EnumPropertyItem *items)
+wmKeyMap *WM_modalkeymap_add(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
{
wmKeyMap *km = WM_keymap_find(keyconf, idname, 0, 0);
km->flag |= KEYMAP_MODAL;
@@ -919,7 +919,7 @@ static void wm_user_modal_keymap_set_items(wmWindowManager *wm, wmKeyMap *km)
const char *WM_key_event_string(const short type, const bool compact)
{
- EnumPropertyItem *it;
+ const EnumPropertyItem *it;
const int i = RNA_enum_from_value(rna_enum_event_type_items, (int)type);
if (i == -1) {
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index 4873a6bbf81..72e4ff1d83a 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -49,7 +49,7 @@ void WM_operator_properties_filesel(
{
PropertyRNA *prop;
- static EnumPropertyItem file_display_items[] = {
+ static const EnumPropertyItem file_display_items[] = {
{FILE_DEFAULTDISPLAY, "DEFAULT", 0, "Default", "Automatically determine display type for files"},
{FILE_SHORTDISPLAY, "LIST_SHORT", ICON_SHORTDISPLAY, "Short List", "Display files as short list"},
{FILE_LONGDISPLAY, "LIST_LONG", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"},
@@ -135,7 +135,7 @@ static void wm_operator_properties_select_action_ex(wmOperatorType *ot, int defa
void WM_operator_properties_select_action(wmOperatorType *ot, int default_action)
{
- static EnumPropertyItem select_actions[] = {
+ static const EnumPropertyItem select_actions[] = {
{SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"},
{SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
{SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
@@ -151,7 +151,7 @@ void WM_operator_properties_select_action(wmOperatorType *ot, int default_action
*/
void WM_operator_properties_select_action_simple(wmOperatorType *ot, int default_action)
{
- static EnumPropertyItem select_actions[] = {
+ static const EnumPropertyItem select_actions[] = {
{SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
{SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index a5b64c05156..970b6ebf51d 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3173,7 +3173,7 @@ enum {
eRTUndo = 6,
};
-static EnumPropertyItem redraw_timer_type_items[] = {
+static const EnumPropertyItem redraw_timer_type_items[] = {
{eRTDrawRegion, "DRAW", 0, "Draw Region", "Draw Region"},
{eRTDrawRegionSwap, "DRAW_SWAP", 0, "Draw Region + Swap", "Draw Region and Swap"},
{eRTDrawWindow, "DRAW_WIN", 0, "Draw Window", "Draw Window"},
@@ -3420,7 +3420,7 @@ static void WM_OT_previews_ensure(wmOperatorType *ot)
/* *************************** Datablocks previews clear ************* */
/* Only types supporting previews currently. */
-static EnumPropertyItem preview_id_type_items[] = {
+static const EnumPropertyItem preview_id_type_items[] = {
{FILTER_ID_SCE, "SCENE", 0, "Scenes", ""},
{FILTER_ID_GR, "GROUP", 0, "Groups", ""},
{FILTER_ID_OB, "OBJECT", 0, "Objects", ""},
@@ -3625,7 +3625,7 @@ void wm_operatortype_init(void)
/* circleselect-like modal operators */
static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{GESTURE_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
{GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, "Add", ""},
@@ -3687,7 +3687,7 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
/* straight line modal operators */
static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""},
{GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""},
@@ -3718,7 +3718,7 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
/* borderselect-like modal operators */
static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""},
{GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""},
@@ -3784,7 +3784,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
/* zoom to border modal operators */
static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf)
{
- static EnumPropertyItem modal_items[] = {
+ static const EnumPropertyItem modal_items[] = {
{GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
{GESTURE_MODAL_IN, "IN", 0, "In", ""},
{GESTURE_MODAL_OUT, "OUT", 0, "Out", ""},
@@ -3934,7 +3934,7 @@ void wm_window_keymap(wmKeyConfig *keyconf)
}
/* Generic itemf's for operators that take library args */
-static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), bool *r_free, ID *id, bool local)
+static const EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), bool *r_free, ID *id, bool local)
{
EnumPropertyItem item_tmp = {0}, *item = NULL;
int totitem = 0;
@@ -3955,58 +3955,58 @@ static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(pt
}
/* can add more as needed */
-EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, false);
}
#if 0 /* UNUSED */
-EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, true);
}
#endif
-EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, false);
}
-EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, true);
}
-EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, false);
}
-EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, true);
}
-EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, false);
}
-EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, true);
}
-EnumPropertyItem *RNA_movieclip_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_movieclip_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclip.first : NULL, false);
}
-EnumPropertyItem *RNA_movieclip_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_movieclip_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclip.first : NULL, true);
}
-EnumPropertyItem *RNA_mask_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_mask_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->mask.first : NULL, false);
}
-EnumPropertyItem *RNA_mask_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
+const EnumPropertyItem *RNA_mask_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
{
return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->mask.first : NULL, true);
}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 0d2f68ca4ac..2ad90537cde 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -880,7 +880,7 @@ int wm_window_new_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(even
}
}
-struct EnumPropertyItem *wm_window_new_screen_itemf(
+const EnumPropertyItem *wm_window_new_screen_itemf(
bContext *C, struct PointerRNA *UNUSED(ptr), struct PropertyRNA *UNUSED(prop), bool *r_free)
{
wmWindow *win = CTX_wm_window(C);
diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h
index c8f89a5bf62..0264955a4c5 100644
--- a/source/blender/windowmanager/wm_window.h
+++ b/source/blender/windowmanager/wm_window.h
@@ -82,7 +82,8 @@ void wm_window_IME_end (wmWindow *win);
int wm_window_close_exec(bContext *C, struct wmOperator *op);
int wm_window_fullscreen_toggle_exec(bContext *C, struct wmOperator *op);
-struct EnumPropertyItem *wm_window_new_screen_itemf(bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
+const struct EnumPropertyItem *wm_window_new_screen_itemf(
+ bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free);
int wm_window_new_exec(bContext *C, struct wmOperator *op);
int wm_window_new_invoke(bContext *C, struct wmOperator *op, const struct wmEvent *event);