[Bf-blender-cvs] [7690872ce4b] master: Cleanup: quiet missing-declaration warnings
Campbell Barton
noreply at git.blender.org
Thu Jan 5 07:07:07 CET 2023
Commit: 7690872ce4bc322c0fc209bd9e1aba0cb8789290
Author: Campbell Barton
Date: Thu Jan 5 16:44:33 2023 +1100
Branches: master
https://developer.blender.org/rB7690872ce4bc322c0fc209bd9e1aba0cb8789290
Cleanup: quiet missing-declaration warnings
===================================================================
M source/blender/editors/uvedit/uvedit_unwrap_ops.c
M source/blender/makesrna/RNA_enum_items.h
M source/blender/makesrna/intern/rna_brush.c
M source/blender/makesrna/intern/rna_scene.c
M source/blender/makesrna/intern/rna_sculpt_paint.c
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 2dfc4d07d1f..18e920c55f4 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1098,7 +1098,7 @@ static int pack_islands_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-const EnumPropertyItem pack_margin_method[] = {
+static const EnumPropertyItem pack_margin_method_items[] = {
{ED_UVPACK_MARGIN_SCALED,
"SCALED",
0,
@@ -1139,8 +1139,12 @@ void UV_OT_pack_islands(wmOperatorType *ot)
/* properties */
RNA_def_enum(ot->srna, "udim_source", pack_target, PACK_UDIM_SRC_CLOSEST, "Pack to", "");
RNA_def_boolean(ot->srna, "rotate", true, "Rotate", "Rotate islands for best fit");
- RNA_def_enum(
- ot->srna, "margin_method", pack_margin_method, ED_UVPACK_MARGIN_SCALED, "Margin Method", "");
+ RNA_def_enum(ot->srna,
+ "margin_method",
+ pack_margin_method_items,
+ ED_UVPACK_MARGIN_SCALED,
+ "Margin Method",
+ "");
RNA_def_float_factor(
ot->srna, "margin", 0.001f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f);
}
@@ -2077,8 +2081,12 @@ void UV_OT_unwrap(wmOperatorType *ot)
0,
"Use Subdivision Surface",
"Map UVs taking vertex position after Subdivision Surface modifier has been applied");
- RNA_def_enum(
- ot->srna, "margin_method", pack_margin_method, ED_UVPACK_MARGIN_SCALED, "Margin Method", "");
+ RNA_def_enum(ot->srna,
+ "margin_method",
+ pack_margin_method_items,
+ ED_UVPACK_MARGIN_SCALED,
+ "Margin Method",
+ "");
RNA_def_float_factor(
ot->srna, "margin", 0.001f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f);
}
@@ -2444,8 +2452,12 @@ void UV_OT_smart_project(wmOperatorType *ot)
DEG2RADF(89.0f));
RNA_def_property_float_default(prop, DEG2RADF(66.0f));
- RNA_def_enum(
- ot->srna, "margin_method", pack_margin_method, ED_UVPACK_MARGIN_SCALED, "Margin Method", "");
+ RNA_def_enum(ot->srna,
+ "margin_method",
+ pack_margin_method_items,
+ ED_UVPACK_MARGIN_SCALED,
+ "Margin Method",
+ "");
RNA_def_float(ot->srna,
"island_margin",
0.0f,
diff --git a/source/blender/makesrna/RNA_enum_items.h b/source/blender/makesrna/RNA_enum_items.h
index 1604bd97ed4..bc4d9282af0 100644
--- a/source/blender/makesrna/RNA_enum_items.h
+++ b/source/blender/makesrna/RNA_enum_items.h
@@ -101,6 +101,7 @@ DEF_ENUM(rna_enum_operator_type_flag_items)
DEF_ENUM(rna_enum_operator_return_items)
DEF_ENUM(rna_enum_operator_property_tags)
+DEF_ENUM(rna_enum_brush_automasking_flag_items)
DEF_ENUM(rna_enum_brush_sculpt_tool_items)
DEF_ENUM(rna_enum_brush_uv_sculpt_tool_items)
DEF_ENUM(rna_enum_brush_vertex_tool_items)
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index ce51b52de39..db38c3d4af7 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -94,7 +94,7 @@ static const EnumPropertyItem rna_enum_brush_texture_slot_map_texture_mode_items
/* clang-format off */
/* Note: we don't actually turn these into a single enum bit-mask property,
* instead we construct individual boolean properties. */
-const EnumPropertyItem RNA_automasking_flags[] = {
+const EnumPropertyItem rna_enum_brush_automasking_flag_items[] = {
{BRUSH_AUTOMASKING_TOPOLOGY, "use_automasking_topology", 0,"Topology", "Affect only vertices connected to the active vertex under the brush"},
{BRUSH_AUTOMASKING_FACE_SETS, "use_automasking_face_sets", 0,"Face Sets", "Affect only vertices that share Face Sets with the active vertex"},
{BRUSH_AUTOMASKING_BOUNDARY_EDGES, "use_automasking_boundary_edges", 0,"Mesh Boundary Auto-Masking", "Do not affect non manifold boundary edges"},
@@ -3204,7 +3204,7 @@ static void rna_def_brush(BlenderRNA *brna)
"When locked keep using the plane origin of surface where stroke was initiated");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- const EnumPropertyItem *entry = RNA_automasking_flags;
+ const EnumPropertyItem *entry = rna_enum_brush_automasking_flag_items;
do {
prop = RNA_def_property(srna, entry->identifier, PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "automasking_flags", entry->value);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index d2cf80d8891..c1a61b0e2b6 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -476,7 +476,7 @@ const EnumPropertyItem rna_enum_bake_save_mode_items[] = {
{0, NULL, 0, NULL, NULL},
};
-const EnumPropertyItem rna_enum_bake_view_from_items[] = {
+static const EnumPropertyItem rna_enum_bake_view_from_items[] = {
{R_BAKE_VIEW_FROM_ABOVE_SURFACE,
"ABOVE_SURFACE",
0,
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 003e26333d2..7c1cae1c44d 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -32,8 +32,6 @@
#include "WM_api.h"
#include "WM_types.h"
-extern const EnumPropertyItem RNA_automasking_flags[];
-
const EnumPropertyItem rna_enum_particle_edit_hair_brush_items[] = {
{PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"},
{PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"},
@@ -864,7 +862,7 @@ static void rna_def_sculpt(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_update");
- const EnumPropertyItem *entry = RNA_automasking_flags;
+ const EnumPropertyItem *entry = rna_enum_brush_automasking_flag_items;
do {
prop = RNA_def_property(srna, entry->identifier, PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "automasking_flags", entry->value);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index db12ac82f38..fdc916a270c 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -140,7 +140,7 @@ static const EnumPropertyItem rna_enum_userdef_viewport_aa_items[] = {
{0, NULL, 0, NULL, NULL},
};
-const EnumPropertyItem rna_enum_preference_gpu_backend_items[] = {
+static const EnumPropertyItem rna_enum_preference_gpu_backend_items[] = {
{GPU_BACKEND_OPENGL, "OPENGL", 0, "OpenGL", "Use OpenGL backend"},
{GPU_BACKEND_METAL, "METAL", 0, "Metal", "Use Metal backend"},
{GPU_BACKEND_VULKAN, "VULKAN", 0, "Vulkan", "Use Vulkan backend"},
More information about the Bf-blender-cvs
mailing list