Page MenuHome
Paste P2676

(An Untitled Masterwork)
ActivePublic

Authored by Jacques Lucke (JacquesLucke) on Dec 20 2021, 11:13 AM.
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 1e24b29038d..6de57cffc69 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -455,7 +455,8 @@ class BuiltinSplineAttributeProvider final : public BuiltinAttributeProvider {
}
};
-static int get_spline_resolution(const SplinePtr &spline)
+int get_spline_resolution(const SplinePtr &spline);
+int get_spline_resolution(const SplinePtr &spline)
{
if (const BezierSpline *bezier_spline = dynamic_cast<const BezierSpline *>(spline.get())) {
return bezier_spline->resolution();
@@ -465,8 +466,8 @@ static int get_spline_resolution(const SplinePtr &spline)
}
return 1;
}
-
-static void set_spline_resolution(SplinePtr &spline, const int resolution)
+void set_spline_resolution(SplinePtr &spline, const int resolution);
+void set_spline_resolution(SplinePtr &spline, const int resolution)
{
if (BezierSpline *bezier_spline = dynamic_cast<BezierSpline *>(spline.get())) {
bezier_spline->set_resolution(std::max(resolution, 1));
@@ -487,12 +488,14 @@ static GVMutableArray make_resolution_write_attribute(CurveEval &curve)
ForDerivedSpan<SplinePtr, get_spline_resolution, set_spline_resolution>(curve.splines());
}
-static bool get_cyclic_value(const SplinePtr &spline)
+bool get_cyclic_value(const SplinePtr &spline);
+bool get_cyclic_value(const SplinePtr &spline)
{
return spline->is_cyclic();
}
-static void set_cyclic_value(SplinePtr &spline, const bool value)
+void set_cyclic_value(SplinePtr &spline, const bool value);
+void set_cyclic_value(SplinePtr &spline, const bool value)
{
if (spline->is_cyclic() != value) {
spline->set_cyclic(value);
diff --git a/source/blender/blenkernel/intern/geometry_component_instances.cc b/source/blender/blenkernel/intern/geometry_component_instances.cc
index 93a7646fed0..553907072bd 100644
--- a/source/blender/blenkernel/intern/geometry_component_instances.cc
+++ b/source/blender/blenkernel/intern/geometry_component_instances.cc
@@ -340,12 +340,14 @@ const blender::bke::CustomDataAttributes &InstancesComponent::attributes() const
namespace blender::bke {
-static float3 get_transform_position(const float4x4 &transform)
+float3 get_transform_position(const float4x4 &transform);
+float3 get_transform_position(const float4x4 &transform)
{
return transform.translation();
}
-static void set_transform_position(float4x4 &transform, const float3 position)
+void set_transform_position(float4x4 &transform, const float3 position);
+void set_transform_position(float4x4 &transform, const float3 position)
{
copy_v3_v3(transform.values[3], position);
}
diff --git a/source/blender/blenkernel/intern/geometry_component_mesh.cc b/source/blender/blenkernel/intern/geometry_component_mesh.cc
index cc15e6d7b84..8849f490b1d 100644
--- a/source/blender/blenkernel/intern/geometry_component_mesh.cc
+++ b/source/blender/blenkernel/intern/geometry_component_mesh.cc
@@ -914,12 +914,14 @@ static GVMutableArray make_array_write_attribute(void *data, const int domain_si
return VMutableArray<T>::ForSpan(MutableSpan<T>((T *)data, domain_size));
}
-static float3 get_vertex_position(const MVert &vert)
+float3 get_vertex_position(const MVert &vert);
+float3 get_vertex_position(const MVert &vert)
{
return float3(vert.co);
}
-static void set_vertex_position(MVert &vert, float3 position)
+void set_vertex_position(MVert &vert, float3 position);
+void set_vertex_position(MVert &vert, float3 position)
{
copy_v3_v3(vert.co, position);
}
@@ -932,44 +934,52 @@ static void tag_normals_dirty_when_writing_position(GeometryComponent &component
}
}
-static int get_material_index(const MPoly &mpoly)
+int get_material_index(const MPoly &mpoly);
+int get_material_index(const MPoly &mpoly)
{
return static_cast<int>(mpoly.mat_nr);
}
-static void set_material_index(MPoly &mpoly, int index)
+void set_material_index(MPoly &mpoly, int index);
+void set_material_index(MPoly &mpoly, int index)
{
mpoly.mat_nr = static_cast<short>(std::clamp(index, 0, SHRT_MAX));
}
-static bool get_shade_smooth(const MPoly &mpoly)
+bool get_shade_smooth(const MPoly &mpoly);
+bool get_shade_smooth(const MPoly &mpoly)
{
return mpoly.flag & ME_SMOOTH;
}
-static void set_shade_smooth(MPoly &mpoly, bool value)
+void set_shade_smooth(MPoly &mpoly, bool value);
+void set_shade_smooth(MPoly &mpoly, bool value)
{
SET_FLAG_FROM_TEST(mpoly.flag, value, ME_SMOOTH);
}
-static float2 get_loop_uv(const MLoopUV &uv)
+float2 get_loop_uv(const MLoopUV &uv);
+float2 get_loop_uv(const MLoopUV &uv)
{
return float2(uv.uv);
}
-static void set_loop_uv(MLoopUV &uv, float2 co)
+void set_loop_uv(MLoopUV &uv, float2 co);
+void set_loop_uv(MLoopUV &uv, float2 co)
{
copy_v2_v2(uv.uv, co);
}
-static ColorGeometry4f get_loop_color(const MLoopCol &col)
+ColorGeometry4f get_loop_color(const MLoopCol &col);
+ColorGeometry4f get_loop_color(const MLoopCol &col)
{
ColorGeometry4b encoded_color = ColorGeometry4b(col.r, col.g, col.b, col.a);
ColorGeometry4f linear_color = encoded_color.decode();
return linear_color;
}
-static void set_loop_color(MLoopCol &col, ColorGeometry4f linear_color)
+void set_loop_color(MLoopCol &col, ColorGeometry4f linear_color);
+void set_loop_color(MLoopCol &col, ColorGeometry4f linear_color)
{
ColorGeometry4b encoded_color = linear_color.encode();
col.r = encoded_color.r;
@@ -978,12 +988,14 @@ static void set_loop_color(MLoopCol &col, ColorGeometry4f linear_color)
col.a = encoded_color.a;
}
-static float get_crease(const MEdge &edge)
+float get_crease(const MEdge &edge);
+float get_crease(const MEdge &edge)
{
return edge.crease / 255.0f;
}
-static void set_crease(MEdge &edge, float value)
+void set_crease(MEdge &edge, float value);
+void set_crease(MEdge &edge, float value)
{
edge.crease = round_fl_to_uchar_clamp(value * 255.0f);
}
diff --git a/source/blender/blenlib/tests/BLI_virtual_array_test.cc b/source/blender/blenlib/tests/BLI_virtual_array_test.cc
index 62b7b383831..9195713a23f 100644
--- a/source/blender/blenlib/tests/BLI_virtual_array_test.cc
+++ b/source/blender/blenlib/tests/BLI_virtual_array_test.cc
@@ -118,12 +118,13 @@ TEST(virtual_array, AsSpan)
EXPECT_EQ(span[6], 60);
}
-static int get_x(const std::array<int, 3> &item)
+int get_x(const std::array<int, 3> &item);
+int get_x(const std::array<int, 3> &item)
{
return item[0];
}
-
-static void set_x(std::array<int, 3> &item, int value)
+void set_x(std::array<int, 3> &item, int value);
+void set_x(std::array<int, 3> &item, int value)
{
item[0] = value;
}

Event Timeline