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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/object/object_vgroup.c')
-rw-r--r--source/blender/editors/object/object_vgroup.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 386c63d4095..9d01ad6886c 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -668,7 +668,7 @@ static void vgroup_copy_active_to_sel(Object *ob, eVGroupSelect subset_type)
/***********************Start weight transfer (WT)*********************************/
-static EnumPropertyItem WT_vertex_group_select_item[] = {
+static const EnumPropertyItem WT_vertex_group_select_item[] = {
{WT_VGROUP_ACTIVE,
"ACTIVE", 0, "Active Group", "The active Vertex Group"},
{WT_VGROUP_BONE_SELECT,
@@ -680,7 +680,7 @@ static EnumPropertyItem WT_vertex_group_select_item[] = {
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
+const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
const bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free, const unsigned int selection_mask)
{
@@ -688,9 +688,10 @@ EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
EnumPropertyItem *item = NULL;
int totitem = 0;
-
- if (!C) /* needed for docs and i18n tools */
+ if (C == NULL) {
+ /* needed for docs and i18n tools */
return WT_vertex_group_select_item;
+ }
ob = CTX_data_active_object(C);
if (selection_mask & (1 << WT_VGROUP_ACTIVE))
@@ -712,13 +713,13 @@ EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
return item;
}
-static EnumPropertyItem *rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr,
+static const EnumPropertyItem *rna_vertex_group_with_single_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *prop, bool *r_free)
{
return ED_object_vgroup_selection_itemf_helper(C, ptr, prop, r_free, WT_VGROUP_MASK_ALL);
}
-static EnumPropertyItem *rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr,
+static const EnumPropertyItem *rna_vertex_group_select_itemf(bContext *C, PointerRNA *ptr,
PropertyRNA *prop, bool *r_free)
{
return ED_object_vgroup_selection_itemf_helper(C, ptr, prop, r_free, WT_VGROUP_MASK_ALL & ~(1 << WT_VGROUP_ACTIVE));
@@ -1628,7 +1629,7 @@ enum {
VGROUP_INVERT
};
-static EnumPropertyItem vgroup_lock_actions[] = {
+static const EnumPropertyItem vgroup_lock_actions[] = {
{VGROUP_TOGGLE, "TOGGLE", 0, "Toggle", "Unlock all vertex groups if there is at least one locked group, lock all in other case"},
{VGROUP_LOCK, "LOCK", 0, "Lock", "Lock all vertex groups"},
{VGROUP_UNLOCK, "UNLOCK", 0, "Unlock", "Unlock all vertex groups"},
@@ -3421,7 +3422,7 @@ static int set_active_group_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
+static const EnumPropertyItem *vgroup_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
{
Object *ob = ED_object_context(C);
EnumPropertyItem tmp = {0, "", 0, "", ""};
@@ -3640,7 +3641,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_sort(wmOperatorType *ot)
{
- static EnumPropertyItem vgroup_sort_type[] = {
+ static const EnumPropertyItem vgroup_sort_type[] = {
{SORT_TYPE_NAME, "NAME", 0, "Name", ""},
{SORT_TYPE_BONEHIERARCHY, "BONE_HIERARCHY", 0, "Bone Hierarchy", ""},
{0, NULL, 0, NULL, NULL}
@@ -3691,7 +3692,7 @@ static int vgroup_move_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_move(wmOperatorType *ot)
{
- static EnumPropertyItem vgroup_slot_move[] = {
+ static const EnumPropertyItem vgroup_slot_move[] = {
{-1, "UP", 0, "Up", ""},
{1, "DOWN", 0, "Down", ""},
{0, NULL, 0, NULL, NULL}