Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton 2017-10-18 17:09:41 +11:00
commit ec2bbc90e7
183 changed files with 1412 additions and 1371 deletions

View File

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

View File

@ -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;

View File

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

View File

@ -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;

View File

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

View File

@ -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}
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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;

View File

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

View File

@ -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}};

View File

@ -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")) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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)
{

View File

@ -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);

View File

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

View File

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

View File

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

View File

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

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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}};

View File

@ -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;

View File

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

View File

@ -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};

View File

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

View File

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

View File

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

View File

@ -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}};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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}};

View File

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

View File

@ -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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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;

View File

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

View File

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

View File

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

View File

@ -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;

View File

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

View File

@ -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);
}

View File

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

View File

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

View File

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

View File

@ -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;

View File

@ -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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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;

View File

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

View File

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

View File

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

View File

@ -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);
}

Some files were not shown because too many files have changed in this diff Show More