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--CMakeLists.txt8
-rw-r--r--build_files/cmake/macros.cmake1
-rw-r--r--intern/mikktspace/mikktspace.c2
-rw-r--r--intern/raskter/raskter.c8
-rw-r--r--source/blender/blenkernel/BKE_customdata.h2
-rw-r--r--source/blender/blenkernel/BKE_mask.h1
-rw-r--r--source/blender/blenkernel/CMakeLists.txt4
-rw-r--r--source/blender/blenkernel/intern/blender.c6
-rw-r--r--source/blender/blenkernel/intern/cloth.c35
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c21
-rw-r--r--source/blender/blenkernel/intern/implicit.c18
-rw-r--r--source/blender/blenkernel/intern/mask.c5
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c6
-rw-r--r--source/blender/blenkernel/intern/movieclip.c6
-rw-r--r--source/blender/blenkernel/intern/particle_system.c5
-rw-r--r--source/blender/blenkernel/intern/seqmodifier.c32
-rw-r--r--source/blender/blenkernel/intern/smoke.c6
-rw-r--r--source/blender/blenkernel/intern/text.c24
-rw-r--r--source/blender/blenkernel/intern/texture.c2
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c2
-rw-r--r--source/blender/blenlib/BLI_math_color.h2
-rw-r--r--source/blender/blenlib/intern/math_color.c6
-rw-r--r--source/blender/blenlib/intern/md5.c2
-rw-r--r--source/blender/blenlib/intern/pbvh.c2
-rw-r--r--source/blender/blenlib/intern/voronoi.c12
-rw-r--r--source/blender/blenloader/BLO_readfile.h3
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c2
-rw-r--r--source/blender/bmesh/operators/bmo_hull.c4
-rw-r--r--source/blender/bmesh/operators/bmo_removedoubles.c2
-rw-r--r--source/blender/bmesh/operators/bmo_wireframe.c2
-rw-r--r--source/blender/bmesh/tools/BME_bevel.c10
-rw-r--r--source/blender/editors/animation/keyframing.c2
-rw-r--r--source/blender/editors/armature/poseobject.c5
-rw-r--r--source/blender/editors/include/ED_mask.h4
-rw-r--r--source/blender/editors/include/ED_sequencer.h2
-rw-r--r--source/blender/editors/include/ED_util.h2
-rw-r--r--source/blender/editors/interface/interface_ops.c2
-rw-r--r--source/blender/editors/io/io_ops.c2
-rw-r--r--source/blender/editors/mask/mask_editaction.c1
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/physics/physics_fluid.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c4
-rw-r--r--source/blender/editors/space_clip/clip_graph_draw.c4
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c2
-rw-r--r--source/blender/editors/space_nla/nla_edit.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c8
-rw-r--r--source/blender/editors/space_node/space_node.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_ops.c1
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c2
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
-rw-r--r--source/blender/imbuf/intern/divers.c2
-rw-r--r--source/blender/imbuf/intern/indexer_dv.c2
-rw-r--r--source/blender/imbuf/intern/util.c2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c2
-rw-r--r--source/blender/nodes/intern/node_common.c2
-rw-r--r--source/blender/nodes/texture/node_texture_util.h2
-rw-r--r--source/blender/python/bmesh/bmesh_py_ops.c4
-rw-r--r--source/blender/python/intern/CMakeLists.txt1
-rw-r--r--source/blender/python/intern/bpy.c4
-rw-r--r--source/blender/python/intern/bpy.h5
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.c5
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c2
-rw-r--r--source/blender/python/intern/bpy_interface_atexit.c1
-rw-r--r--source/blender/python/intern/bpy_library.c3
-rw-r--r--source/blender/python/intern/bpy_library.h32
-rw-r--r--source/blender/python/intern/bpy_rna.c18
-rw-r--r--source/blender/python/intern/bpy_rna.h4
-rw-r--r--source/blender/python/intern/gpu.c3
-rw-r--r--source/blender/python/intern/stubs.c11
-rw-r--r--source/blender/render/intern/include/zbuf.h5
-rw-r--r--source/blender/render/intern/source/convertblender.c1
-rw-r--r--source/blender/render/intern/source/render_texture.c11
-rw-r--r--source/blender/render/intern/source/strand.c5
-rw-r--r--source/blender/render/intern/source/texture_ocean.c2
-rw-r--r--source/blender/render/intern/source/zbuf.c6
-rw-r--r--source/blender/windowmanager/WM_api.h2
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c3
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c8
-rw-r--r--source/creator/creator.c5
87 files changed, 251 insertions, 217 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff3195224bf..07d08c79f9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1673,9 +1673,10 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_DECLARATION_AFTER_STATEMENT -Werror=declaration-after-statement)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
- ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE -Werror=return-type)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE -Werror=return-type)
# system headers sometimes do this, disable for now, was: -Werror=strict-prototypes
- ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES -Wstrict-prototypes)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES -Wstrict-prototypes)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
@@ -1709,10 +1710,13 @@ if(CMAKE_COMPILER_IS_GNUCC)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # strange, clang complains these are not supported, but then yses them.
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES -Wstrict-prototypes)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS C_WARN_ALL -Wall)
ADD_CHECK_C_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 317fcf0f120..0d4a19705a2 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -470,6 +470,7 @@ macro(remove_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
remove_cc_flag("-Wstrict-prototypes")
+ remove_cc_flag("-Wmissing-prototypes")
remove_cc_flag("-Wunused-parameter")
remove_cc_flag("-Wwrite-strings")
remove_cc_flag("-Wundef")
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 0a3141d6782..a1ae6bd81c0 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -437,7 +437,7 @@ const int g_iCells = 2048;
// it is IMPORTANT that this function is called to evaluate the hash since
// inlining could potentially reorder instructions and generate different
// results for the same effective input value fVal.
-NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
+static NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
{
const float fIndex = g_iCells * ((fVal-fMin)/(fMax-fMin));
const int iIndex = fIndex<0?0:((int)fIndex);
diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c
index 659d01e2d82..eaf8dcd06da 100644
--- a/intern/raskter/raskter.c
+++ b/intern/raskter/raskter.c
@@ -819,7 +819,7 @@ int PLX_raskterize_feather(float(*base_verts)[2], int num_base_verts, float(*fea
#ifndef __PLX__FAKE_AA__
-int get_range_expanded_pixel_coord(float normalized_value, int max_value) {
+static int get_range_expanded_pixel_coord(float normalized_value, int max_value) {
return (int)((normalized_value * (float)(max_value)) + 0.5f);
}
@@ -1395,7 +1395,7 @@ int PLX_antialias_buffer(float *buf, int buf_x, int buf_y) {
#define SWAP_POLYVERT(a,b) point_temp[0]=(a)[0]; point_temp[1]=(a)[1]; (a)[0]=(b)[0]; (a)[1]=(b)[1]; (b)[0]=point_temp[0]; (b)[1]=point_temp[1];
#define __PLX_SMALL_COUNT__ 13
-void plx_floatsort(float(*f)[2], unsigned int n, int sortby) {
+static void plx_floatsort(float(*f)[2], unsigned int n, int sortby) {
unsigned int a;
unsigned int b;
unsigned int c;
@@ -1474,7 +1474,7 @@ void plx_floatsort(float(*f)[2], unsigned int n, int sortby) {
}
}
-int plx_find_lower_bound(float v, float(*a)[2], int num_feather_verts) {
+static int plx_find_lower_bound(float v, float(*a)[2], int num_feather_verts) {
int x;
int l;
int r;
@@ -1502,7 +1502,7 @@ int plx_find_lower_bound(float v, float(*a)[2], int num_feather_verts) {
}
}
-int plx_find_upper_bound(float v, float(*a)[2], int num_feather_verts) {
+static int plx_find_upper_bound(float v, float(*a)[2], int num_feather_verts) {
int x;
int l;
int r;
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 19dd67b88f8..33361b9921c 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -73,6 +73,8 @@ extern const CustomDataMask CD_MASK_FACECORNERS;
#define CD_TYPE_AS_MASK(_type) (CustomDataMask)((CustomDataMask)1 << (CustomDataMask)(_type))
+void customData_mask_layers__print(CustomDataMask mask);
+
/**
* Checks if the layer at physical offset \a layer_n (in data->layers) support math
* the below operations.
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index 51e301fec80..d9a668e6a2f 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -131,6 +131,7 @@ void BKE_mask_get_handle_point_adjacent(struct MaskSpline *spline, struct MaskSp
void BKE_mask_layer_calc_handles(struct MaskLayer *masklay);
void BKE_mask_layer_calc_handles_deform(struct MaskLayer *masklay);
void BKE_mask_calc_handles(struct Mask *mask);
+void BKE_mask_update_deform(struct Mask *mask);
void BKE_mask_spline_ensure_deform(struct MaskSpline *spline);
/* animation */
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 576b79f899c..efdb80433c6 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -44,6 +44,7 @@ set(INC
../../../intern/mikktspace
../../../intern/opennl/extern
../../../intern/raskter
+ ../../../intern/smoke/extern
# XXX - BAD LEVEL CALL WM_api.h
../windowmanager
@@ -342,9 +343,6 @@ if(WITH_MOD_FLUID)
endif()
if(WITH_MOD_SMOKE)
- list(APPEND INC
- ../../../intern/smoke/extern
- )
add_definitions(-DWITH_SMOKE)
endif()
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 09519f68415..45e2167af2f 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -90,7 +90,7 @@
#include "WM_api.h" // XXXXX BAD, very BAD dependency (bad level call) - remove asap, elubie
#ifdef WITH_PYTHON
-#include "BPY_extern.h"
+# include "BPY_extern.h"
#endif
Global G;
@@ -217,8 +217,6 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
/* no load screens? */
if (mode) {
/* comes from readfile.c */
- extern void lib_link_screen_restore(Main *, bScreen *, Scene *);
-
SWAP(ListBase, G.main->wm, bfd->main->wm);
SWAP(ListBase, G.main->screen, bfd->main->screen);
SWAP(ListBase, G.main->script, bfd->main->script);
@@ -232,7 +230,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
if (curscreen) curscreen->scene = curscene; /* can run in bgmode */
/* clear_global will free G.main, here we can still restore pointers */
- lib_link_screen_restore(bfd->main, curscreen, curscene);
+ blo_lib_link_screen_restore(bfd->main, curscreen, curscene);
}
/* free G.main Main database */
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index b0de7a5ea6c..4241756a109 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -50,36 +50,7 @@
#include "BKE_modifier.h"
#include "BKE_pointcache.h"
-#ifdef _WIN32
-void tstart( void )
-{}
-void tend( void )
-{
-}
-double tval( void )
-{
- return 0;
-}
-#else
-#include <sys/time.h>
-static struct timeval _tstart, _tend;
-static struct timezone tz;
-void tstart( void )
-{
- gettimeofday(&_tstart, &tz);
-}
-void tend(void)
-{
- gettimeofday(&_tend, &tz);
-}
-double tval(void)
-{
- double t1, t2;
- t1 = ( double ) _tstart.tv_sec + ( double ) _tstart.tv_usec/ ( 1000*1000 );
- t2 = ( double ) _tend.tv_sec + ( double ) _tend.tv_usec/ ( 1000*1000 );
- return t2-t1;
-}
-#endif
+// #include "PIL_time.h" /* timing for debug prints */
/* Our available solvers. */
// 255 is the magic reserved number, so NEVER try to put 255 solvers in here!
@@ -410,13 +381,13 @@ static int do_step_cloth(Object *ob, ClothModifierData *clmd, DerivedMesh *resul
cloth_apply_vgroup ( clmd, result );
cloth_update_springs( clmd );
- tstart();
+ // TIMEIT_START(cloth_step)
/* call the solver. */
if (solvers [clmd->sim_parms->solver_type].solver)
ret = solvers[clmd->sim_parms->solver_type].solver(ob, framenr, clmd, effectors);
- tend();
+ // TIMEIT_END(cloth_step)
pdEndEffectors(&effectors);
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index f47ac641cf9..1cb29b90133 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -669,7 +669,7 @@ static void boundInsert(Bounds3D *b, float point[3])
}
}
-float getSurfaceDimension(PaintSurfaceData *sData)
+static float getSurfaceDimension(PaintSurfaceData *sData)
{
Bounds3D *mb = &sData->bData->mesh_bounds;
return MAX3((mb->max[0] - mb->min[0]), (mb->max[1] - mb->min[1]), (mb->max[2] - mb->min[2]));
@@ -910,7 +910,7 @@ static void free_bakeData(PaintSurfaceData *data)
}
/* free surface data if it's not used anymore */
-void surface_freeUnusedData(DynamicPaintSurface *surface)
+static void surface_freeUnusedData(DynamicPaintSurface *surface)
{
if (!surface->data) return;
@@ -1368,7 +1368,7 @@ static void dynamicPaint_initAdjacencyData(DynamicPaintSurface *surface, int for
MEM_freeN(temp_data);
}
-void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
+static void dynamicPaint_setInitialColor(DynamicPaintSurface *surface)
{
PaintSurfaceData *sData = surface->data;
PaintPoint *pPoint = (PaintPoint *)sData->type_data;
@@ -1605,7 +1605,7 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Deri
/*
* Apply canvas data to the object derived mesh
*/
-struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
+static DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
Object *ob,
DerivedMesh *dm)
{
@@ -1830,9 +1830,12 @@ void dynamicPaint_cacheUpdateFrames(DynamicPaintSurface *surface)
}
}
-void canvas_copyDerivedMesh(DynamicPaintCanvasSettings *canvas, DerivedMesh *dm)
+static void canvas_copyDerivedMesh(DynamicPaintCanvasSettings *canvas, DerivedMesh *dm)
{
- if (canvas->dm) canvas->dm->release(canvas->dm);
+ if (canvas->dm) {
+ canvas->dm->release(canvas->dm);
+ }
+
canvas->dm = CDDM_copy(dm);
}
@@ -2748,7 +2751,7 @@ static void dynamicPaint_freeBrushMaterials(BrushMaterials *bMats)
/*
* Get material diffuse color and alpha (including linked textures) in given coordinates
*/
-void dynamicPaint_doMaterialTex(BrushMaterials *bMats, float color[3], float *alpha, Object *brushOb, const float volume_co[3], const float surface_co[3], int faceIndex, short isQuad, DerivedMesh *orcoDm)
+static void dynamicPaint_doMaterialTex(BrushMaterials *bMats, float color[3], float *alpha, Object *brushOb, const float volume_co[3], const float surface_co[3], int faceIndex, short isQuad, DerivedMesh *orcoDm)
{
Material *mat = bMats->mat;
MFace *mface = orcoDm->getTessFaceArray(orcoDm);
@@ -3953,7 +3956,7 @@ static void dynamicPaint_prepareAdjacencyData(DynamicPaintSurface *surface, int
}
/* find two adjacency points (closest_id) and influence (closest_d) to move paint towards when affected by a force */
-void surface_determineForceTargetPoints(PaintSurfaceData *sData, int index, float force[3], float closest_d[2], int closest_id[2])
+static void surface_determineForceTargetPoints(PaintSurfaceData *sData, int index, float force[3], float closest_d[2], int closest_id[2])
{
BakeAdjPoint *bNeighs = sData->bData->bNeighs;
int numOfNeighs = sData->adj_data->n_num[index];
@@ -4342,7 +4345,7 @@ static void dynamicPaint_doEffectStep(DynamicPaintSurface *surface, float *force
}
}
-void dynamicPaint_doWaveStep(DynamicPaintSurface *surface, float timescale)
+static void dynamicPaint_doWaveStep(DynamicPaintSurface *surface, float timescale)
{
PaintSurfaceData *sData = surface->data;
BakeAdjPoint *bNeighs = sData->bData->bNeighs;
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c
index 1c6974b2615..fcc8b4322a0 100644
--- a/source/blender/blenkernel/intern/implicit.c
+++ b/source/blender/blenkernel/intern/implicit.c
@@ -50,6 +50,7 @@
#define CLOTH_OPENMP_LIMIT 512
+#if 0 /* debug timing */
#ifdef _WIN32
#include <windows.h>
static LARGE_INTEGER _itstart, _itend;
@@ -81,7 +82,7 @@ double itval(void)
static struct timeval _itstart, _itend;
static struct timezone itz;
-void itstart(void)
+static void itstart(void)
{
gettimeofday(&_itstart, &itz);
}
@@ -89,7 +90,7 @@ static void itend(void)
{
gettimeofday(&_itend, &itz);
}
-double itval(void)
+static double itval(void)
{
double t1, t2;
t1 = (double)_itstart.tv_sec + (double)_itstart.tv_usec/(1000*1000);
@@ -97,6 +98,7 @@ double itval(void)
return t2-t1;
}
#endif
+#endif /* debug timing */
static float I[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
static float ZERO[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
@@ -1691,13 +1693,13 @@ static void simulate_implicit_euler(lfVector *Vnew, lfVector *UNUSED(lX), lfVect
mul_bfmatrix_lfvector(dFdXmV, dFdX, lV);
add_lfvectorS_lfvectorS(B, lF, dt, dFdXmV, (dt*dt), numverts);
-
- itstart();
-
+
+ // itstart();
+
cg_filtered(dV, A, B, z, S); /* conjugate gradient algorithm to solve Ax=b */
// cg_filtered_pre(dV, A, B, z, S, P, Pinv, bigI);
-
- itend();
+
+ // itend();
// printf("cg_filtered calc time: %f\n", (float)itval());
cp_lfvector(olddV, dV, numverts);
@@ -1713,7 +1715,7 @@ static void simulate_implicit_euler(lfVector *Vnew, lfVector *UNUSED(lX), lfVect
* (edge distance constraints) in a lagrangian solver. then add forces to help
* guide the implicit solver to that state. this function is called after
* collisions*/
-int cloth_calc_helper_forces(Object *UNUSED(ob), ClothModifierData * clmd, float (*initial_cos)[3], float UNUSED(step), float dt)
+static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothModifierData * clmd, float (*initial_cos)[3], float UNUSED(step), float dt)
{
Cloth *cloth= clmd->clothObject;
float (*cos)[3] = MEM_callocN(sizeof(float)*3*cloth->numverts, "cos cloth_calc_helper_forces");
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index 97b46d4829d..3564071334c 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1112,7 +1112,8 @@ static int BKE_mask_evaluate_parent(MaskParent *parent, float ctime, float r_co[
return FALSE;
}
-int BKE_mask_evaluate_parent_delta(MaskParent *parent, float ctime, float r_delta[2])
+/* could make external but for now its only used internally */
+static int mask_evaluate_parent_delta(MaskParent *parent, float ctime, float r_delta[2])
{
float parent_co[2];
@@ -1452,7 +1453,7 @@ void BKE_mask_layer_evaluate(MaskLayer *masklay, const float ctime, const int do
*point_deform = *point;
point_deform->uw = point->uw ? MEM_dupallocN(point->uw) : NULL;
- if (BKE_mask_evaluate_parent_delta(&point->parent, ctime, delta)) {
+ if (mask_evaluate_parent_delta(&point->parent, ctime, delta)) {
add_v2_v2(point_deform->bezt.vec[0], delta);
add_v2_v2(point_deform->bezt.vec[1], delta);
add_v2_v2(point_deform->bezt.vec[2], delta);
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index 18617f0ef2e..00898b0fe10 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -253,9 +253,9 @@ void BKE_maskrasterize_handle_free(MaskRasterHandle *mr_handle)
}
-void maskrasterize_spline_differentiate_point_outset(float (*diff_feather_points)[2], float (*diff_points)[2],
- const unsigned int tot_diff_point, const float ofs,
- const short do_test)
+static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather_points)[2], float (*diff_points)[2],
+ const unsigned int tot_diff_point, const float ofs,
+ const short do_test)
{
unsigned int k_prev = tot_diff_point - 2;
unsigned int k_curr = tot_diff_point - 1;
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 268234c7e73..1a6a9503887 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -383,7 +383,7 @@ static int moviecache_hashcmp(const void *av, const void *bv)
return 0;
}
-void *moviecache_getprioritydata(void *key_v)
+static void *moviecache_getprioritydata(void *key_v)
{
MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey *) key_v;
MovieClipCachePriorityData *priority_data;
@@ -394,7 +394,7 @@ void *moviecache_getprioritydata(void *key_v)
return priority_data;
}
-int moviecache_getitempriority(void *last_userkey_v, void *priority_data_v)
+static int moviecache_getitempriority(void *last_userkey_v, void *priority_data_v)
{
MovieClipImBufCacheKey *last_userkey = (MovieClipImBufCacheKey *) last_userkey_v;
MovieClipCachePriorityData *priority_data = (MovieClipCachePriorityData *) priority_data_v;
@@ -402,7 +402,7 @@ int moviecache_getitempriority(void *last_userkey_v, void *priority_data_v)
return -abs(last_userkey->framenr - priority_data->framenr);
}
-void moviecache_prioritydeleter(void *priority_data_v)
+static void moviecache_prioritydeleter(void *priority_data_v)
{
MovieClipCachePriorityData *priority_data = (MovieClipCachePriorityData *) priority_data_v;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index bae8efa758e..2c0452bc2d1 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3776,7 +3776,7 @@ static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
* simulation. This should be called once per particle during a simulation
* step, after the velocity has been updated. element_size defines the scale of
* the simulation, and is typically the distance to neighbourning particles. */
-void update_courant_num(ParticleSimulationData *sim, ParticleData *pa,
+static void update_courant_num(ParticleSimulationData *sim, ParticleData *pa,
float dtime, SPHData *sphdata)
{
float relative_vel[3];
@@ -3788,8 +3788,7 @@ void update_courant_num(ParticleSimulationData *sim, ParticleData *pa,
sim->courant_num = speed * dtime / sphdata->element_size;
}
/* Update time step size to suit current conditions. */
-float update_timestep(ParticleSystem *psys, ParticleSimulationData *sim,
- float t_frac)
+static float update_timestep(ParticleSystem *psys, ParticleSimulationData *sim, float t_frac)
{
if (sim->courant_num == 0.0f)
psys->dt_frac = 1.0f;
diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c
index 6028b40756d..65fcd0d85d6 100644
--- a/source/blender/blenkernel/intern/seqmodifier.c
+++ b/source/blender/blenkernel/intern/seqmodifier.c
@@ -140,7 +140,7 @@ static void modifier_apply_threaded(ImBuf *ibuf, ImBuf *mask, modifier_apply_thr
/* **** Color Balance Modifier **** */
-void colorBalance_init_data(SequenceModifierData *smd)
+static void colorBalance_init_data(SequenceModifierData *smd)
{
ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *) smd;
int c;
@@ -154,7 +154,7 @@ void colorBalance_init_data(SequenceModifierData *smd)
}
}
-void colorBalance_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
+static void colorBalance_apply(SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
{
ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *) smd;
@@ -173,21 +173,21 @@ static SequenceModifierTypeInfo seqModifier_ColorBalance = {
/* **** Curves Modifier **** */
-void curves_init_data(SequenceModifierData *smd)
+static void curves_init_data(SequenceModifierData *smd)
{
CurvesModifierData *cmd = (CurvesModifierData *) smd;
curvemapping_set_defaults(&cmd->curve_mapping, 4, 0.0f, 0.0f, 1.0f, 1.0f);
}
-void curves_free_data(SequenceModifierData *smd)
+static void curves_free_data(SequenceModifierData *smd)
{
CurvesModifierData *cmd = (CurvesModifierData *) smd;
curvemapping_free_data(&cmd->curve_mapping);
}
-void curves_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
+static void curves_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
{
CurvesModifierData *cmd = (CurvesModifierData *) smd;
CurvesModifierData *cmd_target = (CurvesModifierData *) target;
@@ -195,8 +195,8 @@ void curves_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
curvemapping_copy_data(&cmd_target->curve_mapping, &cmd->curve_mapping);
}
-void curves_apply_threaded(int width, int height, unsigned char *rect, float *rect_float,
- unsigned char *mask_rect, float *mask_rect_float, void *data_v)
+static void curves_apply_threaded(int width, int height, unsigned char *rect, float *rect_float,
+ unsigned char *mask_rect, float *mask_rect_float, void *data_v)
{
CurveMapping *curve_mapping = (CurveMapping *) data_v;
int x, y;
@@ -249,7 +249,7 @@ void curves_apply_threaded(int width, int height, unsigned char *rect, float *re
}
}
-void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
+static void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
{
CurvesModifierData *cmd = (CurvesModifierData *) smd;
@@ -278,7 +278,7 @@ static SequenceModifierTypeInfo seqModifier_Curves = {
/* **** Hue Correct Modifier **** */
-void hue_correct_init_data(SequenceModifierData *smd)
+static void hue_correct_init_data(SequenceModifierData *smd)
{
HueCorrectModifierData *hcmd = (HueCorrectModifierData *) smd;
int c;
@@ -296,14 +296,14 @@ void hue_correct_init_data(SequenceModifierData *smd)
hcmd->curve_mapping.cur = 1;
}
-void hue_correct_free_data(SequenceModifierData *smd)
+static void hue_correct_free_data(SequenceModifierData *smd)
{
HueCorrectModifierData *hcmd = (HueCorrectModifierData *) smd;
curvemapping_free_data(&hcmd->curve_mapping);
}
-void hue_correct_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
+static void hue_correct_copy_data(SequenceModifierData *target, SequenceModifierData *smd)
{
HueCorrectModifierData *hcmd = (HueCorrectModifierData *) smd;
HueCorrectModifierData *hcmd_target = (HueCorrectModifierData *) target;
@@ -311,7 +311,7 @@ void hue_correct_copy_data(SequenceModifierData *target, SequenceModifierData *s
curvemapping_copy_data(&hcmd_target->curve_mapping, &hcmd->curve_mapping);
}
-void hue_correct_apply_threaded(int width, int height, unsigned char *rect, float *rect_float,
+static void hue_correct_apply_threaded(int width, int height, unsigned char *rect, float *rect_float,
unsigned char *mask_rect, float *mask_rect_float, void *data_v)
{
CurveMapping *curve_mapping = (CurveMapping *) data_v;
@@ -365,7 +365,7 @@ void hue_correct_apply_threaded(int width, int height, unsigned char *rect, floa
}
}
-void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
+static void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
{
HueCorrectModifierData *hcmd = (HueCorrectModifierData *) smd;
@@ -391,8 +391,8 @@ typedef struct BrightContrastThreadData {
float contrast;
} BrightContrastThreadData;
-void brightcontrast_apply_threaded(int width, int height, unsigned char *rect, float *rect_float,
- unsigned char *mask_rect, float *mask_rect_float, void *data_v)
+static void brightcontrast_apply_threaded(int width, int height, unsigned char *rect, float *rect_float,
+ unsigned char *mask_rect, float *mask_rect_float, void *data_v)
{
BrightContrastThreadData *data = (BrightContrastThreadData *) data_v;
int x, y;
@@ -460,7 +460,7 @@ void brightcontrast_apply_threaded(int width, int height, unsigned char *rect, f
}
}
-void brightcontrast_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
+static void brightcontrast_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *mask)
{
BrightContrastModifierData *bcmd = (BrightContrastModifierData *) smd;
BrightContrastThreadData data;
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index ddcba509301..5e67e094e43 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -80,10 +80,10 @@
/* UNUSED so far, may be enabled later */
/* #define USE_SMOKE_COLLISION_DM */
-#ifdef WITH_SMOKE
-
#include "smoke_API.h"
+#ifdef WITH_SMOKE
+
#ifdef _WIN32
#include <time.h>
#include <stdio.h>
@@ -148,7 +148,7 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs)
/* Stubs to use when smoke is disabled */
struct WTURBULENCE *smoke_turbulence_init(int *UNUSED(res), int UNUSED(amplify), int UNUSED(noisetype)) { return NULL; }
-struct FLUID_3D *smoke_init(int *UNUSED(res), float *UNUSED(p0)) { return NULL; }
+// struct FLUID_3D *smoke_init(int *UNUSED(res), float *UNUSED(p0)) { return NULL; }
void smoke_free(struct FLUID_3D *UNUSED(fluid)) {}
float *smoke_get_density(struct FLUID_3D *UNUSED(fluid)) { return NULL; }
void smoke_turbulence_free(struct WTURBULENCE *UNUSED(wt)) {}
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 787def5c20b..af5a8f5d59d 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -3031,30 +3031,6 @@ void txt_uncomment(Text *text)
}
}
-
-void txt_move_lines_up(struct Text *text)
-{
- TextLine *prev_line;
-
- if (!text || !text->curl || !text->sell) return;
-
- txt_order_cursors(text);
-
- prev_line = text->curl->prev;
-
- if (!prev_line) return;
-
- BLI_remlink(&text->lines, prev_line);
- BLI_insertlinkafter(&text->lines, text->sell, prev_line);
-
- txt_make_dirty(text);
- txt_clean_text(text);
-
- if (!undoing) {
- txt_undo_add_op(text, UNDO_MOVE_LINES_UP);
- }
-}
-
void txt_move_lines(struct Text *text, const int direction)
{
TextLine *line_other;
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index ee904de4af6..bdd9b424f3b 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -338,7 +338,7 @@ void colorband_table_RGBA(ColorBand *coba, float **array, int *size)
do_colorband(coba, (float)a / (float)CM_TABLE, &(*array)[a * 4]);
}
-int vergcband(const void *a1, const void *a2)
+static int vergcband(const void *a1, const void *a2)
{
const CBData *x1 = a1, *x2 = a2;
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index bd25ff8c6e6..4019eba5177 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -847,7 +847,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
* parameter.
* </p>
*/
-void flush_ffmpeg(void)
+static void flush_ffmpeg(void)
{
int outsize = 0;
int ret = 0;
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h
index 7520f09fe95..6fe5d48d06e 100644
--- a/source/blender/blenlib/BLI_math_color.h
+++ b/source/blender/blenlib/BLI_math_color.h
@@ -67,6 +67,8 @@ void rgb_to_yuv(float r, float g, float b, float *ly, float *lu, float *lv);
void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, int colorspace);
void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv);
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3]);
+void rgb_to_hsl(float r, float g, float b, float *lh, float *ls, float *ll);
+void rgb_to_hsl_v(const float rgb[3], float r_hsl[3]);
void rgb_to_hsv_compat(float r, float g, float b, float *lh, float *ls, float *lv);
void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3]);
void rgb_to_lab(float r, float g, float b, float *ll, float *la, float *lb);
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index b93597bf107..64851dbf12c 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -293,6 +293,12 @@ void rgb_to_hsl(float r, float g, float b, float *lh, float *ls, float *ll)
*ll = l;
}
+/* convenience function for now */
+void rgb_to_hsl_v(const float rgb[3], float r_hsl[3])
+{
+ rgb_to_hsl(rgb[0], rgb[1], rgb[2], &r_hsl[0], &r_hsl[1], &r_hsl[2]);
+}
+
void rgb_to_hsv_compat(float r, float g, float b, float *lh, float *ls, float *lv)
{
float orig_h = *lh;
diff --git a/source/blender/blenlib/intern/md5.c b/source/blender/blenlib/intern/md5.c
index a521d0e523b..4a09afe2e3d 100644
--- a/source/blender/blenlib/intern/md5.c
+++ b/source/blender/blenlib/intern/md5.c
@@ -2,6 +2,8 @@
* \ingroup imbuf
*/
+#include "BLI_md5.h" /* own include */
+
/* md5.c - Functions to compute MD5 message digest of files or memory blocks
according to the definition of MD5 in RFC 1321 from April 1992.
Copyright (C) 1995 Software Foundation, Inc.
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c
index 22597c9f8e6..d3d8d371f60 100644
--- a/source/blender/blenlib/intern/pbvh.c
+++ b/source/blender/blenlib/intern/pbvh.c
@@ -487,7 +487,7 @@ static void build_leaf(PBVH *bvh, int node_index, BBC *prim_bbc,
/* Return zero if all primitives in the node can be drawn with the
* same material (including flat/smooth shading), non-zerootherwise */
-int leaf_needs_material_split(PBVH *bvh, int offset, int count)
+static int leaf_needs_material_split(PBVH *bvh, int offset, int count)
{
int i, prim;
diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c
index 80a4da5cace..3030e54eb78 100644
--- a/source/blender/blenlib/intern/voronoi.c
+++ b/source/blender/blenlib/intern/voronoi.c
@@ -480,7 +480,7 @@ static void voronoi_removeParabola(VoronoiProcess *process, VoronoiEvent *event)
voronoi_checkCircle(process, p2);
}
-void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola)
+static void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola)
{
float mx;
@@ -503,12 +503,12 @@ void voronoi_finishEdge(VoronoiProcess *process, VoronoiParabola *parabola)
MEM_freeN(parabola);
}
-void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_coord)
+static void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_coord)
{
const float corners[4][2] = {{0.0f, 0.0f},
- {width - 1, 0.0f},
- {width - 1, height - 1},
- {0.0f, height - 1}};
+ {width - 1, 0.0f},
+ {width - 1, height - 1},
+ {0.0f, height - 1}};
int i;
if (IN_RANGE_INCL(coord[0], 0, width - 1) && IN_RANGE_INCL(coord[1], 0, height - 1)) {
@@ -541,7 +541,7 @@ void voronoi_clampEdgeVertex(int width, int height, float *coord, float *other_c
}
}
-void voronoi_clampEdges(ListBase *edges, int width, int height, ListBase *clamped_edges)
+static void voronoi_clampEdges(ListBase *edges, int width, int height, ListBase *clamped_edges)
{
VoronoiEdge *edge;
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index f0bf7e99758..16a4d8d46ec 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -244,6 +244,9 @@ void *BLO_library_read_struct(struct FileData *fd, struct BHead *bh, const char
BlendFileData *blo_read_blendafterruntime(int file, const char *name, int actualsize, struct ReportList *reports);
+/* internal function but we need to expose it */
+void blo_lib_link_screen_restore(struct Main *newmain, struct bScreen *curscreen, struct Scene *curscene);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index bfcb935290d..683e751b6b9 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5438,7 +5438,7 @@ static void lib_link_clipboard_restore(Main *newmain)
/* called from kernel/blender.c */
/* used to link a file (without UI) to the current UI */
/* note that it assumes the old pointers in UI are still valid, so old Main is not freed */
-void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
+void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
{
wmWindow *win;
wmWindowManager *wm;
@@ -6683,7 +6683,7 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree)
}
}
-void do_versions_image_settings_2_60(Scene *sce)
+static void do_versions_image_settings_2_60(Scene *sce)
{
/* note: rd->subimtype is moved into individual settings now and no longer
* exists */
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index b10556af04e..84f6cb27b3b 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -484,7 +484,7 @@ void dummy_exec(BMesh *bm, BMOperator *op)
/* multiply vertex edge angle by face angle
* this means we are not left with sharp corners between _almost_ planer faces
* convert angles [0-PI/2] -> [0-1], multiply together, then convert back to radians. */
-float bm_vert_edge_face_angle(BMVert *v)
+static float bm_vert_edge_face_angle(BMVert *v)
{
const float angle = BM_vert_calc_edge_angle(v);
/* note: could be either edge, it doesn't matter */
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c
index 87ba216d5cf..d97d901777c 100644
--- a/source/blender/bmesh/operators/bmo_hull.c
+++ b/source/blender/bmesh/operators/bmo_hull.c
@@ -44,6 +44,8 @@
#include "bmesh.h"
+#include "intern/bmesh_operators_private.h" /* own include */
+
#define HULL_EPSILON_FLT 0.0001f
/* values above 0.0001 cause errors, see below for details, don't increase
* without checking against bug [#32027] */
@@ -628,7 +630,7 @@ static void hull_tag_unused(BMesh *bm, BMOperator *op)
}
}
-void hull_tag_holes(BMesh *bm, BMOperator *op)
+static void hull_tag_holes(BMesh *bm, BMOperator *op)
{
BMIter iter;
BMOIter oiter;
diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c
index e1a5ef9f905..0caa766c0f0 100644
--- a/source/blender/bmesh/operators/bmo_removedoubles.c
+++ b/source/blender/bmesh/operators/bmo_removedoubles.c
@@ -487,7 +487,7 @@ void bmo_collapse_uvs_exec(BMesh *bm, BMOperator *op)
}
}
-void bmesh_find_doubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, const char *targetmapname)
+static void bmesh_find_doubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, const char *targetmapname)
{
BMOIter oiter;
BMVert *v, *v2;
diff --git a/source/blender/bmesh/operators/bmo_wireframe.c b/source/blender/bmesh/operators/bmo_wireframe.c
index e0dc5cf48c7..d572a1c5863 100644
--- a/source/blender/bmesh/operators/bmo_wireframe.c
+++ b/source/blender/bmesh/operators/bmo_wireframe.c
@@ -34,7 +34,7 @@
#include "intern/bmesh_operators_private.h" /* own include */
-BMLoop *bm_edge_tag_faceloop(BMEdge *e)
+static BMLoop *bm_edge_tag_faceloop(BMEdge *e)
{
BMLoop *l, *l_first;
diff --git a/source/blender/bmesh/tools/BME_bevel.c b/source/blender/bmesh/tools/BME_bevel.c
index 91527313972..98f270abd16 100644
--- a/source/blender/bmesh/tools/BME_bevel.c
+++ b/source/blender/bmesh/tools/BME_bevel.c
@@ -66,7 +66,7 @@
/* ------- Bevel code starts here -------- */
-BME_TransData_Head *BME_init_transdata(int bufsize)
+static BME_TransData_Head *BME_init_transdata(int bufsize)
{
BME_TransData_Head *td;
@@ -85,9 +85,9 @@ void BME_free_transdata(BME_TransData_Head *td)
MEM_freeN(td);
}
-BME_TransData *BME_assign_transdata(BME_TransData_Head *td, BMesh *bm, BMVert *v,
- float *co, float *org, float *vec, float *loc,
- float factor, float weight, float maxfactor, float *max)
+static BME_TransData *BME_assign_transdata(BME_TransData_Head *td, BMesh *bm, BMVert *v,
+ float *co, float *org, float *vec, float *loc,
+ float factor, float weight, float maxfactor, float *max)
{
BME_TransData *vtd;
int is_new = 0;
@@ -140,7 +140,7 @@ BME_TransData *BME_get_transdata(BME_TransData_Head *td, BMVert *v)
}
/* a hack (?) to use the transdata memarena to allocate floats for use with the max limits */
-float *BME_new_transdata_float(BME_TransData_Head *td)
+static float *BME_new_transdata_float(BME_TransData_Head *td)
{
return BLI_memarena_alloc(td->ma, sizeof(float));
}
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 8cd8cfaea51..5e0459bea90 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1086,7 +1086,7 @@ short delete_keyframe(ReportList *reports, ID *id, bAction *act, const char grou
* The flag argument is used for special settings that alter the behavior of
* the keyframe deletion. These include the quick refresh options.
*/
-short clear_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, short UNUSED(flag))
+static short clear_keyframe(ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, short UNUSED(flag))
{
AnimData *adt = BKE_animdata_from_id(id);
PointerRNA id_ptr, ptr;
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index e9424a08b0c..b1a613bef5d 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -74,6 +74,7 @@
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_object.h"
+#include "ED_util.h" /* clipboard */
#include "UI_interface.h"
#include "UI_resources.h"
@@ -1049,7 +1050,7 @@ static void pose_copy_menu(Scene *scene)
/* Global copy/paste buffer for pose - cleared on start/end session + before every copy operation */
static bPose *g_posebuf = NULL;
-void free_posebuf(void)
+void ED_clipboard_posebuf_free(void)
{
if (g_posebuf) {
bPoseChannel *pchan;
@@ -1225,7 +1226,7 @@ static int pose_copy_exec(bContext *C, wmOperator *op)
}
/* free existing pose buffer */
- free_posebuf();
+ ED_clipboard_posebuf_free();
/* sets chan->flag to POSE_KEY if bone selected, then copy those bones to the buffer */
set_pose_keys(ob);
diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h
index 8ebf932fd96..dc40b687dfd 100644
--- a/source/blender/editors/include/ED_mask.h
+++ b/source/blender/editors/include/ED_mask.h
@@ -53,14 +53,14 @@ void ED_keymap_mask(struct wmKeyConfig *keyconf);
void ED_operatormacros_mask(void);
/* mask_draw.c */
-void ED_mask_draw(const bContext *C, const char draw_flag, const char draw_type);
+void ED_mask_draw(const struct bContext *C, const char draw_flag, const char draw_type);
void ED_mask_draw_region(struct Mask *mask, struct ARegion *ar,
const char draw_flag, const char draw_type,
const int width_i, const int height_i,
const float aspx, const float aspy,
const short do_scale_applied, const short do_post_draw,
float stabmat[4][4],
- const bContext *C);
+ const struct bContext *C);
void ED_mask_draw_frames(struct Mask *mask, struct ARegion *ar, const int cfra, const int sfra, const int efra);
diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h
index 7807f06594e..84fd5332316 100644
--- a/source/blender/editors/include/ED_sequencer.h
+++ b/source/blender/editors/include/ED_sequencer.h
@@ -36,7 +36,7 @@ void ED_sequencer_deselect_all(struct Scene *scene);
int ED_space_sequencer_maskedit_mask_poll(struct bContext *C);
int ED_space_sequencer_check_show_maskedit(struct SpaceSeq *sseq, struct Scene *scene);
-int ED_space_sequencer_maskedit_poll(bContext *C);
+int ED_space_sequencer_maskedit_poll(struct bContext *C);
void ED_operatormacros_sequencer(void);
diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h
index e10f049d0bc..d0ca079b8c9 100644
--- a/source/blender/editors/include/ED_util.h
+++ b/source/blender/editors/include/ED_util.h
@@ -84,6 +84,8 @@ void crazyspace_set_quats_mesh(struct Mesh *me, float *origcos, float *mappedcos
int sculpt_get_first_deform_matrices(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]);
void crazyspace_build_sculpt(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]);
+/* cut-paste buffer free */
+void ED_clipboard_posebuf_free(void);
/* ************** XXX OLD CRUFT WARNING ************* */
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index e8b8959fd43..bf77e605d6e 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -906,7 +906,7 @@ static void UI_OT_editsource(wmOperatorType *ot)
* Note: this includes utility functions and button matching checks.
* this only works in conjunction with a py operator! */
-void edittranslation_find_po_file(const char *root, const char *uilng, char *path, const size_t maxlen)
+static void edittranslation_find_po_file(const char *root, const char *uilng, char *path, const size_t maxlen)
{
char tstr[32]; /* Should be more than enough! */
/* First, full lang code. */
diff --git a/source/blender/editors/io/io_ops.c b/source/blender/editors/io/io_ops.c
index d2b0ddd4e7e..f2a0532932d 100644
--- a/source/blender/editors/io/io_ops.c
+++ b/source/blender/editors/io/io_ops.c
@@ -34,6 +34,8 @@
#include "WM_types.h"
#include "WM_api.h"
+#include "io_ops.h" /* own include */
+
void ED_operatortypes_io(void)
{
#ifdef WITH_COLLADA
diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c
index 6124947e3b9..561ad004a1d 100644
--- a/source/blender/editors/mask/mask_editaction.c
+++ b/source/blender/editors/mask/mask_editaction.c
@@ -48,6 +48,7 @@
#include "ED_anim_api.h"
#include "ED_keyframes_edit.h"
+#include "ED_mask.h" /* own include */
/* ***************************************** */
/* NOTE ABOUT THIS FILE:
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index d90735ca5ac..d73bbbabf84 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -198,7 +198,7 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit,
/********************* Add Object Operator ********************/
-void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(scene), struct PointerRNA *ptr)
+static void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(scene), struct PointerRNA *ptr)
{
RNA_struct_idprops_unset(ptr, "rotation");
}
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index f95b07bd71e..099d868a0ad 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -782,7 +782,7 @@ static void fluidbake_endjob(void *customdata)
}
}
-int runSimulationCallback(void *data, int status, int frame)
+static int runSimulationCallback(void *data, int status, int frame)
{
FluidBakeJob *fb = (FluidBakeJob *)data;
elbeemSimulationSettings *settings = fb->settings;
@@ -1095,7 +1095,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
return 1;
}
-void fluidsimFreeBake(Object *UNUSED(ob))
+static void UNUSED_FUNCTION(fluidsimFreeBake)(Object *UNUSED(ob))
{
/* not implemented yet */
}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 7c3f376df91..101235e9c99 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -5257,7 +5257,7 @@ void PAINT_OT_image_paint(wmOperatorType *ot)
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
}
-int get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
+static int get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy)
{
RegionView3D *rv3d = CTX_wm_region_view3d(C);
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index cc71be4938e..39a95300d5d 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -602,7 +602,7 @@ static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *p
}
}
-void paint_partial_visibility_keys(wmKeyMap *keymap)
+static void paint_partial_visibility_keys(wmKeyMap *keymap)
{
wmKeyMapItem *kmi;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index ba440e98290..fd5044afc44 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -257,7 +257,7 @@ static void do_shared_vertex_tesscol(Mesh *me)
MEM_freeN(scolmain);
}
-void do_shared_vertexcol(Mesh *me, int do_tessface)
+static void do_shared_vertexcol(Mesh *me, int do_tessface)
{
const int use_face_sel = (me->editflag & ME_EDIT_PAINT_MASK);
MPoly *mp;
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index fdce8ec04a4..0bcccd9479c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -156,8 +156,8 @@ typedef struct Temp_UvData {
-void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float mouse_coord[2],
- float alpha, float radius, float aspectRatio)
+static void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float mouse_coord[2],
+ float alpha, float radius, float aspectRatio)
{
Temp_UVData *tmp_uvdata;
float diff[2];
diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c
index 91501971d9d..7b070fde6ba 100644
--- a/source/blender/editors/space_clip/clip_graph_draw.c
+++ b/source/blender/editors/space_clip/clip_graph_draw.c
@@ -94,7 +94,7 @@ static void tracking_segment_point_cb(void *UNUSED(userdata), MovieTrackingTrack
glVertex2f(scene_framenr, val);
}
-void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int coord)
+static void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int coord)
{
static float colors[2][3] = {{1.0f, 0.0f, 0.0f},
{0.0f, 1.0f, 0.0f}};
@@ -116,7 +116,7 @@ void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int co
glBegin(GL_LINE_STRIP);
}
-void tracking_segment_end_cb(void *UNUSED(userdata))
+static void tracking_segment_end_cb(void *UNUSED(userdata))
{
glEnd();
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index 71dcd326887..f48d4e8d946 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -130,7 +130,7 @@ static void find_nearest_tracking_segment_cb(void *userdata, MovieTrackingTrack
copy_v2_v2(data->prev_co, co);
}
-void find_nearest_tracking_segment_end_cb(void *userdata)
+static void find_nearest_tracking_segment_end_cb(void *userdata)
{
MouseSelectUserData *data = userdata;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 86722c5158e..52a2bf22d4b 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -191,7 +191,7 @@ int space_image_main_area_poll(bContext *C)
}
/* For IMAGE_OT_curves_point_set to avoid sampling when in uv smooth mode or editmode */
-int space_image_main_area_not_uv_brush_poll(bContext *C)
+static int space_image_main_area_not_uv_brush_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 775dd5445c3..2861d17b350 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1170,7 +1170,7 @@ static int nlaedit_bake_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void NLA_OT_bake(wmOperatorType *ot)
+static void NLA_OT_bake(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Bake Strips";
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 5ebcef1d9a7..4c46f5c4c62 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -892,7 +892,7 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN
}
}
-void node_uifunc_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_uifunc_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, NULL);
}
@@ -2387,7 +2387,7 @@ static void node_composit_buts_bokehblur(uiLayout *layout, bContext *UNUSED(C),
uiItemR(layout, ptr, "blur_max", 0, NULL, ICON_NONE);
}
-void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
+static void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
{
// node_composit_backdrop_canvas(snode, backdrop, node, x, y);
if (node->custom1 == 0) {
@@ -2407,7 +2407,7 @@ void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNode *nod
}
}
-void node_composit_backdrop_boxmask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
+static void node_composit_backdrop_boxmask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
{
NodeBoxMask *boxmask = node->storage;
const float backdropWidth = backdrop->x;
@@ -2448,7 +2448,7 @@ void node_composit_backdrop_boxmask(SpaceNode *snode, ImBuf *backdrop, bNode *no
glEnd();
}
-void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
+static void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
{
NodeEllipseMask *ellipsemask = node->storage;
const float backdropWidth = backdrop->x;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 1522528a8ac..0601d7c105f 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -44,6 +44,7 @@
#include "BKE_screen.h"
#include "BKE_node.h"
+#include "ED_space_api.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_node.h"
diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c
index aa6bacf8836..dc5cf98f515 100644
--- a/source/blender/editors/space_sequencer/sequencer_ops.c
+++ b/source/blender/editors/space_sequencer/sequencer_ops.c
@@ -43,6 +43,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_sequencer.h"
#include "ED_markers.h"
#include "ED_transform.h" /* transform keymap */
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index d500bef4f02..f5a13e4efb7 100644
--- a/source/blender/editors/space_sequencer/sequencer_view.c
+++ b/source/blender/editors/space_sequencer/sequencer_view.c
@@ -202,7 +202,7 @@ static int sample_cancel(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-int sample_poll(bContext *C)
+static int sample_poll(bContext *C)
{
return BKE_sequencer_editing_get(CTX_data_scene(C), FALSE) != NULL;
}
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index da93e07748a..6e42380fbce 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -179,7 +179,7 @@ static DMDrawOption draw_mesh_face_select__drawFaceOptsInv(void *userData, int i
return DM_DRAW_OPTION_SKIP;
}
-void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
+static void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm)
{
drawMeshFaceSelect_userData data;
@@ -772,8 +772,8 @@ static int compareDrawOptionsEm(void *userData, int cur_index, int next_index)
return 1;
}
-void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d,
- Object *ob, DerivedMesh *dm, const int draw_flags)
+static void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d,
+ Object *ob, DerivedMesh *dm, const int draw_flags)
{
Mesh *me = ob->data;
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 5712144caf1..166a62562fd 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -646,7 +646,7 @@ static void do_lasso_select_meta(ViewContext *vc, int mcords[][2], short moves,
}
}
-int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend)
+static int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend)
{
Mesh *me;
MVert *mvert;
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 5008c35e46a..06da1c8bfea 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -2836,7 +2836,7 @@ static int uv_lasso_select_exec(bContext *C, wmOperator *op)
return OPERATOR_PASS_THROUGH;
}
-void UV_OT_select_lasso(wmOperatorType *ot)
+static void UV_OT_select_lasso(wmOperatorType *ot)
{
ot->name = "Lasso Select UV";
ot->description = "Select UVs using lasso selection";
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 5ba08f1dd73..8acceb77b36 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -106,7 +106,7 @@ typedef struct DitherContext {
float f;
} DitherContext;
-DitherContext *create_dither_context(int w, float factor)
+static DitherContext *create_dither_context(int w, float factor)
{
DitherContext *di;
int i;
diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c
index 6b960a18277..7a8f8fcc752 100644
--- a/source/blender/imbuf/intern/indexer_dv.c
+++ b/source/blender/imbuf/intern/indexer_dv.c
@@ -385,7 +385,7 @@ static void indexer_dv_delete(anim_index_builder *idx)
MEM_freeN(This);
}
-void IMB_indexer_dv_new(anim_index_builder *idx)
+static void UNUSED_FUNCTION(IMB_indexer_dv_new)(anim_index_builder *idx)
{
indexer_dv_context *rv = MEM_callocN(
sizeof(indexer_dv_context), "index_dv builder context");
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 6d1e3c16631..833671e3f2f 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -225,7 +225,7 @@ static int isqtime(const char *name)
static char ffmpeg_last_error[1024];
-void ffmpeg_log_callback(void *ptr, int level, const char *format, va_list arg)
+static void ffmpeg_log_callback(void *ptr, int level, const char *format, va_list arg)
{
if (ELEM(level, AV_LOG_FATAL, AV_LOG_ERROR)) {
size_t n = BLI_vsnprintf(ffmpeg_last_error, sizeof(ffmpeg_last_error), format, arg);
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 22b1e33e2a6..25a2a61d8e3 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -185,7 +185,7 @@ static float get_ob2ob_distance(const Object *ob, const Object *obr)
/**
* Maps distances to weights, with an optional "smoothing" mapping.
*/
-void do_map(float *weights, const int nidx, const float min_d, const float max_d, short mode)
+static void do_map(float *weights, const int nidx, const float min_d, const float max_d, short mode)
{
const float range_inv = 1.0f / (max_d - min_d); /* invert since multiplication is faster */
unsigned int i = nidx;
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index fdbe82efeda..59a4d6818c8 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -349,7 +349,7 @@ void node_group_edit_clear(bNode *node)
nodeGroupEditClear(inode);
}
-void node_group_link(bNodeTree *ntree, bNodeSocket *sock, int in_out)
+static void UNUSED_FUNCTION(node_group_link)(bNodeTree *ntree, bNodeSocket *sock, int in_out)
{
node_group_expose_socket(ntree, sock, in_out);
}
diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h
index 7d8c4ce232c..e938e6fc419 100644
--- a/source/blender/nodes/texture/node_texture_util.h
+++ b/source/blender/nodes/texture/node_texture_util.h
@@ -61,6 +61,8 @@
#include "node_util.h"
+#include "NOD_texture.h"
+
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_rand.h"
diff --git a/source/blender/python/bmesh/bmesh_py_ops.c b/source/blender/python/bmesh/bmesh_py_ops.c
index c16b1fb901f..fb5b94249e6 100644
--- a/source/blender/python/bmesh/bmesh_py_ops.c
+++ b/source/blender/python/bmesh/bmesh_py_ops.c
@@ -42,6 +42,8 @@
#include "bmesh.h"
+#include "bmesh_py_ops.h" /* own include */
+
#include "bmesh_py_types.h"
#include "bmesh_py_utils.h" /* own include */
@@ -69,7 +71,7 @@ typedef struct {
const char *opname;
} BPy_BMeshOpFunc;
-PyObject *bpy_bmesh_op_CreatePyObject(const char *opname)
+static PyObject *bpy_bmesh_op_CreatePyObject(const char *opname)
{
BPy_BMeshOpFunc *self = PyObject_New(BPy_BMeshOpFunc, &bmesh_op_Type);
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index 05583e133dc..604166eed3c 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -71,6 +71,7 @@ set(SRC
bpy_app_handlers.h
bpy_driver.h
bpy_intern_string.h
+ bpy_library.h
bpy_operator.h
bpy_operator_wrap.h
bpy_props.h
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 0f0250fb8d5..f2222825c42 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -37,6 +37,7 @@
#include "bpy_rna.h"
#include "bpy_app.h"
#include "bpy_props.h"
+#include "bpy_library.h"
#include "bpy_operator.h"
#include "BLI_path_util.h"
@@ -238,7 +239,6 @@ static PyObject *bpy_import_test(const char *modname)
void BPy_init_modules(void)
{
extern BPy_StructRNA *bpy_context_module;
- extern int bpy_lib_init(PyObject *);
PointerRNA ctx_ptr;
PyObject *mod;
@@ -273,7 +273,7 @@ void BPy_init_modules(void)
PyModule_AddObject(mod, "StructMetaPropGroup", (PyObject *)&pyrna_struct_meta_idprop_Type);
/* needs to be first so bpy_types can run */
- bpy_lib_init(mod);
+ BPY_library_module(mod);
bpy_import_test("bpy_types");
PyModule_AddObject(mod, "data", BPY_rna_module()); /* imports bpy_types by running this */
diff --git a/source/blender/python/intern/bpy.h b/source/blender/python/intern/bpy.h
index 2412d65aa21..fe877d161ff 100644
--- a/source/blender/python/intern/bpy.h
+++ b/source/blender/python/intern/bpy.h
@@ -23,10 +23,13 @@
* \ingroup pythonintern
*/
-
+#ifndef __BPY_H__
+
void BPy_init_modules(void);
extern PyObject *bpy_package_py;
/* bpy_interface_atexit.c */
void BPY_atexit_register(void);
void BPY_atexit_unregister(void);
+
+#endif /* __BPY_H__ */
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c
index 44bba4c098f..68fd9a99712 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.c
+++ b/source/blender/python/intern/bpy_app_ffmpeg.c
@@ -26,11 +26,8 @@
#include <Python.h>
#include "BLI_utildefines.h"
-#include "BLI_callbacks.h"
-#include "RNA_types.h"
-#include "RNA_access.h"
-#include "bpy_rna.h"
+#include "bpy_app_ffmpeg.h"
#ifdef WITH_FFMPEG
#include <libavcodec/avcodec.h>
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index bab5a83a6ed..4d7f2080bbc 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -37,6 +37,8 @@
#include "bpy_rna.h"
#include "bpy_app_handlers.h"
+#include "BPY_extern.h"
+
void bpy_app_generic_callback(struct Main *main, struct ID *id, void *arg);
static PyTypeObject BlenderAppCbType;
diff --git a/source/blender/python/intern/bpy_interface_atexit.c b/source/blender/python/intern/bpy_interface_atexit.c
index db97d361c73..13d8cedf907 100644
--- a/source/blender/python/intern/bpy_interface_atexit.c
+++ b/source/blender/python/intern/bpy_interface_atexit.c
@@ -32,6 +32,7 @@
#include <Python.h>
#include "bpy_util.h"
+#include "bpy.h" /* own include */
#include "WM_api.h"
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c
index 40ec8136eb7..7571fe0f75e 100644
--- a/source/blender/python/intern/bpy_library.c
+++ b/source/blender/python/intern/bpy_library.c
@@ -55,6 +55,7 @@
#include "DNA_space_types.h" /* FILE_LINK, FILE_RELPATH */
#include "bpy_util.h"
+#include "bpy_library.h"
#ifdef USE_RNA_DATABLOCKS
# include "bpy_rna.h"
@@ -426,7 +427,7 @@ static PyObject *bpy_lib_dir(BPy_Library *self)
}
-int bpy_lib_init(PyObject *mod_par)
+int BPY_library_module(PyObject *mod_par)
{
static PyMethodDef load_meth = {"load", (PyCFunction)bpy_lib_load,
METH_STATIC | METH_VARARGS | METH_KEYWORDS,
diff --git a/source/blender/python/intern/bpy_library.h b/source/blender/python/intern/bpy_library.h
new file mode 100644
index 00000000000..1b68007b704
--- /dev/null
+++ b/source/blender/python/intern/bpy_library.h
@@ -0,0 +1,32 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Campbell Barton
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/python/intern/bpy_library.h
+ * \ingroup pythonintern
+ */
+
+#ifndef __BPY_LIBRARY_H__
+#define __BPY_LIBRARY_H__
+
+int BPY_library_module(PyObject *);
+
+#endif /* __BPY_LIBRARY_H__ */
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 4ae8e821298..8ec8c4c41ba 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -37,6 +37,8 @@
#include "RNA_types.h"
+#include "BPY_extern.h"
+
#include "bpy_rna.h"
#include "bpy_rna_anim.h"
#include "bpy_props.h"
@@ -45,7 +47,7 @@
#include "bpy_intern_string.h"
#ifdef USE_PYRNA_INVALIDATE_WEAKREF
-#include "MEM_guardedalloc.h"
+# include "MEM_guardedalloc.h"
#endif
#include "BLI_dynstr.h"
@@ -55,7 +57,7 @@
#include "BLI_utildefines.h"
#ifdef USE_PYRNA_INVALIDATE_WEAKREF
-#include "BLI_ghash.h"
+# include "BLI_ghash.h"
#endif
#include "RNA_enum_types.h"
@@ -78,7 +80,7 @@
#include "../generic/py_capi_utils.h"
#ifdef WITH_INTERNATIONAL
-#include "BLF_translation.h"
+# include "BLF_translation.h"
#endif
#define USE_PEDANTIC_WRITE
@@ -2150,10 +2152,10 @@ static PyObject *pyrna_prop_collection_subscript_str(BPy_PropertyRNA *self, cons
* -1: exception set
* 0: not found
* 1: found */
-int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyObject *key,
- const char *err_prefix, const short err_not_found,
- PointerRNA *r_ptr
- )
+static int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyObject *key,
+ const char *err_prefix, const short err_not_found,
+ PointerRNA *r_ptr
+ )
{
char *keyname;
@@ -5908,7 +5910,7 @@ PyTypeObject pyrna_prop_collection_iter_Type = {
NULL
};
-PyObject *pyrna_prop_collection_iter_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
+static PyObject *pyrna_prop_collection_iter_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
{
BPy_PropertyCollectionIterRNA *self = PyObject_New(BPy_PropertyCollectionIterRNA, &pyrna_prop_collection_iter_Type);
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index 113367788b6..1fb4b116872 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -175,6 +175,10 @@ PyObject *BPY_rna_types(void);
PyObject *pyrna_struct_CreatePyObject(PointerRNA *ptr);
PyObject *pyrna_prop_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop);
+/* extern'd by other modules which don't deal closely with RNA */
+PyObject *pyrna_id_CreatePyObject(struct ID *id);
+int pyrna_id_FromPyObject(PyObject *obj, struct ID **id);
+
/* operators also need this to set args */
int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, int all_args, const char *error_prefix);
PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop);
diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c
index 7e2da5b1818..69fe0c48a41 100644
--- a/source/blender/python/intern/gpu.c
+++ b/source/blender/python/intern/gpu.c
@@ -74,8 +74,7 @@ static struct PyModuleDef gpumodule = {
NULL, NULL, NULL, NULL, NULL
};
-PyMODINIT_FUNC
-PyInit_gpu(void)
+static PyObject *PyInit_gpu(void)
{
PyObject *m;
diff --git a/source/blender/python/intern/stubs.c b/source/blender/python/intern/stubs.c
index 50d2e88f210..e0508359e13 100644
--- a/source/blender/python/intern/stubs.c
+++ b/source/blender/python/intern/stubs.c
@@ -28,12 +28,15 @@
* \ingroup pythonintern
*/
+#include "BLI_utildefines.h"
+
+#include "BPY_extern.h"
/* python, will come back */
//void BPY_script_exec(void) {}
//void BPY_python_start(void) {}
//void BPY_text_free_code(void) {}
-void BPY_pyconstraint_exec(void) {}
-void BPY_pyconstraint_target(void) {}
-int BPY_is_pyconstraint(void) { return 0;}
-void BPY_pyconstraint_update(void) {}
+void BPY_pyconstraint_exec(struct bPythonConstraint *UNUSED(con), struct bConstraintOb *UNUSED(cob), struct ListBase *UNUSED(targets)) {}
+void BPY_pyconstraint_target(struct bPythonConstraint *UNUSED(con), struct bConstraintTarget *UNUSED(ct)) {}
+int BPY_is_pyconstraint(struct Text *UNUSED(text)) { return 0;}
+void BPY_pyconstraint_update(struct Object *UNUSED(owner), struct bConstraint *UNUSED(con)) {}
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h
index e4ee19d8ed2..e873111e6bf 100644
--- a/source/blender/render/intern/include/zbuf.h
+++ b/source/blender/render/intern/include/zbuf.h
@@ -139,5 +139,10 @@ void zbufclipwire(struct ZSpan *zspan, int obi, int zvlnr, int ec,
void zbuf_make_winmat(Render *re, float winmat[][4]);
void zbuf_render_project(float winmat[][4], const float co[3], float ho[4]);
+/* sould not really be exposed, bad! */
+void hoco_to_zco(ZSpan *zspan, float zco[3], const float hoco[4]);
+void zspan_scanconvert_strand(ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float, float) );
+void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, const float ho1[4], const float ho2[4]);
+
#endif
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 2d694a3e274..51e5b30a31c 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -117,6 +117,7 @@
#include "zbuf.h"
#include "sunsky.h"
+#include "RE_render_ext.h"
/* 10 times larger than normal epsilon, test it on default nurbs sphere with ray_transp (for quad detection) */
/* or for checking vertex normal flips */
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index cbe8cc81451..4d3b9c2493e 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -82,6 +82,8 @@
#include "renderdatabase.h" /* needed for UV */
+#include "RE_render_ext.h"
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
/* only to be used here in this file, it's for speed */
@@ -1259,18 +1261,19 @@ int multitex_nodes(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
}
/* this is called for surface shading */
-int multitex_mtex(ShadeInput *shi, MTex *mtex, float *texvec, float *dxt, float *dyt, TexResult *texres)
+static int multitex_mtex(ShadeInput *shi, MTex *mtex, float *texvec, float *dxt, float *dyt, TexResult *texres)
{
- Tex *tex= mtex->tex;
+ Tex *tex = mtex->tex;
if (tex->use_nodes && tex->nodetree) {
/* stupid exception here .. but we have to pass shi and mtex to
* textures nodes for 2d mapping and color management for images */
return ntreeTexExecTree(tex->nodetree, texres, texvec, dxt, dyt, shi->osatex, shi->thread,
- tex, mtex->which_output, R.r.cfra, (R.r.scemode & R_TEXNODE_PREVIEW) != 0, shi, mtex);
+ tex, mtex->which_output, R.r.cfra, (R.r.scemode & R_TEXNODE_PREVIEW) != 0, shi, mtex);
}
- else
+ else {
return multitex(mtex->tex, texvec, dxt, dyt, shi->osatex, texres, shi->thread, mtex->which_output);
+ }
}
/* Warning, if the texres's values are not declared zero, check the return value to be sure
diff --git a/source/blender/render/intern/source/strand.c b/source/blender/render/intern/source/strand.c
index 51be519d5b8..dc3225b7f09 100644
--- a/source/blender/render/intern/source/strand.c
+++ b/source/blender/render/intern/source/strand.c
@@ -61,11 +61,6 @@
#include "strand.h"
#include "zbuf.h"
-/* to be removed */
-void hoco_to_zco(ZSpan *zspan, float *zco, float *hoco);
-void zspan_scanconvert_strand(ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void (*func)(void *, int, int, float, float, float) );
-void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, float *ho1, float *ho2);
-
/* *************** */
static float strand_eval_width(Material *ma, float strandco)
diff --git a/source/blender/render/intern/source/texture_ocean.c b/source/blender/render/intern/source/texture_ocean.c
index 8c9df496dd6..b2bc635cba7 100644
--- a/source/blender/render/intern/source/texture_ocean.c
+++ b/source/blender/render/intern/source/texture_ocean.c
@@ -42,6 +42,8 @@
#include "texture.h"
+#include "texture_ocean.h" /* own include */
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index de9572bf57b..bf6962d0087 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -3476,7 +3476,7 @@ void zbuffer_abuf_shadow(Render *re, LampRen *lar, float winmat[][4], APixstr *A
/* speed pointer NULL = sky, we clear */
/* else if either alpha is full or no solid was filled in: copy speed */
/* else fill in minimum speed */
-void add_transp_speed(RenderLayer *rl, int offset, float *speed, float alpha, intptr_t *rdrect)
+static void add_transp_speed(RenderLayer *rl, int offset, float speed[4], float alpha, intptr_t *rdrect)
{
RenderPass *rpass;
@@ -3525,7 +3525,7 @@ static void add_transp_obindex(RenderLayer *rl, int offset, Object *ob)
/* ONLY OSA! merge all shaderesult samples to one */
/* target should have been cleared */
-void merge_transp_passes(RenderLayer *rl, ShadeResult *shr)
+static void merge_transp_passes(RenderLayer *rl, ShadeResult *shr)
{
RenderPass *rpass;
float weight= 1.0f/((float)R.osa);
@@ -3627,7 +3627,7 @@ void merge_transp_passes(RenderLayer *rl, ShadeResult *shr)
}
-void add_transp_passes(RenderLayer *rl, int offset, ShadeResult *shr, float alpha)
+static void add_transp_passes(RenderLayer *rl, int offset, ShadeResult *shr, float alpha)
{
RenderPass *rpass;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index ff7c8cd2ea7..1d509a87ffe 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -361,6 +361,8 @@ void WM_progress_clear(struct wmWindow *win);
/* Draw (for screenshot) */
void WM_redraw_windows(struct bContext *C);
+void WM_main_playanim(int argc, const char **argv);
+
/* debugging only, convenience function to write on crash */
int write_crash_blend(void);
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 8c2272e4707..71d6cf557e1 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -338,7 +338,6 @@ static void free_openrecent(void)
extern void free_anim_copybuf(void);
extern void free_anim_drivers_copybuf(void);
extern void free_fmodifiers_copybuf(void);
-extern void free_posebuf(void);
#if WIN32
/* Read console events until there is a key event. Also returns on any error. */
@@ -421,7 +420,7 @@ void WM_exit_ext(bContext *C, const short do_python)
free_anim_copybuf();
free_anim_drivers_copybuf();
free_fmodifiers_copybuf();
- free_posebuf();
+ ED_clipboard_posebuf_free();
BKE_node_clipboard_clear();
BLF_exit();
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 0259146a9d3..d3d90970b0c 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1693,7 +1693,7 @@ static void WM_OT_open_mainfile(wmOperatorType *ot)
/* **************** link/append *************** */
-int wm_link_append_poll(bContext *C)
+static int wm_link_append_poll(bContext *C)
{
if (WM_operator_winactive(C)) {
/* linking changes active object which is pretty useful in general,
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index e3867c0a32a..6d245730795 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -72,6 +72,8 @@
#include "wm_event_types.h"
+#include "WM_api.h" /* only for WM_main_playanim */
+
typedef struct PlayState {
/* playback state */
@@ -142,7 +144,7 @@ static struct WindowStateGlobal {
eWS_Qual qual;
} g_WS = {NULL};
-void playanim_window_get_size(int *width_r, int *height_r)
+static void playanim_window_get_size(int *width_r, int *height_r)
{
GHOST_RectangleHandle bounds = GHOST_GetClientBounds(g_WS.ghost_window);
*width_r = GHOST_GetWidthRectangle(bounds);
@@ -689,7 +691,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void)
return 1;
}
-void playanim_window_open(const char *title, int posx, int posy, int sizex, int sizey, int start_maximized)
+static void playanim_window_open(const char *title, int posx, int posy, int sizex, int sizey, int start_maximized)
{
GHOST_TWindowState inital_state;
GHOST_TUns32 scr_w, scr_h;
@@ -720,7 +722,7 @@ void playanim_window_open(const char *title, int posx, int posy, int sizex, int
}
-void playanim(int argc, const char **argv)
+void WM_main_playanim(int argc, const char **argv)
{
struct ImBuf *ibuf = NULL;
char filepath[FILE_MAX];
diff --git a/source/creator/creator.c b/source/creator/creator.c
index b3c11198403..ab9541cf299 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -91,7 +91,6 @@
#include "RE_engine.h"
#include "RE_pipeline.h"
-//XXX #include "playanim_ext.h"
#include "ED_datafiles.h"
#include "WM_api.h"
@@ -454,11 +453,9 @@ static int set_env(int argc, const char **argv, void *UNUSED(data))
static int playback_mode(int argc, const char **argv, void *UNUSED(data))
{
- extern void playanim(int argc, const char **argv);
-
/* not if -b was given first */
if (G.background == 0) {
- playanim(argc, argv); /* not the same argc and argv as before */
+ WM_main_playanim(argc, argv); /* not the same argc and argv as before */
exit(0); /* 2.4x didn't do this */
}