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:
-rw-r--r--source/blender/blenkernel/BKE_studiolight.h2
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c1
-rw-r--r--source/blender/blenkernel/intern/blender_user_menu.c1
-rw-r--r--source/blender/draw/intern/draw_anim_viz.c4
-rw-r--r--source/blender/draw/intern/draw_armature.c2
-rw-r--r--source/blender/draw/intern/draw_cache.c32
-rw-r--r--source/blender/draw/intern/draw_manager.c2
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c2
-rw-r--r--source/blender/editors/interface/interface_intern.h2
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/mesh/editmesh_extrude.c10
-rw-r--r--source/blender/editors/space_node/drawnode.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_navigate.c2
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c2
-rw-r--r--source/blender/makesrna/intern/rna_context.c1
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c2
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c4
-rw-r--r--source/blender/makesrna/intern/rna_shader_fx.c4
-rw-r--r--source/blender/makesrna/intern/rna_space.c2
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c2
20 files changed, 43 insertions, 38 deletions
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h
index fee01fa8abb..4a7f29d7190 100644
--- a/source/blender/blenkernel/BKE_studiolight.h
+++ b/source/blender/blenkernel/BKE_studiolight.h
@@ -99,7 +99,7 @@ enum StudioLightFlag {
STUDIOLIGHT_EQUIRECTANGULAR_IRRADIANCE_GPUTEXTURE = (1 << 10),
STUDIOLIGHT_RADIANCE_BUFFERS_CALCULATED = (1 << 11),
STUDIOLIGHT_UI_EXPANDED = (1 << 13),
-} StudioLightFlag;
+};
#define STUDIOLIGHT_FLAG_ALL (STUDIOLIGHT_INTERNAL | STUDIOLIGHT_EXTERNAL_FILE)
#define STUDIOLIGHT_FLAG_ORIENTATIONS (STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD | STUDIOLIGHT_ORIENTATION_VIEWNORMAL)
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 9c4aae7cda5..05253f7962a 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -2098,6 +2098,7 @@ static void mesh_calc_modifiers(
/* XXX: Is build_shapekey_layers ever even true? This should have crashed long ago... */
BLI_assert(!build_shapekey_layers);
+ UNUSED_VARS_NDEBUG(build_shapekey_layers);
//if (build_shapekey_layers)
// add_shapekey_layers(*r_deform_mesh, me, ob);
diff --git a/source/blender/blenkernel/intern/blender_user_menu.c b/source/blender/blenkernel/intern/blender_user_menu.c
index 3ec46e23cd1..2c18de70e6d 100644
--- a/source/blender/blenkernel/intern/blender_user_menu.c
+++ b/source/blender/blenkernel/intern/blender_user_menu.c
@@ -89,6 +89,7 @@ bUserMenuItem *BKE_blender_user_menu_item_add(ListBase *lb, int type)
size = sizeof(bUserMenuItem_Prop);
}
else {
+ size = sizeof(bUserMenuItem);
BLI_assert(0);
}
diff --git a/source/blender/draw/intern/draw_anim_viz.c b/source/blender/draw/intern/draw_anim_viz.c
index f976c7b4d05..7ddcb306cea 100644
--- a/source/blender/draw/intern/draw_anim_viz.c
+++ b/source/blender/draw/intern/draw_anim_viz.c
@@ -90,10 +90,12 @@ typedef struct MPATH_Data {
MPATH_StorageList *stl;
} MPATH_Data;
-struct {
+#if 0
+static struct {
GPUShader *mpath_line_sh;
GPUShader *mpath_points_sh;
} e_data = {0};
+#endif
/* *************************** Path Cache *********************************** */
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c
index 8cd7431cfc0..a84b3fdeb41 100644
--- a/source/blender/draw/intern/draw_armature.c
+++ b/source/blender/draw/intern/draw_armature.c
@@ -460,7 +460,7 @@ static void drw_shgroup_bone_ik_spline_lines(const float start[3], const float e
* \{ */
/* global here is reset before drawing each bone */
-struct {
+static struct {
const ThemeWireColor *bcolor;
} g_color;
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index ac84a847a1b..8ef5d600413 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -242,13 +242,15 @@ static GPUVertBuf *sphere_wire_vbo(const float rad)
cv[0] = p[(i + j) % NSEGMENTS][0];
cv[1] = p[(i + j) % NSEGMENTS][1];
- if (axis == 0)
- v[0] = cv[0], v[1] = cv[1], v[2] = 0.0f;
- else if (axis == 1)
- v[0] = cv[0], v[1] = 0.0f, v[2] = cv[1];
- else
- v[0] = 0.0f, v[1] = cv[0], v[2] = cv[1];
-
+ if (axis == 0) {
+ ARRAY_SET_ITEMS(v, cv[0], cv[1], 0.0f);
+ }
+ else if (axis == 1) {
+ ARRAY_SET_ITEMS(v, cv[0], 0.0f, cv[1]);
+ }
+ else {
+ ARRAY_SET_ITEMS(v, 0.0f, cv[0], cv[1]);
+ }
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 2 + j + (NSEGMENTS * 2 * axis), v);
}
}
@@ -825,17 +827,17 @@ GPUBatch *DRW_cache_empty_cone_get(void)
cv[1] = p[(i) % NSEGMENTS][1];
/* cone sides */
- v[0] = cv[0], v[1] = 0.0f, v[2] = cv[1];
+ ARRAY_SET_ITEMS(v, cv[0], 0.0f, cv[1]);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4, v);
- v[0] = 0.0f, v[1] = 2.0f, v[2] = 0.0f;
+ ARRAY_SET_ITEMS(v, 0.0f, 2.0f, 0.0f);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4 + 1, v);
/* end ring */
- v[0] = cv[0], v[1] = 0.0f, v[2] = cv[1];
+ ARRAY_SET_ITEMS(v, cv[0], 0.0f, cv[1]);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4 + 2, v);
cv[0] = p[(i + 1) % NSEGMENTS][0];
cv[1] = p[(i + 1) % NSEGMENTS][1];
- v[0] = cv[0], v[1] = 0.0f, v[2] = cv[1];
+ ARRAY_SET_ITEMS(v, cv[0], 0.0f, cv[1]);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4 + 3, v);
}
@@ -1578,9 +1580,9 @@ GPUBatch *DRW_cache_lamp_spot_get(void)
cv[1] = p[i % NSEGMENTS][1];
/* cone sides */
- v[0] = cv[0], v[1] = cv[1], v[2] = -1.0f;
+ ARRAY_SET_ITEMS(v, cv[0], cv[1], -1.0f);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4, v);
- v[0] = 0.0f, v[1] = 0.0f, v[2] = 0.0f;
+ ARRAY_SET_ITEMS(v, 0.0f, 0.0f, 0.0f);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4 + 1, v);
GPU_vertbuf_attr_set(vbo, attr_id.n1, i * 4, n[(i) % NSEGMENTS]);
@@ -1589,11 +1591,11 @@ GPUBatch *DRW_cache_lamp_spot_get(void)
GPU_vertbuf_attr_set(vbo, attr_id.n2, i * 4 + 1, n[(i + 1) % NSEGMENTS]);
/* end ring */
- v[0] = cv[0], v[1] = cv[1], v[2] = -1.0f;
+ ARRAY_SET_ITEMS(v, cv[0], cv[1], -1.0f);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4 + 2, v);
cv[0] = p[(i + 1) % NSEGMENTS][0];
cv[1] = p[(i + 1) % NSEGMENTS][1];
- v[0] = cv[0], v[1] = cv[1], v[2] = -1.0f;
+ ARRAY_SET_ITEMS(v, cv[0], cv[1], -1.0f);
GPU_vertbuf_attr_set(vbo, attr_id.pos, i * 4 + 3, v);
GPU_vertbuf_attr_set(vbo, attr_id.n1, i * 4 + 2, n[(i) % NSEGMENTS]);
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index e6e20934283..159f69d3226 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -95,7 +95,7 @@
/** Render State: No persistent data between draw calls. */
DRWManager DST = {NULL};
-ListBase DRW_engines = {NULL, NULL};
+static ListBase DRW_engines = {NULL, NULL};
extern struct GPUUniformBuffer *view_ubo; /* draw_manager_exec.c */
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 2c0b3e9900a..180fb65e743 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -574,7 +574,7 @@ static void gp_add_filldata_tobuffer(
mul_v3_m4v3(fpt, diff_mat, &pt->x);
/* if 2d, need conversion */
- if (!flag & GP_STROKE_3DSPACE) {
+ if (!(flag & GP_STROKE_3DSPACE)) {
gp_calc_2d_stroke_fxy(fpt, flag, offsx, offsy, winx, winy, co);
copy_v2_v2(fpt, co);
fpt[2] = 0.0f; /* 2d always is z=0.0f */
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index d4fccc48bfc..f7507223f31 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -780,7 +780,7 @@ void ui_draw_preview_item(struct uiFontStyle *fstyle, rcti *rect, const char *na
#define UI_POPUP_MENU_TOP (int)(8 * UI_DPI_FAC)
#define UI_PIXEL_AA_JITTER 8
-const float ui_pixel_jitter[UI_PIXEL_AA_JITTER][2];
+extern const float ui_pixel_jitter[UI_PIXEL_AA_JITTER][2];
/* interface_style.c */
void uiStyleInit(void);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 52e6e237a58..d0cdba49536 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1083,7 +1083,7 @@ static void widgetbase_set_uniform_colors_ubv(
#define MAX_WIDGET_BASE_BATCH 6
#define MAX_WIDGET_PARAMETERS 11
-struct {
+static struct {
GPUBatch *batch; /* Batch type */
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH];
int count;
diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c
index 061cc3ebc32..c5ef2a06059 100644
--- a/source/blender/editors/mesh/editmesh_extrude.c
+++ b/source/blender/editors/mesh/editmesh_extrude.c
@@ -365,11 +365,11 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot)
#ifdef USE_GIZMO
-const float extrude_button_scale = 0.15f;
-const float extrude_button_offset_scale = 1.5f;
-const float extrude_arrow_scale = 1.0f;
-const float extrude_arrow_xyz_axis_scale = 1.0f;
-const float extrude_arrow_normal_axis_scale = 1.75f;
+static const float extrude_button_scale = 0.15f;
+static const float extrude_button_offset_scale = 1.5f;
+static const float extrude_arrow_scale = 1.0f;
+static const float extrude_arrow_xyz_axis_scale = 1.0f;
+static const float extrude_arrow_normal_axis_scale = 1.75f;
static const uchar shape_plus[] = {
0x5f, 0xfb, 0x40, 0xee, 0x25, 0xda, 0x11, 0xbf, 0x4, 0xa0, 0x0, 0x80, 0x4, 0x5f, 0x11,
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index f284fa015b8..a48a6faf69f 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3422,7 +3422,7 @@ bool node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, flo
static float arrow_verts[3][2] = {{-1.0f, 1.0f}, {0.0f, 0.0f}, {-1.0f, -1.0f}};
static float arrow_expand_axis[3][2] = {{0.7071f, 0.7071f}, {M_SQRT2, 0.0f}, {0.7071f, -0.7071f}};
-struct {
+static struct {
GPUBatch *batch; /* for batching line together */
GPUBatch *batch_single; /* for single line */
GPUVertBuf *inst_vbo;
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
index 388d9a29eff..5778f85a99c 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
@@ -131,7 +131,7 @@ struct NavigateGizmoInfo {
#define SHAPE_VARS(shape_id) shape = shape_id, .shape_size = ARRAY_SIZE(shape_id)
-struct NavigateGizmoInfo g_navigate_params[MPR_TOTAL] = {
+static struct NavigateGizmoInfo g_navigate_params[MPR_TOTAL] = {
{
.opname = "VIEW3D_OT_move",
.gizmo = "GIZMO_GT_button_2d",
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 3b5d7d5871a..83dfa06f37d 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -107,7 +107,7 @@
#define MAN_SCALE_C (MAN_SCALE_X | MAN_SCALE_Y | MAN_SCALE_Z)
/* threshold for testing view aligned gizmo axis */
-struct {
+static struct {
float min, max;
} g_tw_axis_range[2] = {
/* Regular range */
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index 781be07f1dc..618cefe13e5 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -34,6 +34,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "rna_internal.h" /* own include */
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index 47075d0d4f7..899439e1a02 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -77,7 +77,7 @@ const EnumPropertyItem rna_enum_rigidbody_constraint_type_items[] = {
{0, NULL, 0, NULL, NULL}};
/* bullet spring type */
-const EnumPropertyItem rna_enum_rigidbody_constraint_spring_type_items[] = {
+static const EnumPropertyItem rna_enum_rigidbody_constraint_spring_type_items[] = {
{RBC_SPRING_TYPE1, "SPRING1", ICON_NONE, "Blender 2.7", "Spring implementation used in blender 2.7. Damping is capped at 1.0"},
{RBC_SPRING_TYPE2, "SPRING2", ICON_NONE, "Blender 2.8", "New implementation available since 2.8"},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 6a6c97b41ad..1f8f95cf380 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -76,12 +76,12 @@ const EnumPropertyItem rna_enum_gpencil_sculpt_brush_items[] = {
{ 0, NULL, 0, NULL, NULL }
};
-EnumPropertyItem rna_enum_gpencil_weight_brush_items[] = {
+#ifndef RNA_RUNTIME
+static EnumPropertyItem rna_enum_gpencil_weight_brush_items[] = {
{ GP_EDITBRUSH_TYPE_WEIGHT, "WEIGHT", ICON_GPBRUSH_WEIGHT, "Weight", "Weight Paint for Vertex Groups" },
{ 0, NULL, 0, NULL, NULL }
};
-#ifndef RNA_RUNTIME
static const EnumPropertyItem rna_enum_gpencil_lockaxis_items[] = {
{ GP_LOCKAXIS_NONE, "GP_LOCKAXIS_NONE", ICON_UNLOCKED, "None", "" },
{ GP_LOCKAXIS_X, "GP_LOCKAXIS_X", ICON_NDOF_DOM, "X", "Project strokes to plane locked to X" },
diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c
index a005699dc32..da4470ccff7 100644
--- a/source/blender/makesrna/intern/rna_shader_fx.c
+++ b/source/blender/makesrna/intern/rna_shader_fx.c
@@ -60,7 +60,7 @@ const EnumPropertyItem rna_enum_object_shaderfx_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-const EnumPropertyItem rna_enum_shaderfx_rim_modes_items[] = {
+static const EnumPropertyItem rna_enum_shaderfx_rim_modes_items[] = {
{eShaderFxRimMode_Normal, "NORMAL", 0, "Normal", "" },
{eShaderFxRimMode_Overlay, "OVERLAY", 0, "Overlay", "" },
{eShaderFxRimMode_Add, "ADD", 0, "Add", "" },
@@ -70,7 +70,7 @@ const EnumPropertyItem rna_enum_shaderfx_rim_modes_items[] = {
{0, NULL, 0, NULL, NULL }
};
-const EnumPropertyItem rna_enum_shaderfx_colorize_modes_items[] = {
+static const EnumPropertyItem rna_enum_shaderfx_colorize_modes_items[] = {
{eShaderFxColorizeMode_GrayScale, "GRAYSCALE", 0, "Gray Scale", "" },
{eShaderFxColorizeMode_Sepia, "SEPIA", 0, "Sepia", "" },
{eShaderFxColorizeMode_BiTone, "BITONE", 0, "Bi-Tone", "" },
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 56491fd70e4..ab662e71380 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -244,7 +244,7 @@ const EnumPropertyItem rna_enum_shading_type_items[] = {
{0, NULL, 0, NULL, NULL}
};
-const EnumPropertyItem rna_enum_viewport_lighting_items[] = {
+static const EnumPropertyItem rna_enum_viewport_lighting_items[] = {
{V3D_LIGHTING_FLAT, "FLAT", 0, "Flat", "Display using flat lighting"},
{V3D_LIGHTING_STUDIO, "STUDIO", 0, "Studio", "Display using studio lighting"},
{V3D_LIGHTING_MATCAP, "MATCAP", 0, "MatCap", "Display using matcap material and lighting"},
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
index 9cc096e1cdd..204662b5713 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
@@ -296,8 +296,6 @@ static int gizmo_select_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE
BLI_assert(0);
return (OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH);
}
-
- return OPERATOR_PASS_THROUGH;
}
void GIZMOGROUP_OT_gizmo_select(wmOperatorType *ot)