diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py index 33d56de1cee..3f03647855c 100644 --- a/release/scripts/ui/space_userpref.py +++ b/release/scripts/ui/space_userpref.py @@ -891,7 +891,7 @@ class USERPREF_PT_addons(bpy.types.Panel): # fake module importing def fake_module(mod_name, mod_path, speedy=True): if bpy.app.debug: - print("fake_module", mod_name, mod_path) + print("fake_module", mod_path, mod_name) import ast ModuleType = type(ast) file_mod = open(mod_path, "r", encoding='UTF-8') diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index ed2a06b0f33..5fb5dc4969d 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -108,6 +108,7 @@ void armature_mat_pose_to_delta(float delta_mat[][4], float pose_mat[][4], float void pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[][3], short use_compat); void pchan_apply_mat4(struct bPoseChannel *pchan, float mat[][4], short use_comat); void pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]); +void pchan_calc_mat(struct bPoseChannel *pchan); /* Rotation Mode Conversions - Used for PoseChannels + Objects... */ void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode); diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index 8c265a1f8c9..1d6aa9bd6d7 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -239,15 +239,15 @@ static int _edge_isBoundary(CCGEdge *e); /***/ -enum { +static enum { Vert_eEffected= (1<<0), Vert_eChanged= (1<<1), Vert_eSeam= (1<<2), } VertFlags; -enum { +static enum { Edge_eEffected= (1<<0), } CCGEdgeFlags; -enum { +static enum { Face_eEffected= (1<<0), } FaceFlags; diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index cc01438fd5d..3174954423f 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -2100,7 +2100,7 @@ void pchan_to_mat4(bPoseChannel *pchan, float chan_mat[4][4]) /* loc/rot/size to mat4 */ /* used in constraint.c too */ -void chan_calc_mat(bPoseChannel *pchan) +void pchan_calc_mat(bPoseChannel *pchan) { /* this is just a wrapper around the copy of this function which calculates the matrix * and stores the result in any given channel @@ -2256,7 +2256,7 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti parchan= pchan->parent; /* this gives a chan_mat with actions (ipos) results */ - if(do_extra) chan_calc_mat(pchan); + if(do_extra) pchan_calc_mat(pchan); else unit_m4(pchan->chan_mat); /* construct the posemat based on PoseChannels, that we do before applying constraints */ diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 02b3de83ee1..3c0453c82a5 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -482,7 +482,7 @@ DO_INLINE void collision_interpolateOnTriangle ( float to[3], float v1[3], float } -int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) +static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { int result = 0; Cloth *cloth1; @@ -598,7 +598,7 @@ int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifier } //Determines collisions on overlap, collisions are written to collpair[i] and collision+number_collision_found is returned -CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair ) +static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair ) { ClothModifierData *clmd = ( ClothModifierData * ) md1; CollisionModifierData *collmd = ( CollisionModifierData * ) md2; diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index b3f83019ff1..e7efc09ec6e 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -2149,7 +2149,6 @@ static void actcon_flush_tars (bConstraint *con, ListBase *list, short nocopy) static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime)) { - extern void chan_calc_mat(bPoseChannel *chan); bActionConstraint *data = con->data; if (VALID_CONS_TARGET(ct)) { @@ -2217,7 +2216,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint what_does_obaction(cob->scene, cob->ob, &workob, pose, data->act, pchan->name, t); /* convert animation to matrices for use here */ - chan_calc_mat(tchan); + pchan_calc_mat(tchan); copy_m4_m4(ct->matrix, tchan->chan_mat); /* Clean up */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 6149f7d380b..d0f2232a683 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1626,7 +1626,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob) /* there is also a timing calculation in drawobject() */ -int no_speed_curve= 0; +static int no_speed_curve= 0; void disable_speed_curve(int val) { @@ -1775,6 +1775,7 @@ void object_to_mat4(Object *ob, float mat[][4]) add_v3_v3v3(mat[3], ob->loc, ob->dloc); } +/* extern */ int enable_cu_speed= 1; static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4]) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 65bd4f110b4..c1a6558aea3 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2217,7 +2217,7 @@ static void psys_update_effectors(ParticleSimulationData *sim) ***********************************************************************************************************/ #define PSYS_FLUID_SPRINGS_INITIAL_SIZE 256 -ParticleSpring *add_fluid_spring(ParticleSystem *psys, ParticleSpring *spring) +static ParticleSpring *add_fluid_spring(ParticleSystem *psys, ParticleSpring *spring) { /* Are more refs required? */ if(psys->alloc_fluidsprings == 0 || psys->fluid_springs == NULL) { @@ -2236,7 +2236,7 @@ ParticleSpring *add_fluid_spring(ParticleSystem *psys, ParticleSpring *spring) return psys->fluid_springs + psys->tot_fluidsprings - 1; } -void delete_fluid_spring(ParticleSystem *psys, int j) +static void delete_fluid_spring(ParticleSystem *psys, int j) { if (j != psys->tot_fluidsprings - 1) psys->fluid_springs[j] = psys->fluid_springs[psys->tot_fluidsprings - 1]; @@ -2249,7 +2249,7 @@ void delete_fluid_spring(ParticleSystem *psys, int j) } } -EdgeHash *build_fluid_springhash(ParticleSystem *psys) +static EdgeHash *build_fluid_springhash(ParticleSystem *psys) { EdgeHash *springhash = NULL; ParticleSpring *spring; diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 8039d729842..1d80e989da4 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -135,7 +135,7 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs) #define TRI_UVOFFSET (1./4.) -int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm) +static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm) { if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid) { diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c index eb1c66604f8..3cb3d7e038b 100644 --- a/source/blender/blenkernel/intern/writeframeserver.c +++ b/source/blender/blenkernel/intern/writeframeserver.c @@ -49,11 +49,10 @@ #include "BLI_utildefines.h" - +#include "BKE_writeframeserver.h" #include "BKE_global.h" #include "BKE_report.h" - #include "DNA_scene_types.h" static int sock; diff --git a/source/blender/blenlib/BLI_jitter.h b/source/blender/blenlib/BLI_jitter.h index f626feb2ec8..aea0fe2bd77 100644 --- a/source/blender/blenlib/BLI_jitter.h +++ b/source/blender/blenlib/BLI_jitter.h @@ -32,9 +32,9 @@ #ifndef BLI_JITTER_H #define BLI_JITTER_H -extern void BLI_initjit(float *jitarr, int num); -extern void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1); -extern void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2); +void BLI_initjit(float *jitarr, int num); +void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1); +void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2); #endif diff --git a/source/blender/blenlib/BLI_mempool.h b/source/blender/blenlib/BLI_mempool.h index 7c2dc36d533..c1991769eb1 100644 --- a/source/blender/blenlib/BLI_mempool.h +++ b/source/blender/blenlib/BLI_mempool.h @@ -32,13 +32,11 @@ #define BLI_MEMPOOL_H struct BLI_mempool; -typedef struct BLI_mempool BLI_mempool; - -BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, int use_sysmalloc); -void *BLI_mempool_alloc(BLI_mempool *pool); -void *BLI_mempool_calloc(BLI_mempool *pool); -void BLI_mempool_free(BLI_mempool *pool, void *addr); -void BLI_mempool_destroy(BLI_mempool *pool); +struct BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, int use_sysmalloc); +void *BLI_mempool_alloc(struct BLI_mempool *pool); +void *BLI_mempool_calloc(struct BLI_mempool *pool); +void BLI_mempool_free(struct BLI_mempool *pool, void *addr); +void BLI_mempool_destroy(struct BLI_mempool *pool); #endif diff --git a/source/blender/blenlib/BLI_noise.h b/source/blender/blenlib/BLI_noise.h index 11587262645..ce757c03bf3 100644 --- a/source/blender/blenlib/BLI_noise.h +++ b/source/blender/blenlib/BLI_noise.h @@ -57,7 +57,6 @@ void voronoi(float x, float y, float z, float* da, float* pa, float me, int dtyp float cellNoise(float x, float y, float z); void cellNoiseV(float x, float y, float z, float *ca); - #ifdef __cplusplus } #endif diff --git a/source/blender/blenlib/BLI_scanfill.h b/source/blender/blenlib/BLI_scanfill.h index bae5375f757..707f23fb4e8 100644 --- a/source/blender/blenlib/BLI_scanfill.h +++ b/source/blender/blenlib/BLI_scanfill.h @@ -61,7 +61,7 @@ void BLI_end_edgefill(void); * @param f The function to use as callback * @attention used in creator.c */ -void BLI_setErrorCallBack(void (*f)(char*)); +void BLI_setErrorCallBack(void (*f)(const char*)); /** * Set a function to be able to interrupt the execution of processing diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index 823841ef152..235cedb6fed 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -32,6 +32,7 @@ #include "MEM_guardedalloc.h" #include "BLI_blenlib.h" +#include "BLI_mempool.h" #include typedef struct BLI_freenode{ diff --git a/source/blender/blenlib/intern/jitter.c b/source/blender/blenlib/intern/jitter.c index dfc554394d6..2454c4b1444 100644 --- a/source/blender/blenlib/intern/jitter.c +++ b/source/blender/blenlib/intern/jitter.c @@ -34,6 +34,7 @@ #include "MEM_guardedalloc.h" #include "BLI_rand.h" +#include "BLI_jitter.h" void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1) diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 96dad590fee..9af1532ce4b 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -36,6 +36,8 @@ #include +#include "BLI_noise.h" + /* local */ static float noise3_perlin(float vec[3]); //static float turbulence_perlin(float *point, float lofreq, float hifreq); @@ -388,7 +390,7 @@ static char p[512+2]= { 0xA2,0xA0}; -float g[512+2][3]= { +static float g[512+2][3]= { {0.33783, 0.715698, -0.611206}, {-0.944031, -0.326599, -0.045624}, {-0.101074, -0.416443, -0.903503}, diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 9be42f9f5fc..3c7300f2588 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -44,22 +44,22 @@ /* Bitmap */ typedef char* BLI_bitmap; -BLI_bitmap BLI_bitmap_new(int tot) +static BLI_bitmap BLI_bitmap_new(int tot) { return MEM_callocN((tot >> 3) + 1, "BLI bitmap"); } -int BLI_bitmap_get(BLI_bitmap b, int index) +static int BLI_bitmap_get(BLI_bitmap b, int index) { return b[index >> 3] & (1 << (index & 7)); } -void BLI_bitmap_set(BLI_bitmap b, int index) +static void BLI_bitmap_set(BLI_bitmap b, int index) { b[index >> 3] |= (1 << (index & 7)); } -void BLI_bitmap_clear(BLI_bitmap b, int index) +static void BLI_bitmap_clear(BLI_bitmap b, int index) { b[index >> 3] &= ~(1 << (index & 7)); } @@ -264,7 +264,7 @@ static int partition_indices(int *prim_indices, int lo, int hi, int axis, } } -void check_partitioning(int *prim_indices, int lo, int hi, int axis, +static void check_partitioning(int *prim_indices, int lo, int hi, int axis, float mid, BBC *prim_bbc, int index_of_2nd_partition) { int i; @@ -405,7 +405,7 @@ static void build_grids_leaf_node(PBVH *bvh, PBVHNode *node) offset and start indicate a range in the array of primitive indices */ -void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc, +static void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc, int offset, int count) { int i, axis, end; @@ -841,7 +841,7 @@ float BLI_pbvh_node_get_tmin(PBVHNode* node) return node->tmin; } -void BLI_pbvh_search_callback_occluded(PBVH *bvh, +static void BLI_pbvh_search_callback_occluded(PBVH *bvh, BLI_pbvh_SearchCallback scb, void *search_data, BLI_pbvh_HitOccludedCallback hcb, void *hit_data) { diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index aa424c1c2bb..923abf22794 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -34,11 +34,12 @@ * ***** END GPL LICENSE BLOCK ***** * */ - -#include "DNA_vec_types.h" #include #include +#include "DNA_vec_types.h" +#include "BLI_rect.h" + int BLI_rcti_is_empty(rcti * rect) { return ((rect->xmax<=rect->xmin) || diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 1978e7ed7d6..2fa3023be51 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -30,10 +30,11 @@ #include "MEM_guardedalloc.h" - +#include "BLI_callbacks.h" #include "BLI_editVert.h" #include "BLI_listbase.h" #include "BLI_math.h" +#include "BLI_scanfill.h" /* callbacks for errors and interrupts and some goo */ static void (*BLI_localErrorCallBack)(const char*) = NULL; diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c index 0992e08b28f..c0554217f68 100644 --- a/source/blender/blenlib/intern/time.c +++ b/source/blender/blenlib/intern/time.c @@ -27,8 +27,9 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifdef WIN32 #include "PIL_time.h" + +#ifdef WIN32 #include double PIL_check_seconds_timer(void) diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c index b08f05b4fc8..5b1cd1dc097 100644 --- a/source/blender/blenlib/intern/uvproject.c +++ b/source/blender/blenlib/intern/uvproject.c @@ -28,6 +28,7 @@ #include "DNA_object_types.h" #include "BLI_math.h" +#include "BLI_uvproject.h" typedef struct UvCameraInfo { float camangle; diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index b47fea58633..04e81a7d0bf 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -53,10 +53,11 @@ #include "RNA_access.h" - #include "UI_interface.h" #include "UI_resources.h" +#include "ED_anim_api.h" + /* ********************************************** */ /* UI STUFF */ diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 92fce2a77e5..5ceb1293a58 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -48,6 +48,7 @@ #include "BKE_global.h" #include "RNA_access.h" +#include "RNA_enum_types.h" #include "ED_anim_api.h" #include "ED_keyframing.h" @@ -452,7 +453,7 @@ void sample_fcurve (FCurve *fcu) */ /* globals for copy/paste data (like for other copy/paste buffers) */ -ListBase animcopybuf = {NULL, NULL}; +static ListBase animcopybuf = {NULL, NULL}; static float animcopy_firstframe= 999999999.0f; static float animcopy_lastframe= -999999999.0f; static float animcopy_cfra= 0.0; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 67be382e600..ecafb3af099 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -349,7 +349,7 @@ int insert_vert_fcurve (FCurve *fcu, float x, float y, short flag) /* -------------- 'Smarter' Keyframing Functions -------------------- */ /* return codes for new_key_needed */ -enum { +static enum { KEYNEEDED_DONTADD = 0, KEYNEEDED_JUSTADD, KEYNEEDED_DELPREV, @@ -1034,7 +1034,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro /* KEYFRAME MODIFICATION */ /* mode for commonkey_modifykey */ -enum { +static enum { COMMONKEY_MODE_INSERT = 0, COMMONKEY_MODE_DELETE, } eCommonModifyKey_Modes; @@ -1578,7 +1578,7 @@ short fcurve_frame_has_keyframe (FCurve *fcu, float frame, short filter) /* Checks whether an Action has a keyframe for a given frame * Since we're only concerned whether a keyframe exists, we can simply loop until a match is found... */ -short action_frame_has_keyframe (bAction *act, float frame, short filter) +static short action_frame_has_keyframe (bAction *act, float frame, short filter) { FCurve *fcu; @@ -1606,7 +1606,7 @@ short action_frame_has_keyframe (bAction *act, float frame, short filter) } /* Checks whether an Object has a keyframe for a given frame */ -short object_frame_has_keyframe (Object *ob, float frame, short filter) +static short object_frame_has_keyframe (Object *ob, float frame, short filter) { /* error checking */ if (ob == NULL) diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 40c2f3c3797..930563678dd 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -509,7 +509,7 @@ void ANIM_OT_keying_set_active_set (wmOperatorType *ot) /* REGISTERED KEYING SETS */ /* Keying Set Type Info declarations */ -ListBase keyingset_type_infos = {NULL, NULL}; +static ListBase keyingset_type_infos = {NULL, NULL}; /* Built-In Keying Sets (referencing type infos)*/ ListBase builtin_keyingsets = {NULL, NULL}; diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 94c1edd90d5..23584df1d74 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -3394,7 +3394,7 @@ void ARMATURE_OT_reveal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void hide_selected_armature_bones(Scene *scene) +static void hide_selected_armature_bones(Scene *scene) { Object *obedit= scene->obedit; // XXX get from context bArmature *arm= obedit->data; diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index ee0ed8252c3..14eb3133435 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -98,7 +98,7 @@ typedef enum ARC_USED = 2 } ArcUsageFlags; -RigGraph *GLOBAL_RIGG = NULL; +static RigGraph *GLOBAL_RIGG = NULL; /*******************************************************************************************************/ @@ -157,7 +157,7 @@ static void getEditBoneRollUpAxis(EditBone *bone, float roll, float up_axis[3]) VECCOPY(up_axis, mat[2]); } -float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4], float qroll[4], float aligned_axis[3]) +static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4], float qroll[4], float aligned_axis[3]) { float nor[3], new_up_axis[3], x_axis[3], z_axis[3]; @@ -1414,7 +1414,7 @@ static void RIG_findHead(RigGraph *rg) /*******************************************************************************************************/ -void RIG_printNode(RigNode *node, const char name[]) +static void RIG_printNode(RigNode *node, const char name[]) { printf("%s %p %i <%0.3f, %0.3f, %0.3f>\n", name, (void *)node, node->degree, node->p[0], node->p[1], node->p[2]); @@ -1429,7 +1429,7 @@ void RIG_printNode(RigNode *node, const char name[]) } } -void RIG_printArcBones(RigArc *arc) +static void RIG_printArcBones(RigArc *arc) { RigEdge *edge; @@ -1443,7 +1443,7 @@ void RIG_printArcBones(RigArc *arc) printf("\n"); } -void RIG_printCtrl(RigControl *ctrl, char *indent) +static void RIG_printCtrl(RigControl *ctrl, char *indent) { char text[128]; @@ -1456,7 +1456,7 @@ void RIG_printCtrl(RigControl *ctrl, char *indent) printf("%sFlag: %i\n", indent, ctrl->flag); } -void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs) +static void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs) { RigControl *ctrl; char indent[64]; @@ -1480,7 +1480,7 @@ void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs) } } -void RIG_printArc(RigGraph *rg, RigArc *arc) +static void RIG_printArc(RigGraph *rg, RigArc *arc) { RigEdge *edge; @@ -1502,7 +1502,7 @@ void RIG_printArc(RigGraph *rg, RigArc *arc) RIG_printNode((RigNode*)arc->tail, "tail"); } -void RIG_printGraph(RigGraph *rg) +static void RIG_printGraph(RigGraph *rg) { RigArc *arc; @@ -1577,7 +1577,7 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm) return rg; } -RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm) +static RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm) { Object *obedit = CTX_data_edit_object(C); Scene *scene = CTX_data_scene(C); @@ -1656,7 +1656,7 @@ static EditBone *add_editbonetolist(char *name, ListBase *list) } #endif -void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit) +static void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit) { while (node->multi_level > multi_level_limit && node->link_up) { @@ -1689,7 +1689,7 @@ void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level } } -void generateMissingArcs(RigGraph *rigg) +static void generateMissingArcs(RigGraph *rigg) { ReebGraph *reebg; int multi_level_limit = 5; @@ -2790,7 +2790,7 @@ int RIG_nbJoints(RigGraph *rg) return total; } -void BIF_freeRetarget(void) +static void BIF_freeRetarget(void) { if (GLOBAL_RIGG) { @@ -2799,7 +2799,7 @@ void BIF_freeRetarget(void) } } -void BIF_retargetArmature(bContext *C) +static void BIF_retargetArmature(bContext *C) { ReebGraph *reebg; double start_time, end_time; @@ -2932,7 +2932,7 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg) // allqueue(REDRAWVIEW3D, 0); } -void BIF_adjustRetarget(bContext *C) +static void BIF_adjustRetarget(bContext *C) { if (GLOBAL_RIGG) { diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index 7a5c14b1dab..8e1206ad0b3 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -76,9 +76,9 @@ typedef struct SK_GestureAction { GestureApplyFct apply; } SK_GestureAction; -SK_Point boneSnap; -int LAST_SNAP_POINT_VALID = 0; -float LAST_SNAP_POINT[3]; +static SK_Point boneSnap; +static int LAST_SNAP_POINT_VALID = 0; +static float LAST_SNAP_POINT[3]; typedef struct SK_StrokeIterator { @@ -129,7 +129,7 @@ int sk_hasOverdraw(SK_Sketch *sketch, SK_Stroke *stk); /******************** GESTURE ACTIONS ******************************/ -SK_GestureAction GESTURE_ACTIONS[] = +static SK_GestureAction GESTURE_ACTIONS[] = { {"Cut", sk_detectCutGesture, sk_applyCutGesture}, {"Trim", sk_detectTrimGesture, sk_applyTrimGesture}, @@ -143,10 +143,10 @@ SK_GestureAction GESTURE_ACTIONS[] = /******************** TEMPLATES UTILS *************************/ -char *TEMPLATES_MENU = NULL; -int TEMPLATES_CURRENT = 0; -GHash *TEMPLATES_HASH = NULL; -RigGraph *TEMPLATE_RIGG = NULL; +static char *TEMPLATES_MENU = NULL; +static int TEMPLATES_CURRENT = 0; +static GHash *TEMPLATES_HASH = NULL; +static RigGraph *TEMPLATE_RIGG = NULL; void BIF_makeListTemplates(const bContext *C) { @@ -240,7 +240,7 @@ int BIF_currentTemplate(const bContext *C) return TEMPLATES_CURRENT; } -RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob) +static RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob) { Object *obedit = CTX_data_edit_object(C); if (ob == obedit) @@ -348,7 +348,7 @@ void BIF_setTemplate(bContext *C, int index) /*********************** CONVERSION ***************************/ -void sk_autoname(bContext *C, ReebArc *arc) +static void sk_autoname(bContext *C, ReebArc *arc) { ToolSettings *ts = CTX_data_tool_settings(C); if (ts->skgen_retarget_options & SK_RETARGET_AUTONAME) @@ -396,7 +396,7 @@ void sk_autoname(bContext *C, ReebArc *arc) } } -ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3]) +static ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3]) { ReebNode *node; @@ -410,7 +410,7 @@ ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3]) return node; } -ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3]) +static ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3]) { ReebArc *arc; int i; @@ -434,7 +434,7 @@ ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3]) return arc; } -void sk_retargetStroke(bContext *C, SK_Stroke *stk) +static void sk_retargetStroke(bContext *C, SK_Stroke *stk) { ToolSettings *ts = CTX_data_tool_settings(C); Object *obedit = CTX_data_edit_object(C); @@ -465,7 +465,7 @@ void sk_retargetStroke(bContext *C, SK_Stroke *stk) /**************************************************************/ -void sk_cancelStroke(SK_Sketch *sketch) +static void sk_cancelStroke(SK_Sketch *sketch) { if (sketch->active_stroke != NULL) { @@ -475,18 +475,18 @@ void sk_cancelStroke(SK_Sketch *sketch) } -float sk_clampPointSize(SK_Point *pt, float size) +static float sk_clampPointSize(SK_Point *pt, float size) { return MAX2(size * pt->size, size / 2); } -void sk_drawPoint(GLUquadric *quad, SK_Point *pt, float size) +static void sk_drawPoint(GLUquadric *quad, SK_Point *pt, float size) { glTranslatef(pt->p[0], pt->p[1], pt->p[2]); gluSphere(quad, sk_clampPointSize(pt, size), 8, 8); } -void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size) +static void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size) { float vec1[3], vec2[3] = {0, 0, 1}, axis[3]; float angle, length; @@ -507,7 +507,7 @@ void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size) gluCylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8); } -void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height) +static void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height) { float vec2[3] = {0, 0, 1}, axis[3]; float angle; @@ -531,7 +531,7 @@ void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height) glPopMatrix(); } -void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end) +static void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end) { float rgb[3]; int i; @@ -607,7 +607,7 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end) gluDeleteQuadric(quad); } -void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, NextSubdivisionFunc next_subdividion) +static void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, NextSubdivisionFunc next_subdividion) { SK_Stroke *stk = ((SK_StrokeIterator*)iter)->stroke; float head[3], tail[3]; @@ -643,7 +643,7 @@ void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, Next gluDeleteQuadric(quad); } -void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk) +static void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk) { int head_index = -1; int i; @@ -694,7 +694,7 @@ void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk) } } -SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *dist, int *index, int all_pts) +static SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *dist, int *index, int all_pts) { ARegion *ar = CTX_wm_region(C); SK_Point *pt = NULL; @@ -727,7 +727,7 @@ SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *di return pt; } -SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short mval[2], int *dist) +static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short mval[2], int *dist) { ARegion *ar = CTX_wm_region(C); SK_Point *pt = NULL; @@ -791,7 +791,7 @@ int sk_hasOverdraw(SK_Sketch *sketch, SK_Stroke *stk) (sketch->over.start != -1 || sketch->over.end != -1); } -void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) +static void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) { if (sketch->over.target == NULL) { @@ -868,7 +868,7 @@ void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa } /* return 1 on reverse needed */ -int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end) +static int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end) { int retval = 0; @@ -896,7 +896,7 @@ int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end) return retval; } -void sk_endOverdraw(SK_Sketch *sketch) +static void sk_endOverdraw(SK_Sketch *sketch) { SK_Stroke *stk = sketch->active_stroke; @@ -925,7 +925,7 @@ void sk_endOverdraw(SK_Sketch *sketch) } -void sk_startStroke(SK_Sketch *sketch) +static void sk_startStroke(SK_Sketch *sketch) { SK_Stroke *stk = sk_createStroke(); @@ -935,7 +935,7 @@ void sk_startStroke(SK_Sketch *sketch) sk_resetOverdraw(sketch); } -void sk_endStroke(bContext *C, SK_Sketch *sketch) +static void sk_endStroke(bContext *C, SK_Sketch *sketch) { ToolSettings *ts = CTX_data_tool_settings(C); sk_shrinkStrokeBuffer(sketch->active_stroke); @@ -948,7 +948,7 @@ void sk_endStroke(bContext *C, SK_Sketch *sketch) sketch->active_stroke = NULL; } -void sk_updateDrawData(SK_DrawData *dd) +static void sk_updateDrawData(SK_DrawData *dd) { dd->type = PT_CONTINUOUS; @@ -956,7 +956,7 @@ void sk_updateDrawData(SK_DrawData *dd) dd->previous_mval[1] = dd->mval[1]; } -float sk_distanceDepth(bContext *C, float p1[3], float p2[3]) +static float sk_distanceDepth(bContext *C, float p1[3], float p2[3]) { ARegion *ar = CTX_wm_region(C); RegionView3D *rv3d = ar->regiondata; @@ -977,7 +977,7 @@ float sk_distanceDepth(bContext *C, float p1[3], float p2[3]) return distance; } -void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float length, float distance) +static void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float length, float distance) { ARegion *ar = CTX_wm_region(C); ScrArea *sa = CTX_wm_area(C); @@ -1004,7 +1004,7 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float } } -void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData *dd) +static void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData *dd) { ARegion *ar = CTX_wm_region(C); /* copied from grease pencil, need fixing */ @@ -1026,7 +1026,7 @@ void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData sub_v3_v3v3(vec, fp, dvec); } -int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch), SK_Stroke *stk, SK_DrawData *dd) +static int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch), SK_Stroke *stk, SK_DrawData *dd) { pt->type = dd->type; pt->mode = PT_PROJECT; @@ -1035,7 +1035,7 @@ int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch), return 1; } -int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) +static int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) { ARegion *ar = CTX_wm_region(C); RegionView3D *rv3d = ar->regiondata; @@ -1050,7 +1050,7 @@ int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra return 1; } -int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) +static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) { ToolSettings *ts = CTX_data_tool_settings(C); int point_added = 0; @@ -1206,7 +1206,7 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok return point_added; } -int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) +static int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd) { int point_added; ARegion *ar = CTX_wm_region(C); @@ -1257,7 +1257,7 @@ int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra return point_added; } -void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap) +static void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap) { ToolSettings *ts = CTX_data_tool_settings(C); int point_added = 0; @@ -1278,7 +1278,7 @@ void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa } } -void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap) +static void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap) { int point_added = 0; @@ -1466,7 +1466,7 @@ static int iteratorStopped(void *arg) } } -void sk_convertStroke(bContext *C, SK_Stroke *stk) +static void sk_convertStroke(bContext *C, SK_Stroke *stk) { Object *obedit = CTX_data_edit_object(C); ToolSettings *ts = CTX_data_tool_settings(C); @@ -1558,7 +1558,7 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk) } } -void sk_convert(bContext *C, SK_Sketch *sketch) +static void sk_convert(bContext *C, SK_Sketch *sketch) { ToolSettings *ts = CTX_data_tool_settings(C); SK_Stroke *stk; @@ -1584,7 +1584,7 @@ void sk_convert(bContext *C, SK_Sketch *sketch) /* returns the number of self intersections */ -int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture) +static int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture) { ARegion *ar = CTX_wm_region(C); int added = 0; @@ -1633,7 +1633,7 @@ int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture) return added; } -int cmpIntersections(void *i1, void *i2) +static int cmpIntersections(void *i1, void *i2) { SK_Intersection *isect1 = i1, *isect2 = i2; @@ -1665,7 +1665,7 @@ int cmpIntersections(void *i1, void *i2) /* returns the maximum number of intersections per stroke */ -int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Stroke *gesture) +static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Stroke *gesture) { ARegion *ar = CTX_wm_region(C); ScrArea *sa = CTX_wm_area(C); @@ -1735,7 +1735,7 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok return added; } -int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture) +static int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture) { SK_StrokeIterator sk_iter; BArcIterator *iter = (BArcIterator*)&sk_iter; @@ -2124,7 +2124,7 @@ static void sk_freeGesture(SK_Gesture *gest) BLI_freelistN(&gest->self_intersections); } -void sk_applyGesture(bContext *C, SK_Sketch *sketch) +static void sk_applyGesture(bContext *C, SK_Sketch *sketch) { SK_Gesture gest; SK_GestureAction *act; @@ -2147,7 +2147,7 @@ void sk_applyGesture(bContext *C, SK_Sketch *sketch) /********************************************/ -int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend) +static int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend) { ViewContext vc; rcti rect; @@ -2198,7 +2198,7 @@ int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend) return 0; } -void sk_queueRedrawSketch(SK_Sketch *sketch) +static void sk_queueRedrawSketch(SK_Sketch *sketch) { if (sketch->active_stroke != NULL) { @@ -2212,7 +2212,7 @@ void sk_queueRedrawSketch(SK_Sketch *sketch) } } -void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names) +static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names) { ToolSettings *ts= scene->toolsettings; SK_Stroke *stk; @@ -2340,7 +2340,7 @@ void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int wit } } -int sk_finish_stroke(bContext *C, SK_Sketch *sketch) +static int sk_finish_stroke(bContext *C, SK_Sketch *sketch) { ToolSettings *ts = CTX_data_tool_settings(C); @@ -2375,7 +2375,7 @@ int sk_finish_stroke(bContext *C, SK_Sketch *sketch) return 0; } -void sk_start_draw_stroke(SK_Sketch *sketch) +static void sk_start_draw_stroke(SK_Sketch *sketch) { if (sketch->active_stroke == NULL) { @@ -2386,12 +2386,12 @@ void sk_start_draw_stroke(SK_Sketch *sketch) } } -void sk_start_draw_gesture(SK_Sketch *sketch) +static void sk_start_draw_gesture(SK_Sketch *sketch) { sketch->gesture = sk_createStroke(); } -int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap) +static int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap) { if (sk_stroke_filtermval(dd)) { @@ -2769,7 +2769,7 @@ int ED_operator_sketch_mode_active_stroke(bContext *C) } } -int ED_operator_sketch_mode_gesture(bContext *C) +static int ED_operator_sketch_mode_gesture(bContext *C) { ToolSettings *ts = CTX_data_tool_settings(C); SK_Sketch *sketch = contextSketch(C, 0); diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index c0600ceed1c..4d78c9e2f7b 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -57,6 +57,7 @@ #include "BLO_sys_types.h" // for intptr_t support #include "ED_mesh.h" +#include "ED_armature.h" #include "meshlaplacian.h" @@ -237,7 +238,7 @@ static void laplacian_triangle_weights(LaplacianSystem *sys, int f, int i1, int } } -LaplacianSystem *laplacian_system_construct_begin(int totvert, int totface, int lsq) +static LaplacianSystem *laplacian_system_construct_begin(int totvert, int totface, int lsq) { LaplacianSystem *sys; @@ -279,7 +280,7 @@ void laplacian_add_triangle(LaplacianSystem *sys, int v1, int v2, int v3) sys->totface++; } -void laplacian_system_construct_end(LaplacianSystem *sys) +static void laplacian_system_construct_end(LaplacianSystem *sys) { int (*face)[3]; int a, totvert=sys->totvert, totface=sys->totface; @@ -330,7 +331,7 @@ void laplacian_system_construct_end(LaplacianSystem *sys) sys->edgehash= NULL; } -void laplacian_system_delete(LaplacianSystem *sys) +static void laplacian_system_delete(LaplacianSystem *sys) { if(sys->verts) MEM_freeN(sys->verts); if(sys->varea) MEM_freeN(sys->varea); @@ -565,7 +566,7 @@ static void heat_set_H(LaplacianSystem *sys, int vertex) sys->heat.H[vertex]= h; } -void heat_calc_vnormals(LaplacianSystem *sys) +static void heat_calc_vnormals(LaplacianSystem *sys) { float fnor[3]; int a, v1, v2, v3, (*face)[3]; diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 9c7911715b4..a0f37ea2186 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -96,7 +96,7 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS /* ************************************************************* */ /* gets list of poses in poselib as a string usable for pupmenu() */ -char *poselib_build_poses_menu (bAction *act, char title[]) +static char *poselib_build_poses_menu (bAction *act, char title[]) { DynStr *pupds= BLI_dynstr_new(); TimeMarker *marker; @@ -129,7 +129,7 @@ char *poselib_build_poses_menu (bAction *act, char title[]) /* gets the first available frame in poselib to store a pose on * - frames start from 1, and a pose should occur on every frame... 0 is error! */ -int poselib_get_free_index (bAction *act) +static int poselib_get_free_index (bAction *act) { TimeMarker *marker; int low=0, high=0; @@ -160,7 +160,7 @@ int poselib_get_free_index (bAction *act) } /* returns the active pose for a poselib */ -TimeMarker *poselib_get_active_pose (bAction *act) +static TimeMarker *poselib_get_active_pose (bAction *act) { if ((act) && (act->active_marker)) return BLI_findlink(&act->markers, act->active_marker-1); @@ -171,7 +171,7 @@ TimeMarker *poselib_get_active_pose (bAction *act) /* ************************************************************* */ /* Initialise a new poselib (whether it is needed or not) */ -bAction *poselib_init_new (Object *ob) +static bAction *poselib_init_new (Object *ob) { /* sanity checks - only for armatures */ if (ELEM(NULL, ob, ob->pose)) @@ -186,7 +186,7 @@ bAction *poselib_init_new (Object *ob) } /* Initialise a new poselib (checks if that needs to happen) */ -bAction *poselib_validate (Object *ob) +static bAction *poselib_validate (Object *ob) { if (ELEM(NULL, ob, ob->pose)) return NULL; @@ -201,7 +201,7 @@ bAction *poselib_validate (Object *ob) * in the action. This is for use in making existing actions usable as poselibs. */ // TODO: operatorfy me! -void poselib_validate_act (bAction *act) +static void poselib_validate_act (bAction *act) { DLRBT_Tree keys = {NULL, NULL}; ActKeyColumn *ak; diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 6115f322d08..24f92e2dbbb 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -110,7 +110,7 @@ Object *ED_object_pose_armature(Object *ob) /* This function is used to indicate that a bone is selected and needs keyframes inserted */ -void set_pose_keys (Object *ob) +static void set_pose_keys (Object *ob) { bArmature *arm= ob->data; bPoseChannel *chan; @@ -295,7 +295,7 @@ void POSE_OT_paths_calculate (wmOperatorType *ot) /* --------- */ /* for the object with pose/action: clear path curves for selected bones only */ -void ED_pose_clear_paths(Object *ob) +static void ED_pose_clear_paths(Object *ob) { bPoseChannel *pchan; short skipped = 0; @@ -663,7 +663,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot) /* ********************************************** */ -void pose_copy_menu(Scene *scene) +static void pose_copy_menu(Scene *scene) { Object *obedit= scene->obedit; // XXX context Object *ob= OBACT; @@ -1567,7 +1567,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot) /* ********************************************** */ /* context active object, or weightpainted object with armature in posemode */ -void pose_activate_flipped_bone(Scene *scene) +static void pose_activate_flipped_bone(Scene *scene) { Object *ob= OBACT; diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 38e23a3d456..5acdd013fb9 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -60,8 +60,8 @@ #include "reeb.h" -ReebGraph *GLOBAL_RG = NULL; -ReebGraph *FILTERED_RG = NULL; +static ReebGraph *GLOBAL_RG = NULL; +static ReebGraph *FILTERED_RG = NULL; /* * Skeleton generation algorithm based on: @@ -113,7 +113,7 @@ void flipArcBuckets(ReebArc *arc); /***************************************** UTILS **********************************************/ -VertexData *allocVertexData(EditMesh *em) +static VertexData *allocVertexData(EditMesh *em) { VertexData *data; EditVert *eve; @@ -133,27 +133,27 @@ VertexData *allocVertexData(EditMesh *em) return data; } -int indexData(EditVert *eve) +static int indexData(EditVert *eve) { return ((VertexData*)eve->tmp.p)->i; } -float weightData(EditVert *eve) +static float weightData(EditVert *eve) { return ((VertexData*)eve->tmp.p)->w; } -void weightSetData(EditVert *eve, float w) +static void weightSetData(EditVert *eve, float w) { ((VertexData*)eve->tmp.p)->w = w; } -ReebNode* nodeData(EditVert *eve) +static ReebNode* nodeData(EditVert *eve) { return ((VertexData*)eve->tmp.p)->n; } -void nodeSetData(EditVert *eve, ReebNode *n) +static void nodeSetData(EditVert *eve, ReebNode *n) { ((VertexData*)eve->tmp.p)->n = n; } @@ -230,7 +230,7 @@ void BIF_flagMultiArcs(ReebGraph *rg, int flag) } } -ReebNode * addNode(ReebGraph *rg, EditVert *eve) +static ReebNode * addNode(ReebGraph *rg, EditVert *eve) { float weight; ReebNode *node = NULL; @@ -255,7 +255,7 @@ ReebNode * addNode(ReebGraph *rg, EditVert *eve) return node; } -ReebNode * copyNode(ReebGraph *rg, ReebNode *node) +static ReebNode * copyNode(ReebGraph *rg, ReebNode *node) { ReebNode *cp_node = NULL; @@ -276,7 +276,7 @@ ReebNode * copyNode(ReebGraph *rg, ReebNode *node) return cp_node; } -void relinkNodes(ReebGraph *low_rg, ReebGraph *high_rg) +static void relinkNodes(ReebGraph *low_rg, ReebGraph *high_rg) { ReebNode *low_node, *high_node; @@ -319,7 +319,7 @@ ReebNode *BIF_lowestLevelNode(ReebNode *node) return node; } -ReebArc * copyArc(ReebGraph *rg, ReebArc *arc) +static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc) { ReebArc *cp_arc; ReebNode *node; @@ -365,7 +365,7 @@ ReebArc * copyArc(ReebGraph *rg, ReebArc *arc) return cp_arc; } -ReebGraph * copyReebGraph(ReebGraph *rg, int level) +static ReebGraph * copyReebGraph(ReebGraph *rg, int level) { ReebNode *node; ReebArc *arc; @@ -406,7 +406,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node) return multi_rg; } -ReebEdge * copyEdge(ReebEdge *edge) +static ReebEdge * copyEdge(ReebEdge *edge) { ReebEdge *newEdge = NULL; @@ -419,7 +419,7 @@ ReebEdge * copyEdge(ReebEdge *edge) return newEdge; } -void printArc(ReebArc *arc) +static void printArc(ReebArc *arc) { ReebEdge *edge; ReebNode *head = (ReebNode*)arc->head; @@ -432,7 +432,7 @@ void printArc(ReebArc *arc) } } -void flipArc(ReebArc *arc) +static void flipArc(ReebArc *arc) { ReebNode *tmp; tmp = arc->head; @@ -443,7 +443,7 @@ void flipArc(ReebArc *arc) } #ifdef DEBUG_REEB_NODE -void NodeDegreeDecrement(ReebGraph *UNUSED(rg), ReebNode *node) +static void NodeDegreeDecrement(ReebGraph *UNUSED(rg), ReebNode *node) { node->degree--; @@ -453,7 +453,7 @@ void NodeDegreeDecrement(ReebGraph *UNUSED(rg), ReebNode *node) // } } -void NodeDegreeIncrement(ReebGraph *UNUSED(rg), ReebNode *node) +static void NodeDegreeIncrement(ReebGraph *UNUSED(rg), ReebNode *node) { // if (node->degree == 0) // { @@ -496,7 +496,7 @@ void repositionNodes(ReebGraph *rg) } } -void verifyNodeDegree(ReebGraph *rg) +static void verifyNodeDegree(ReebGraph *rg) { #ifdef DEBUG_REEB ReebNode *node = NULL; @@ -524,7 +524,7 @@ void verifyNodeDegree(ReebGraph *rg) #endif } -void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc) +static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc) { ReebNode *head = (ReebNode*)arc->head; ReebNode *tail = (ReebNode*)arc->tail; @@ -578,7 +578,7 @@ void verifyFaces(ReebGraph *rg) #endif } -void verifyArcs(ReebGraph *rg) +static void verifyArcs(ReebGraph *rg) { ReebArc *arc; @@ -591,7 +591,7 @@ void verifyArcs(ReebGraph *rg) } } -void verifyMultiResolutionLinks(ReebGraph *rg, int level) +static void verifyMultiResolutionLinks(ReebGraph *rg, int level) { #ifdef DEBUG_REEB ReebGraph *lower_rg = rg->link_up; @@ -619,13 +619,13 @@ void verifyMultiResolutionLinks(ReebGraph *rg, int level) } /***************************************** BUCKET UTILS **********************************************/ -void addVertToBucket(EmbedBucket *b, float co[3]) +static void addVertToBucket(EmbedBucket *b, float co[3]) { b->nv++; interp_v3_v3v3(b->p, b->p, co, 1.0f / b->nv); } -void removeVertFromBucket(EmbedBucket *b, float co[3]) +static void removeVertFromBucket(EmbedBucket *b, float co[3]) { mul_v3_fl(b->p, (float)b->nv); sub_v3_v3(b->p, co); @@ -633,7 +633,7 @@ void removeVertFromBucket(EmbedBucket *b, float co[3]) mul_v3_fl(b->p, 1.0f / (float)b->nv); } -void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc) +static void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc) { if (bDst->nv > 0 && bSrc->nv > 0) { @@ -647,7 +647,7 @@ void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc) } } -void mergeArcBuckets(ReebArc *aDst, ReebArc *aSrc, float start, float end) +static void mergeArcBuckets(ReebArc *aDst, ReebArc *aSrc, float start, float end) { if (aDst->bcount > 0 && aSrc->bcount > 0) { @@ -691,12 +691,12 @@ void flipArcBuckets(ReebArc *arc) } } -int countArcBuckets(ReebArc *arc) +static int countArcBuckets(ReebArc *arc) { return (int)(floor(arc->tail->weight) - ceil(arc->head->weight)) + 1; } -void allocArcBuckets(ReebArc *arc) +static void allocArcBuckets(ReebArc *arc) { int i; float start = ceil(arc->head->weight); @@ -718,7 +718,7 @@ void allocArcBuckets(ReebArc *arc) } -void resizeArcBuckets(ReebArc *arc) +static void resizeArcBuckets(ReebArc *arc) { EmbedBucket *oldBuckets = arc->buckets; int oldBCount = arc->bcount; @@ -760,7 +760,7 @@ void resizeArcBuckets(ReebArc *arc) } } -void reweightBuckets(ReebArc *arc) +static void reweightBuckets(ReebArc *arc) { int i; float start = ceil((arc->head)->weight); @@ -789,7 +789,7 @@ static void interpolateBuckets(ReebArc *arc, float *start_p, float *end_p, int s } } -void fillArcEmptyBuckets(ReebArc *arc) +static void fillArcEmptyBuckets(ReebArc *arc) { float *start_p, *end_p; int start_index = 0, end_index = 0; @@ -904,7 +904,7 @@ static void ExtendArcBuckets(ReebArc *arc) } /* CALL THIS ONLY AFTER FILTERING, SINCE IT MESSES UP WEIGHT DISTRIBUTION */ -void extendGraphBuckets(ReebGraph *rg) +static void extendGraphBuckets(ReebGraph *rg) { ReebArc *arc; @@ -916,7 +916,7 @@ void extendGraphBuckets(ReebGraph *rg) /**************************************** LENGTH CALCULATIONS ****************************************/ -void calculateArcLength(ReebArc *arc) +static void calculateArcLength(ReebArc *arc) { ReebArcIterator arc_iter; BArcIterator *iter = (BArcIterator*)&arc_iter; @@ -941,7 +941,7 @@ void calculateArcLength(ReebArc *arc) arc->length += len_v3v3(arc->tail->p, vec1); } -void calculateGraphLength(ReebGraph *rg) +static void calculateGraphLength(ReebGraph *rg) { ReebArc *arc; @@ -1196,7 +1196,7 @@ void postprocessGraph(ReebGraph *rg, char mode) /********************************************SORTING****************************************************/ -int compareNodesWeight(void *vnode1, void *vnode2) +static int compareNodesWeight(void *vnode1, void *vnode2) { ReebNode *node1 = (ReebNode*)vnode1; ReebNode *node2 = (ReebNode*)vnode2; @@ -1220,7 +1220,7 @@ void sortNodes(ReebGraph *rg) BLI_sortlist(&rg->nodes, compareNodesWeight); } -int compareArcsWeight(void *varc1, void *varc2) +static int compareArcsWeight(void *varc1, void *varc2) { ReebArc *arc1 = (ReebArc*)varc1; ReebArc *arc2 = (ReebArc*)varc2; @@ -1247,7 +1247,7 @@ void sortArcs(ReebGraph *rg) } /******************************************* JOINING ***************************************************/ -void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float start_weight) +static void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float start_weight) { ReebNode *node; float old_weight; @@ -1292,7 +1292,7 @@ void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float start_ } } -void reweightSubgraph(ReebGraph *rg, ReebNode *start_node, float start_weight) +static void reweightSubgraph(ReebGraph *rg, ReebNode *start_node, float start_weight) { int i; @@ -1307,7 +1307,7 @@ void reweightSubgraph(ReebGraph *rg, ReebNode *start_node, float start_weight) start_node->weight = start_weight; } -int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs) +static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs) { int joined = 0; int subgraph; @@ -1389,7 +1389,7 @@ int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs) } /* Reweight graph from smallest node, fix fliped arcs */ -void fixSubgraphsOrientation(ReebGraph *rg, int nb_subgraphs) +static void fixSubgraphsOrientation(ReebGraph *rg, int nb_subgraphs) { int subgraph; @@ -1416,7 +1416,7 @@ void fixSubgraphsOrientation(ReebGraph *rg, int nb_subgraphs) } } -int joinSubgraphs(ReebGraph *rg, float threshold) +static int joinSubgraphs(ReebGraph *rg, float threshold) { int nb_subgraphs; int joined = 0; @@ -1457,7 +1457,7 @@ int joinSubgraphs(ReebGraph *rg, float threshold) /****************************************** FILTERING **************************************************/ -float lengthArc(ReebArc *arc) +static float lengthArc(ReebArc *arc) { #if 0 ReebNode *head = (ReebNode*)arc->head; @@ -1469,7 +1469,7 @@ float lengthArc(ReebArc *arc) #endif } -int compareArcs(void *varc1, void *varc2) +static int compareArcs(void *varc1, void *varc2) { ReebArc *arc1 = (ReebArc*)varc1; ReebArc *arc2 = (ReebArc*)varc2; @@ -1490,7 +1490,7 @@ int compareArcs(void *varc1, void *varc2) } } -void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, ReebArc * srcArc, int merging) +static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, ReebArc * srcArc, int merging) { ReebArc *arc = NULL, *nextArc = NULL; @@ -1602,7 +1602,7 @@ void filterNullReebGraph(ReebGraph *rg) } } -int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_internal, float threshold_external) +static int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_internal, float threshold_external) { ReebArc *arc = NULL, *nextArc = NULL; int value = 0; @@ -1693,7 +1693,7 @@ int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_internal, flo return value; } -int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold)) +static int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold)) { ReebArc *arc1, *arc2; ReebArc *next2; @@ -1900,7 +1900,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) return value; } -void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external) +static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external) { int done = 1; @@ -1939,7 +1939,7 @@ void filterGraph(ReebGraph *rg, short options, float threshold_internal, float t removeNormalNodes(rg); } -void finalizeGraph(ReebGraph *rg, char passes, char method) +static void finalizeGraph(ReebGraph *rg, char passes, char method) { int i; @@ -1959,7 +1959,7 @@ void finalizeGraph(ReebGraph *rg, char passes, char method) /************************************** WEIGHT SPREADING ***********************************************/ -int compareVerts( const void* a, const void* b ) +static int compareVerts( const void* a, const void* b ) { EditVert *va = *(EditVert**)a; EditVert *vb = *(EditVert**)b; @@ -1977,7 +1977,7 @@ int compareVerts( const void* a, const void* b ) return value; } -void spreadWeight(EditMesh *em) +static void spreadWeight(EditMesh *em) { EditVert **verts, *eve; float lastWeight = 0.0f; @@ -2019,7 +2019,7 @@ void spreadWeight(EditMesh *em) /******************************************** EXPORT ***************************************************/ -void exportNode(FILE *f, const char *text, ReebNode *node) +static void exportNode(FILE *f, const char *text, ReebNode *node) { fprintf(f, "%s i:%i w:%f d:%i %f %f %f\n", text, node->index, node->weight, node->degree, node->p[0], node->p[1], node->p[2]); } @@ -2065,7 +2065,7 @@ void REEB_exportGraph(ReebGraph *rg, int count) /***************************************** MAIN ALGORITHM **********************************************/ /* edges alone will create zero degree nodes, use this function to remove them */ -void removeZeroNodes(ReebGraph *rg) +static void removeZeroNodes(ReebGraph *rg) { ReebNode *node, *next_node; @@ -2151,12 +2151,12 @@ void removeNormalNodes(ReebGraph *rg) } -int edgeEquals(ReebEdge *e1, ReebEdge *e2) +static int edgeEquals(ReebEdge *e1, ReebEdge *e2) { return (e1->v1 == e2->v1 && e1->v2 == e2->v2); } -ReebArc *nextArcMappedToEdge(ReebArc *arc, ReebEdge *e) +static ReebArc *nextArcMappedToEdge(ReebArc *arc, ReebEdge *e) { ReebEdge *nextEdge = NULL; ReebEdge *edge = NULL; @@ -2385,7 +2385,7 @@ int mergeArcs(ReebGraph *rg, ReebArc *a0, ReebArc *a1) return result; } -void glueByMergeSort(ReebGraph *rg, ReebArc *a0, ReebArc *a1, ReebEdge *e0, ReebEdge *e1) +static void glueByMergeSort(ReebGraph *rg, ReebArc *a0, ReebArc *a1, ReebEdge *e0, ReebEdge *e1) { int total = 0; while (total == 0 && a0 != a1 && a0 != NULL && a1 != NULL) @@ -2406,7 +2406,7 @@ void glueByMergeSort(ReebGraph *rg, ReebArc *a0, ReebArc *a1, ReebEdge *e0, Reeb } } -void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2) +static void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2) { ReebArc *a0, *a1, *a2; a0 = e0->arc; @@ -2417,7 +2417,7 @@ void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2) glueByMergeSort(rg, a0, a2, e0, e2); } -ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2) +static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2) { ReebEdge *edge; @@ -2499,7 +2499,7 @@ ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2) return edge; } -void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, ReebNode * n3, EditFace *efa) +static void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, ReebNode * n3, EditFace *efa) { ReebEdge *re1, *re2, *re3; ReebEdge *e1, *e2, *e3; @@ -2692,7 +2692,7 @@ static float cotan_weight(float *v1, float *v2, float *v3) return dot_v3v3(a, b)/clen; } -void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3) +static void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3) { /* Angle opposite e1 */ float t1= cotan_weight(v1->co, v2->co, v3->co) / e2; @@ -2888,7 +2888,7 @@ EditEdge * NextEdgeForVert(EdgeIndex *indexed_edges, int index) return indexed_edges->edges[offset]; } -void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeIndex *indexed_edges) +static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeIndex *indexed_edges) { Heap *edge_heap; EditVert *current_eve = NULL; @@ -2952,13 +2952,13 @@ void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeIndex *ind BLI_heap_free(edge_heap, NULL); } -void freeEdgeIndex(EdgeIndex *indexed_edges) +static void freeEdgeIndex(EdgeIndex *indexed_edges) { MEM_freeN(indexed_edges->offset); MEM_freeN(indexed_edges->edges); } -void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges) +static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges) { EditVert *eve; EditEdge *eed; diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 0ee852a6059..bb4b81f3078 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -41,11 +41,11 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_curve.h" #include "ED_object.h" #include "ED_screen.h" #include "ED_transform.h" - #include "curve_intern.h" diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 8f2e7c47c64..8051dbc1a6a 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -75,6 +75,8 @@ #include "ED_view3d.h" #include "ED_curve.h" +#include "curve_intern.h" + #include "UI_interface.h" #include "RNA_access.h" @@ -103,7 +105,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short /* still need to eradicate a few :( */ #define callocstructN(x,y,name) (x*)MEM_callocN((y)* sizeof(x),name) -float nurbcircle[8][2]= { +static float nurbcircle[8][2]= { {0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0}, {0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0} }; @@ -118,7 +120,7 @@ ListBase *curve_get_editcurve(Object *ob) } /* this replaces the active flag used in uv/face mode */ -void set_actNurb(Object *obedit, Nurb *nu) +static void set_actNurb(Object *obedit, Nurb *nu) { Curve *cu= obedit->data; @@ -130,7 +132,7 @@ void set_actNurb(Object *obedit, Nurb *nu) } } -Nurb *get_actNurb(Object *obedit) +static Nurb *get_actNurb(Object *obedit) { Curve *cu= obedit->data; ListBase *nurbs= ED_curve_editnurbs(cu); @@ -230,7 +232,7 @@ int isNurbsel(Nurb *nu) return 0; } -int isNurbsel_count(Curve *cu, Nurb *nu) +static int isNurbsel_count(Curve *cu, Nurb *nu) { BezTriple *bezt; BPoint *bp; diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 44fec631441..4b2b0043f65 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -62,6 +62,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_curve.h" #include "ED_object.h" #include "ED_screen.h" #include "ED_util.h" @@ -206,7 +207,7 @@ static char findaccent(char char1, unsigned int code) } -void update_string(Curve *cu) +static void update_string(Curve *cu) { EditFont *ef= cu->editfont; int len; diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c index 643b6c7082f..4a1e96b232d 100644 --- a/source/blender/editors/gpencil/editaction_gpencil.c +++ b/source/blender/editors/gpencil/editaction_gpencil.c @@ -59,7 +59,7 @@ /* Generics - Loopers */ /* Loops over the gp-frames for a gp-layer, and applies the given callback */ -short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *)) +static short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *)) { bGPDframe *gpf; diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 7590b2558f0..6af5e4cd92b 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -66,7 +66,7 @@ /* These are just 'dummy wrappers' around gpencil api calls */ /* make layer active one after being clicked on */ -void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl) +static void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl) { gpencil_layer_setactive(gpd, gpl); @@ -74,7 +74,7 @@ void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl) } /* delete 'active' layer */ -void gp_ui_dellayer_cb (bContext *C, void *gpd, void *gpl) +static void gp_ui_dellayer_cb (bContext *C, void *gpd, void *gpl) { /* make sure the layer we want to remove is the active one */ gpencil_layer_setactive(gpd, gpl); diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index b7f13ebe0b7..498108e8d0e 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -64,6 +64,7 @@ #include "UI_view2d.h" +#include "ED_gpencil.h" #include "ED_view3d.h" #include "gpencil_intern.h" diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index b6b2675e6c8..a84bf5774f6 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -38,6 +38,8 @@ #include "RNA_access.h" +#include "ED_gpencil.h" + #include "gpencil_intern.h" /* ****************************************** */ diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index ec3c5e69830..3d8c5dd7cae 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -85,5 +85,8 @@ void ED_curve_bpcpy(struct EditNurb *editnurb, struct BPoint *dst, struct BPoint int ED_curve_updateAnimPaths(struct Object *obedit); +/* debug only */ +void printknots(struct Object *obedit); + #endif /* ED_CURVE_H */ diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 353f89323e6..a2a0cefc55b 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -67,5 +67,7 @@ void ED_uvedit_live_unwrap_begin(struct Scene *scene, struct Object *obedit); void ED_uvedit_live_unwrap_re_solve(void); void ED_uvedit_live_unwrap_end(short cancel); +void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit); + #endif /* ED_UVEDIT_H */ diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 92e0d0011f4..416503b4626 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1203,7 +1203,7 @@ struct View2DScrollers { }; /* quick enum for vsm->zone (scroller handles) */ -enum { +static enum { SCROLLHANDLE_MIN= -1, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 2a391f7bbaf..6780cf921b8 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -93,7 +93,7 @@ void paintface_flush_flags(Object *ob) } /* returns 0 if not found, otherwise 1 */ -int facesel_face_pick(struct bContext *C, Mesh *me, short *mval, unsigned int *index, short rect) +static int facesel_face_pick(struct bContext *C, Mesh *me, short *mval, unsigned int *index, short rect) { ViewContext vc; view3d_set_viewcontext(C, &vc); @@ -152,7 +152,7 @@ MTFace *EM_get_active_mtface(EditMesh *em, EditFace **act_efa, MCol **mcol, int return NULL; } -void paintface_unhide(Scene *scene) +static void paintface_unhide(Scene *scene) { Mesh *me; MFace *mface; @@ -174,7 +174,7 @@ void paintface_unhide(Scene *scene) paintface_flush_flags(OBACT); } -void paintface_hide(Scene *scene) +static void paintface_hide(Scene *scene) { Mesh *me; MFace *mface; @@ -397,7 +397,7 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags) } } -void paintface_select_swap(Scene *scene) +static void paintface_select_swap(Scene *scene) { Mesh *me; MFace *mface; diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index d9db1e99bfa..f24c5d0d5db 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -288,7 +288,7 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) /* ********************** */ /* selected faces get hidden edges */ -int make_fgon(EditMesh *em, wmOperator *op, int make) +static int make_fgon(EditMesh *em, wmOperator *op, int make) { EditFace *efa; EditEdge *eed; @@ -667,7 +667,7 @@ static void fix_new_face(EditMesh *em, EditFace *eface) } /* only adds quads or trias when there's edges already */ -void addfaces_from_edgenet(EditMesh *em) +static void addfaces_from_edgenet(EditMesh *em) { EditVert *eve1, *eve2, *eve3, *eve4; @@ -868,10 +868,10 @@ void MESH_OT_edge_face_add(wmOperatorType *ot) // this hack is only used so that scons+mingw + split-sources hack works // ------------------------------- start copied code /* these are not the monkeys you are looking for */ -int monkeyo= 4; -int monkeynv= 271; -int monkeynf= 250; -signed char monkeyv[271][3]= { +static int monkeyo= 4; +static int monkeynv= 271; +static int monkeynf= 250; +static signed char monkeyv[271][3]= { {-71,21,98},{-63,12,88},{-57,7,74},{-82,-3,79},{-82,4,92}, {-82,17,100},{-92,21,102},{-101,12,95},{-107,7,83}, {-117,31,84},{-109,31,95},{-96,31,102},{-92,42,102}, @@ -942,7 +942,7 @@ signed char monkeyv[271][3]= { {-26,-16,-42},{-17,49,-49}, }; -signed char monkeyf[250][4]= { +static signed char monkeyf[250][4]= { {27,4,5,26}, {25,4,5,24}, {3,6,5,4}, {1,6,5,2}, {5,6,7,4}, {3,6,7,2}, {5,8,7,6}, {3,8,7,4}, {7,8,9,6}, {5,8,9,4}, {7,10,9,8}, {5,10,9,6}, {9,10,11,8}, diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c index 9ec50fdd6b3..aba8fabc621 100644 --- a/source/blender/editors/mesh/editmesh_lib.c +++ b/source/blender/editors/mesh/editmesh_lib.c @@ -2551,7 +2551,7 @@ static int tag_face_edges_test(EditFace *efa) return (efa->e1->tmp.l || efa->e2->tmp.l || efa->e3->tmp.l) ? 1:0; } -void em_deselect_nth_face(EditMesh *em, int nth, EditFace *efa_act) +static void em_deselect_nth_face(EditMesh *em, int nth, EditFace *efa_act) { EditFace *efa; EditEdge *eed; @@ -2623,7 +2623,7 @@ static int tag_edge_verts_test(EditEdge *eed) return (eed->v1->tmp.l || eed->v2->tmp.l) ? 1:0; } -void em_deselect_nth_edge(EditMesh *em, int nth, EditEdge *eed_act) +static void em_deselect_nth_edge(EditMesh *em, int nth, EditEdge *eed_act) { EditEdge *eed; EditVert *eve; @@ -2699,7 +2699,7 @@ void em_deselect_nth_edge(EditMesh *em, int nth, EditEdge *eed_act) EM_nfaces_selected(em); } -void em_deselect_nth_vert(EditMesh *em, int nth, EditVert *eve_act) +static void em_deselect_nth_vert(EditMesh *em, int nth, EditVert *eve_act) { EditVert *eve; EditEdge *eed; diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c index 451c341817b..a8dd3837bc2 100644 --- a/source/blender/editors/mesh/editmesh_loop.c +++ b/source/blender/editors/mesh/editmesh_loop.c @@ -192,7 +192,7 @@ static void edgering_sel(EditMesh *em, EditEdge *startedge, int select, int prev } } -void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) +static void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts) { ViewContext vc; // XXX EditEdge *nearest=NULL, *eed; diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 64bd9695ac9..24e1a2c6c5e 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -1353,7 +1353,7 @@ int mesh_layers_menu(CustomData *data, int type) { return ret; } -void EM_mesh_copy_edge(EditMesh *em, short type) +static void EM_mesh_copy_edge(EditMesh *em, short type) { EditSelection *ese; short change=0; @@ -1432,7 +1432,7 @@ void EM_mesh_copy_edge(EditMesh *em, short type) } } -void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type) +static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type) { short change=0; @@ -1561,7 +1561,7 @@ void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type) } -void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type) +static void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type) { short change=0; @@ -1692,7 +1692,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type) /* ctrl+c in mesh editmode */ -void mesh_copy_menu(EditMesh *em, wmOperator *op) +static void mesh_copy_menu(EditMesh *em, wmOperator *op) { EditSelection *ese; int ret; @@ -2840,7 +2840,7 @@ void MESH_OT_reveal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -int select_by_number_vertices_exec(bContext *C, wmOperator *op) +static int select_by_number_vertices_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); @@ -2902,7 +2902,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot) } -int select_mirror_exec(bContext *C, wmOperator *op) +static int select_mirror_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data)); @@ -3223,7 +3223,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) RNA_def_float(ot->srna, "sharpness", 135.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f); } -void select_non_manifold(EditMesh *em, wmOperator *op ) +static void select_non_manifold(EditMesh *em, wmOperator *op ) { EditVert *eve; EditEdge *eed; @@ -3520,7 +3520,7 @@ void MESH_OT_select_more(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void EM_select_less(EditMesh *em) +static void EM_select_less(EditMesh *em) { EditEdge *eed; EditFace *efa; @@ -4101,7 +4101,7 @@ static int mface_is_selected(MFace *mf) * which would use same as vertices method), then added * to interface! Hoera! - zr */ -void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me, wmOperator *op, int axis) +static void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me, wmOperator *op, int axis) { float norm[3]; int i, totselected = 0; @@ -4158,7 +4158,7 @@ static void face_getnormal_obspace(Object *obedit, EditFace *efa, float *fno) } -void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *op, View3D *v3d, RegionView3D *rv3d, int axis) +static void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *op, View3D *v3d, RegionView3D *rv3d, int axis) { int nselverts= EM_nvertices_selected(em); float norm[3]={0.0, 0.0, 0.0}; /* used for storing the mesh normal */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 090a9aa358f..24c4e887ecc 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -525,7 +525,7 @@ static void xsortvert_flag__doSetX(void *userData, EditVert *UNUSED(eve), int x, } /* all verts with (flag & 'flag') are sorted */ -void xsortvert_flag(bContext *C, int flag) +static void xsortvert_flag(bContext *C, int flag) { ViewContext vc; EditVert *eve; @@ -564,7 +564,7 @@ void xsortvert_flag(bContext *C, int flag) } /* called from buttons */ -void hashvert_flag(EditMesh *em, int flag) +static void hashvert_flag(EditMesh *em, int flag) { /* switch vertex order using hash table */ EditVert *eve; @@ -700,7 +700,7 @@ static int mesh_extrude_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -EnumPropertyItem extrude_items[] = { +static EnumPropertyItem extrude_items[] = { {1, "REGION", 0, "Region", ""}, {2, "FACES", 0, "Individual Faces", ""}, {3, "EDGES", 0, "Only Edges", ""}, @@ -3459,7 +3459,7 @@ void join_triangles(EditMesh *em) #define FACE_MARKCLEAR(f) (f->f1 = 1) /* quick hack, basically a copy of beautify_fill */ -void edge_flip(EditMesh *em) +static void edge_flip(EditMesh *em) { EditVert *v1, *v2, *v3, *v4; EditEdge *eed, *nexted; @@ -3834,7 +3834,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot) /* XXX old bevel not ported yet */ -void bevel_menu(EditMesh *em) +static void bevel_menu(EditMesh *em) { BME_Mesh *bm; BME_TransData_Head *td; diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index e0a91048a2c..f144ae60518 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -45,6 +45,7 @@ #include "WM_types.h" #include "ED_object.h" +#include "ED_mesh.h" #include "ED_screen.h" #include "ED_view3d.h" @@ -145,7 +146,7 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_select_nth); } -int ED_operator_editmesh_face_select(bContext *C) +static int ED_operator_editmesh_face_select(bContext *C) { Object *obedit= CTX_data_edit_object(C); if(obedit && obedit->type==OB_MESH) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index c4fe5f8fbc1..7c45e371a6e 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -1055,7 +1055,7 @@ long mesh_mirrtopo_table(Object *ob, char mode) return 0; } -int mesh_get_x_mirror_vert_spacial(Object *ob, int index) +static int mesh_get_x_mirror_vert_spacial(Object *ob, int index) { Mesh *me= ob->data; MVert *mvert; diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index b73f73820c7..c3cacfc4c39 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -48,6 +48,7 @@ #include "BKE_context.h" #include "BKE_mball.h" +#include "ED_mball.h" #include "ED_screen.h" #include "ED_view3d.h" #include "ED_transform.h" @@ -56,6 +57,8 @@ #include "WM_api.h" #include "WM_types.h" +#include "mball_intern.h" + /* This function is used to free all MetaElems from MetaBall */ void free_editMball(Object *obedit) { @@ -605,7 +608,7 @@ static void free_undoMball(void *lbv) MEM_freeN(lb); } -ListBase *metaball_get_editelems(Object *ob) +static ListBase *metaball_get_editelems(Object *ob) { if(ob && ob->type==OB_MBALL) { struct MetaBall *mb= (struct MetaBall*)ob->data; diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c index 14402d7dae6..6ea094d95af 100644 --- a/source/blender/editors/metaball/mball_ops.c +++ b/source/blender/editors/metaball/mball_ops.c @@ -31,7 +31,7 @@ #include "RNA_access.h" - +#include "ED_mball.h" #include "ED_screen.h" #include "mball_intern.h" diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 0b3e116d266..a5edc7d2598 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -67,6 +67,8 @@ #include "ED_object.h" +#include "object_intern.h" + /* ****************** render BAKING ********************** */ /* threaded break test */ @@ -117,7 +119,7 @@ typedef struct BakeRender { } BakeRender; /* use by exec and invoke */ -int test_bake_internal(bContext *C, ReportList *reports) +static int test_bake_internal(bContext *C, ReportList *reports) { Scene *scene= CTX_data_scene(C); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index f3346bf200c..2358df37806 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -140,7 +140,7 @@ bConstraint *get_active_constraint (Object *ob) /* ------------- PyConstraints ------------------ */ /* this callback sets the text-file to be used for selected menu item */ -void validate_pyconstraint_cb (void *arg1, void *arg2) +static void validate_pyconstraint_cb (void *arg1, void *arg2) { bPythonConstraint *data = arg1; Text *text= NULL; @@ -157,7 +157,7 @@ void validate_pyconstraint_cb (void *arg1, void *arg2) #ifdef WITH_PYTHON /* this returns a string for the list of usable pyconstraint script names */ -char *buildmenu_pyconstraints (Text *con_text, int *pyconindex) +static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex) { DynStr *pupds= BLI_dynstr_new(); Text *text; @@ -199,7 +199,7 @@ char *buildmenu_pyconstraints (Text *con_text, int *pyconindex) #endif /* WITH_PYTHON */ /* this callback gets called when the 'refresh' button of a pyconstraint gets pressed */ -void update_pyconstraint_cb (void *arg1, void *arg2) +static void update_pyconstraint_cb (void *arg1, void *arg2) { #ifndef WITH_PYTHON (void)arg1; /* unused */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index bb83827b2cb..28566dcda07 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -592,7 +592,7 @@ void OBJECT_OT_posemode_toggle(wmOperatorType *ot) /* *********************** */ -void check_editmode(int type) +static void check_editmode(int type) { Object *obedit= NULL; // XXX @@ -725,7 +725,7 @@ static void spot_interactive(Object *ob, int mode) } #endif -void special_editmenu(Scene *scene, View3D *v3d) +static void special_editmenu(Scene *scene, View3D *v3d) { // XXX static short numcuts= 2; Object *ob= OBACT; @@ -1200,7 +1200,7 @@ static void copy_texture_space(Object *to, Object *ob) } -void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) +static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) { Object *ob; Base *base; @@ -1448,7 +1448,7 @@ void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) DAG_ids_flush_update(bmain, 0); } -void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d) +static void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d) { Object *ob; short event; @@ -1719,7 +1719,7 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot) /* ********************** */ -void image_aspect(Scene *scene, View3D *v3d) +static void image_aspect(Scene *scene, View3D *v3d) { /* all selected objects with an image map: scale in image aspect */ Base *base; @@ -1778,7 +1778,7 @@ void image_aspect(Scene *scene, View3D *v3d) } -int vergbaseco(const void *a1, const void *a2) +static int vergbaseco(const void *a1, const void *a2) { Base **x1, **x2; @@ -1794,7 +1794,7 @@ int vergbaseco(const void *a1, const void *a2) } -void auto_timeoffs(Scene *scene, View3D *v3d) +static void auto_timeoffs(Scene *scene, View3D *v3d) { Base *base, **basesort, **bs; float start, delta; @@ -1835,7 +1835,7 @@ void auto_timeoffs(Scene *scene, View3D *v3d) } -void ofs_timeoffs(Scene *scene, View3D *v3d) +static void ofs_timeoffs(Scene *scene, View3D *v3d) { float offset=0.0f; @@ -1854,7 +1854,7 @@ void ofs_timeoffs(Scene *scene, View3D *v3d) } -void rand_timeoffs(Scene *scene, View3D *v3d) +static void rand_timeoffs(Scene *scene, View3D *v3d) { Base *base; float rand_ofs=0.0f; diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 3647d32c28d..375ea82c0b7 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -49,6 +49,8 @@ #include "BKE_lattice.h" #include "BKE_mesh.h" +#include "ED_lattice.h" +#include "ED_object.h" #include "ED_screen.h" #include "ED_view3d.h" #include "ED_util.h" @@ -181,7 +183,7 @@ void ED_setflagsLatt(Object *obedit, int flag) } } -int select_all_exec(bContext *C, wmOperator *op) +static int select_all_exec(bContext *C, wmOperator *op) { Object *obedit= CTX_data_edit_object(C); Lattice *lt= obedit->data; @@ -248,7 +250,7 @@ void LATTICE_OT_select_all(wmOperatorType *ot) WM_operator_properties_select_all(ot); } -int make_regular_poll(bContext *C) +static int make_regular_poll(bContext *C) { Object *ob; @@ -258,7 +260,7 @@ int make_regular_poll(bContext *C) return (ob && ob->type==OB_LATTICE); } -int make_regular_exec(bContext *C, wmOperator *UNUSED(op)) +static int make_regular_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob= CTX_data_edit_object(C); Lattice *lt; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 0f8e5cec21b..d64fc4960bd 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1156,7 +1156,7 @@ void OBJECT_OT_move_to_layer(wmOperatorType *ot) /************************** Link to Scene Operator *****************************/ -void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr)) +static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr)) { #if 0 Scene *sce= (Scene*) BLI_findlink(&bmain->scene, G.curscreen->scenenr-1); @@ -1366,7 +1366,7 @@ static void single_object_users__forwardModifierLinks(void *UNUSED(userData), Ob ID_NEW(*obpoin); } -void single_object_users(Scene *scene, View3D *v3d, int flag) +static void single_object_users(Scene *scene, View3D *v3d, int flag) { Base *base; Object *ob, *obn; @@ -1415,7 +1415,7 @@ void single_object_users(Scene *scene, View3D *v3d, int flag) set_sca_new_poins(); } -void new_id_matar(Material **matar, int totcol) +static void new_id_matar(Material **matar, int totcol) { ID *id; int a; @@ -1437,7 +1437,7 @@ void new_id_matar(Material **matar, int totcol) } } -void single_obdata_users(Main *bmain, Scene *scene, int flag) +static void single_obdata_users(Main *bmain, Scene *scene, int flag) { Object *ob; Lamp *la; @@ -1571,7 +1571,7 @@ static void single_mat_users(Scene *scene, int flag, int do_textures) } } -void do_single_tex_user(Tex **from) +static void do_single_tex_user(Tex **from) { Tex *tex, *texn; @@ -1592,7 +1592,7 @@ void do_single_tex_user(Tex **from) } } -void single_tex_users_expand(Main *bmain) +static void single_tex_users_expand(Main *bmain) { /* only when 'parent' blocks are LIB_NEW */ Material *ma; diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 3cb20ebbac0..5853a230719 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -58,6 +58,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_object.h" #include "ED_screen.h" #include "UI_interface.h" diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 355f1c153cf..cf5a5acf6ed 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -650,7 +650,7 @@ void OBJECT_OT_rotation_apply(wmOperatorType *ot) /************************ Texture Space Transform ****************************/ -void texspace_edit(Scene *scene, View3D *v3d) +static void texspace_edit(Scene *scene, View3D *v3d) { Base *base; int nr=0; diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index c673ea0fd2d..ab52d527561 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -150,7 +150,7 @@ void ED_vgroup_data_create(ID *id) } } -int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot) +static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot) { if(id) { switch(GS(id->name)) { @@ -304,7 +304,7 @@ int ED_vgroup_copy_array(Object *ob, Object *ob_from) /* for mesh in object mode lattice can be in editmode */ -void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum) +static void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum) { /* This routine removes the vertex from the deform * group with number def_nr. @@ -372,7 +372,7 @@ void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum) /* for Mesh in Object mode */ /* allows editmode for Lattice */ -void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, int assignmode) +static void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, int assignmode) { /* add the vert to the deform group with the * specified number diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 5cf6864cdc8..9ea8dde058f 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -65,6 +65,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "ED_physics.h" #include "ED_mesh.h" #include "ED_particle.h" #include "ED_view3d.h" @@ -939,7 +940,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit) } } /* force set distances between neighbouring keys */ -void PE_apply_lengths(Scene *scene, PTCacheEdit *edit) +static void PE_apply_lengths(Scene *scene, PTCacheEdit *edit) { ParticleEditSettings *pset=PE_settings(scene); diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 608c0f70c3e..2bc2bb7e81b 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -1050,27 +1050,27 @@ void fluidsimFreeBake(Object *UNUSED(ob)) /* compile dummy functions for disabled fluid sim */ -FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob)) +static FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob)) { return NULL; } -void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss)) +static void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss)) { } -FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss)) +static FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss)) { return NULL; } /* only compile dummy functions */ -int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob)) +static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob)) { return 0; } -void fluidsimFreeBake(Object *UNUSED(ob)) +static void fluidsimFreeBake(Object *UNUSED(ob)) { } diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 9aa879dad67..4c8c69bce01 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -75,13 +75,13 @@ static int ptcache_poll(bContext *C) return (ptr.data && ptr.id.data); } -void bake_console_progress(void *UNUSED(arg), int nr) +static void bake_console_progress(void *UNUSED(arg), int nr) { printf("\rbake: %3i%%", nr); fflush(stdout); } -void bake_console_progress_end(void *UNUSED(arg)) +static void bake_console_progress_end(void *UNUSED(arg)) { printf("\rbake: done!\n"); } diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c index b1cb1d9c2f1..04e47d06d7d 100644 --- a/source/blender/editors/render/render_ops.c +++ b/source/blender/editors/render/render_ops.c @@ -30,6 +30,8 @@ #include "WM_api.h" +#include "ED_render.h" + #include "render_intern.h" // own include #if (defined(WITH_QUICKTIME) && !defined(USE_QTKIT)) diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index cb4c727c213..86a07eba2d9 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -71,6 +71,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_render.h" #include "ED_curve.h" #include "ED_mesh.h" @@ -1095,7 +1096,7 @@ void ED_render_clear_mtex_copybuf(void) mtexcopied= 0; } -void copy_mtex_copybuf(ID *id) +static void copy_mtex_copybuf(ID *id) { MTex **mtex= NULL; @@ -1125,7 +1126,7 @@ void copy_mtex_copybuf(ID *id) } } -void paste_mtex_copybuf(ID *id) +static void paste_mtex_copybuf(ID *id) { MTex **mtex= NULL; diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 7374b579cab..7d526d217b9 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -47,6 +47,8 @@ #include "ED_object.h" #include "ED_armature.h" +#include "screen_intern.h" + int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result) { bScreen *sc= CTX_wm_screen(C); diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index ee448e70779..2c2ba4f148e 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -51,10 +51,10 @@ void removenotused_scredges(bScreen *sc); int scredge_is_horizontal(ScrEdge *se); ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my); -AZone *is_in_area_actionzone(ScrArea *sa, int x, int y); +struct AZone *is_in_area_actionzone(ScrArea *sa, int x, int y); /* screen_context.c */ -void ed_screen_context(const bContext *C, const char *member, bContextDataResult *result); +int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result); /* screendump.c */ void SCREEN_OT_screenshot(struct wmOperatorType *ot); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 9267f4d4e80..33c1fce4872 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2470,7 +2470,7 @@ static int header_toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *U return OPERATOR_CANCELLED; } -void SCREEN_OT_header_toolbox(wmOperatorType *ot) +static void SCREEN_OT_header_toolbox(wmOperatorType *ot) { /* identifiers */ ot->name= "Header Toolbox"; @@ -2917,7 +2917,7 @@ static int screen_new_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SCREEN_OT_new(wmOperatorType *ot) +static void SCREEN_OT_new(wmOperatorType *ot) { /* identifiers */ ot->name= "New Screen"; @@ -2942,7 +2942,7 @@ static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SCREEN_OT_delete(wmOperatorType *ot) +static void SCREEN_OT_delete(wmOperatorType *ot) { /* identifiers */ ot->name= "Delete Screen"; //was scene @@ -2977,7 +2977,7 @@ static int scene_new_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SCENE_OT_new(wmOperatorType *ot) +static void SCENE_OT_new(wmOperatorType *ot) { static EnumPropertyItem type_items[]= { {SCE_COPY_EMPTY, "EMPTY", 0, "Empty", "Add empty scene"}, @@ -3013,7 +3013,7 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void SCENE_OT_delete(wmOperatorType *ot) +static void SCENE_OT_delete(wmOperatorType *ot) { /* identifiers */ ot->name= "Delete Scene"; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 6a8d5043c43..47720049d7d 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1238,7 +1238,7 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const } /* run this outside project_paint_uvpixel_init since pixels with mask 0 dont need init */ -float project_paint_uvpixel_mask( +static float project_paint_uvpixel_mask( const ProjPaintState *ps, const int face_index, const int side, @@ -2141,7 +2141,7 @@ if __name__ == '__main__': /* checks if pt is inside a convex 2D polyline, the polyline must be ordered rotating clockwise * otherwise it would have to test for mixed (line_point_side_v2 > 0.0f) cases */ -int IsectPoly2Df(const float pt[2], float uv[][2], const int tot) +static int IsectPoly2Df(const float pt[2], float uv[][2], const int tot) { int i; if (line_point_side_v2(uv[tot-1], uv[0], pt) < 0.0f) diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 1ba0891751e..6118b28cc7c 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -28,6 +28,7 @@ #include "BKE_context.h" #include "BKE_paint.h" +#include "ED_sculpt.h" #include "ED_screen.h" #include "UI_resources.h" @@ -60,7 +61,7 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void BRUSH_OT_add(wmOperatorType *ot) +static void BRUSH_OT_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Brush"; @@ -115,7 +116,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void BRUSH_OT_scale_size(wmOperatorType *ot) +static void BRUSH_OT_scale_size(wmOperatorType *ot) { /* identifiers */ ot->name= "Scale Sculpt/Paint Brush Size"; @@ -142,7 +143,7 @@ static int vertex_color_set_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void PAINT_OT_vertex_color_set(wmOperatorType *ot) +static void PAINT_OT_vertex_color_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Vertex Colors"; @@ -171,7 +172,7 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void BRUSH_OT_reset(wmOperatorType *ot) +static void BRUSH_OT_reset(wmOperatorType *ot) { /* identifiers */ ot->name= "Reset Brush"; diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 92b5c541ea2..3a67775cb98 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -362,7 +362,7 @@ static int project_brush_radius(RegionView3D* rv3d, float radius, float location return len_v2v2(p1, p2); } -int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radius, +static int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radius, float location[3]) { struct PaintStroke *stroke; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 832d657428c..575b0012c6c 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -157,7 +157,7 @@ static int *get_indexarray(Mesh *me) /* in contradiction to cpack drawing colors, the MCOL colors (vpaint colors) are per byte! so not endian sensitive. Mcol = ABGR!!! so be cautious with cpack calls */ -unsigned int rgba_to_mcol(float r, float g, float b, float a) +static unsigned int rgba_to_mcol(float r, float g, float b, float a) { int ir, ig, ib, ia; unsigned int col; @@ -853,7 +853,7 @@ static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float /* else */ /* sets wp->weight to the closest weight value to vertex */ /* note: we cant sample frontbuf, weight colors are interpolated too unpredictable */ -void sample_wpaint(Scene *scene, ARegion *ar, View3D *UNUSED(v3d), int mode) +static void sample_wpaint(Scene *scene, ARegion *ar, View3D *UNUSED(v3d), int mode) { ViewContext vc; ToolSettings *ts= scene->toolsettings; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index b15381f5e1a..fa8d61d73de 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -140,7 +140,7 @@ struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob) } /* Check if there are any active modifiers in stack (used for flushing updates at enter/exit sculpt mode) */ -int sculpt_has_active_modifiers(Scene *scene, Object *ob) +static int sculpt_has_active_modifiers(Scene *scene, Object *ob) { ModifierData *md; @@ -252,7 +252,7 @@ typedef struct StrokeCache { /*** BVH Tree ***/ /* Get a screen-space rectangle of the modified area */ -int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, +static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, Object *ob, rcti *rect) { PBVH *pbvh= ob->sculpt->pbvh; @@ -504,7 +504,7 @@ static void flip_coord(float out[3], float in[3], const char symm) out[2]= in[2]; } -float calc_overlap(StrokeCache *cache, const char symm, const char axis, const float angle) +static float calc_overlap(StrokeCache *cache, const char symm, const char axis, const float angle) { float mirror[3]; float distsq; @@ -3186,7 +3186,7 @@ typedef struct { int original; } SculptRaycastData; -void sculpt_raycast_cb(PBVHNode *node, void *data_v, float* tmin) +static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float* tmin) { if (BLI_pbvh_node_get_tmin(node) < *tmin) { SculptRaycastData *srd = data_v; diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 30edc659fcb..df554efd979 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -61,6 +61,7 @@ #include "AUD_C-API.h" +#include "ED_sound.h" #include "ED_util.h" #include "sound_intern.h" @@ -189,7 +190,7 @@ static int pack_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void SOUND_OT_pack(wmOperatorType *ot) +static void SOUND_OT_pack(wmOperatorType *ot) { /* identifiers */ ot->name= "Pack Sound"; @@ -253,7 +254,7 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even return OPERATOR_FINISHED; } -void SOUND_OT_unpack(wmOperatorType *ot) +static void SOUND_OT_unpack(wmOperatorType *ot) { /* identifiers */ ot->name= "Unpack Sound"; diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c index 4dc77e13192..7bd326bac68 100644 --- a/source/blender/editors/space_action/action_draw.c +++ b/source/blender/editors/space_action/action_draw.c @@ -58,6 +58,7 @@ #include "ED_anim_api.h" #include "ED_keyframes_draw.h" +#include "action_intern.h" /* ************************************************************************* */ /* Channel List */ diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 4719c10e941..852927898b9 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -426,7 +426,7 @@ void ACTION_OT_paste (wmOperatorType *ot) /* ******************** Insert Keyframes Operator ************************* */ /* defines for insert keyframes tool */ -EnumPropertyItem prop_actkeys_insertkey_types[] = { +static EnumPropertyItem prop_actkeys_insertkey_types[] = { {1, "ALL", 0, "All Channels", ""}, {2, "SEL", 0, "Only Selected Channels", ""}, {3, "GROUP", 0, "In Active Group", ""}, // xxx not in all cases @@ -808,7 +808,7 @@ void ACTION_OT_sample (wmOperatorType *ot) /* ******************** Set Extrapolation-Type Operator *********************** */ /* defines for set extrapolation-type for selected keyframes tool */ -EnumPropertyItem prop_actkeys_expo_types[] = { +static EnumPropertyItem prop_actkeys_expo_types[] = { {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""}, {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""}, {0, NULL, 0, NULL, NULL} @@ -955,7 +955,7 @@ void ACTION_OT_interpolation_type (wmOperatorType *ot) /* ******************** Set Handle-Type Operator *********************** */ -EnumPropertyItem actkeys_handle_type_items[] = { +static EnumPropertyItem actkeys_handle_type_items[] = { {HD_FREE, "FREE", 0, "Free", ""}, {HD_VECT, "VECTOR", 0, "Vector", ""}, {HD_ALIGN, "ALIGNED", 0, "Aligned", ""}, @@ -1188,7 +1188,7 @@ void ACTION_OT_frame_jump (wmOperatorType *ot) /* ******************** Snap Keyframes Operator *********************** */ /* defines for snap keyframes tool */ -EnumPropertyItem prop_actkeys_snap_types[] = { +static EnumPropertyItem prop_actkeys_snap_types[] = { {ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", ""}, {ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? {ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry? @@ -1288,7 +1288,7 @@ void ACTION_OT_snap (wmOperatorType *ot) /* ******************** Mirror Keyframes Operator *********************** */ /* defines for mirror keyframes tool */ -EnumPropertyItem prop_actkeys_mirror_types[] = { +static EnumPropertyItem prop_actkeys_mirror_types[] = { {ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", ""}, {ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""}, {ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""}, diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 2c666937f58..9f4e94f8d27 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -182,7 +182,7 @@ void ACTION_OT_select_all_toggle (wmOperatorType *ot) */ /* defines for borderselect mode */ -enum { +static enum { ACTKEYS_BORDERSEL_ALLKEYS = 0, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_CHANNELS, diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 792f212f638..3f3611d75f5 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -52,6 +52,7 @@ #include "UI_resources.h" #include "UI_view2d.h" +#include "ED_space_api.h" #include "ED_anim_api.h" #include "ED_markers.h" diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 0aac167fed2..a00b5a50229 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -266,7 +266,7 @@ static void xxx_keymap(wmKeyConfig *UNUSED(keyconf)) } /* only called once, from screen/spacetypes.c */ -void ED_spacetype_xxx(void) +static void ED_spacetype_xxx(void) { static SpaceType st; diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 61485987cc9..afb8acb087b 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -39,6 +39,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" @@ -177,13 +178,13 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) sbuts->mainbo= sbuts->mainb; } -void buttons_operatortypes(void) +static void buttons_operatortypes(void) { WM_operatortype_append(BUTTONS_OT_toolbox); WM_operatortype_append(BUTTONS_OT_file_browse); } -void buttons_keymap(struct wmKeyConfig *keyconf) +static void buttons_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0); diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 05c3561d25e..3a7c306ac50 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -75,7 +75,7 @@ void console_scrollback_free(SpaceConsole *sc, ConsoleLine *cl) MEM_freeN(cl); } -void console_scrollback_limit(SpaceConsole *sc) +static void console_scrollback_limit(SpaceConsole *sc) { int tot; diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index c44d13aa058..126db64e2a8 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -21,8 +21,7 @@ * * ***** END GPL LICENSE BLOCK ***** */ - - #include +#include #include #ifdef WIN32 @@ -39,6 +38,7 @@ #include "BKE_screen.h" #include "BKE_idcode.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" @@ -225,7 +225,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); } -void console_operatortypes(void) +static void console_operatortypes(void) { /* console_ops.c */ WM_operatortype_append(CONSOLE_OT_move); @@ -243,7 +243,7 @@ void console_operatortypes(void) WM_operatortype_append(CONSOLE_OT_select_set); } -void console_keymap(struct wmKeyConfig *keyconf) +static void console_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Console", SPACE_CONSOLE, 0); wmKeyMapItem *kmi; diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 54a462ad84a..c0d096ed7e0 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -76,7 +76,7 @@ #define TILE_BORDER_Y 8 /* button events */ -enum { +static enum { B_FS_DIRNAME, B_FS_FILENAME } eFile_ButEvents; diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index fea50f1f2aa..67b74010e53 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -516,7 +516,7 @@ int file_cancel_exec(bContext *C, wmOperator *UNUSED(unused)) return OPERATOR_FINISHED; } -int file_operator_poll(bContext *C) +static int file_operator_poll(bContext *C) { int poll = ED_operator_file_active(C); SpaceFile *sfile= CTX_wm_space_file(C); @@ -735,7 +735,7 @@ void FILE_OT_parent(struct wmOperatorType *ot) } -int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused)) +static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused)) { SpaceFile *sfile= CTX_wm_space_file(C); @@ -1028,7 +1028,7 @@ static void file_expand_directory(bContext *C) } } -int file_directory_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int file_directory_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { SpaceFile *sfile= CTX_wm_space_file(C); @@ -1116,7 +1116,7 @@ void FILE_OT_refresh(struct wmOperatorType *ot) ot->poll= ED_operator_file_active; /* <- important, handler is on window level */ } -int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused)) +static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused)) { SpaceFile *sfile= CTX_wm_space_file(C); @@ -1169,7 +1169,7 @@ struct ARegion *file_buttons_region(struct ScrArea *sa) return arnew; } -int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused)) +static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused)) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= file_buttons_region(sa); @@ -1193,7 +1193,7 @@ void FILE_OT_bookmark_toggle(struct wmOperatorType *ot) } -int file_filenum_exec(bContext *C, wmOperator *op) +static int file_filenum_exec(bContext *C, wmOperator *op) { SpaceFile *sfile= CTX_wm_space_file(C); ScrArea *sa= CTX_wm_area(C); @@ -1225,7 +1225,7 @@ void FILE_OT_filenum(struct wmOperatorType *ot) RNA_def_int(ot->srna, "increment", 1, 0, 100, "Increment", "", 0,100); } -int file_rename_exec(bContext *C, wmOperator *UNUSED(op)) +static int file_rename_exec(bContext *C, wmOperator *UNUSED(op)) { ScrArea *sa= CTX_wm_area(C); SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C); @@ -1246,7 +1246,7 @@ int file_rename_exec(bContext *C, wmOperator *UNUSED(op)) } -int file_rename_poll(bContext *C) +static int file_rename_poll(bContext *C) { int poll = ED_operator_file_active(C); SpaceFile *sfile= CTX_wm_space_file(C); @@ -1277,7 +1277,7 @@ void FILE_OT_rename(struct wmOperatorType *ot) } -int file_delete_poll(bContext *C) +static int file_delete_poll(bContext *C) { int poll = ED_operator_file_active(C); SpaceFile *sfile= CTX_wm_space_file(C); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index b92b95e2efd..44dc19f67b8 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -27,7 +27,6 @@ * ***** END GPL LICENSE BLOCK ***** */ - /* global includes */ #include @@ -62,6 +61,7 @@ #include "DNA_space_types.h" +#include "ED_fileselect.h" #include "ED_datafiles.h" #include "IMB_imbuf.h" @@ -562,7 +562,7 @@ void filelist_freelib(struct FileList* filelist) filelist->libfiledata= 0; } -struct BlendHandle *filelist_lib(struct FileList* filelist) +static struct BlendHandle *filelist_lib(struct FileList* filelist) { return filelist->libfiledata; } @@ -593,7 +593,7 @@ short filelist_changed(struct FileList* filelist) return filelist->changed; } -struct ImBuf * filelist_loadimage(struct FileList* filelist, int index) +static struct ImBuf * filelist_loadimage(struct FileList* filelist, int index) { ImBuf *imb = NULL; int fidx = 0; @@ -807,7 +807,7 @@ int ED_file_extension_icon(char *relname) return ICON_FILE_BLANK; } -void filelist_setfiletypes(struct FileList* filelist) +static void filelist_setfiletypes(struct FileList* filelist) { struct direntry *file; int num; diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index b8ffc73caf0..47140bd6e74 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -47,6 +47,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "ED_fileselect.h" @@ -60,7 +61,6 @@ #include "UI_view2d.h" - #include "file_intern.h" // own include #include "fsmenu.h" #include "filelist.h" @@ -363,7 +363,7 @@ static void file_main_area_draw(const bContext *C, ARegion *ar) } -void file_operatortypes(void) +static void file_operatortypes(void) { WM_operatortype_append(FILE_OT_select); WM_operatortype_append(FILE_OT_select_all_toggle); @@ -389,7 +389,7 @@ void file_operatortypes(void) } /* NOTE: do not add .blend file reading on this level */ -void file_keymap(struct wmKeyConfig *keyconf) +static void file_keymap(struct wmKeyConfig *keyconf) { wmKeyMapItem *kmi; /* keys for all areas */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index e21dd46140e..697ea86e43a 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -400,7 +400,7 @@ void GRAPH_OT_ghost_curves_clear (wmOperatorType *ot) /* ******************** Insert Keyframes Operator ************************* */ /* defines for insert keyframes tool */ -EnumPropertyItem prop_graphkeys_insertkey_types[] = { +static EnumPropertyItem prop_graphkeys_insertkey_types[] = { {1, "ALL", 0, "All Channels", ""}, {2, "SEL", 0, "Only Selected Channels", ""}, {0, NULL, 0, NULL, NULL} @@ -1224,7 +1224,7 @@ void GRAPH_OT_sample (wmOperatorType *ot) /* ******************** Set Extrapolation-Type Operator *********************** */ /* defines for set extrapolation-type for selected keyframes tool */ -EnumPropertyItem prop_graphkeys_expo_types[] = { +static EnumPropertyItem prop_graphkeys_expo_types[] = { {FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""}, {FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""}, {0, NULL, 0, NULL, NULL} @@ -1637,7 +1637,7 @@ void GRAPH_OT_frame_jump (wmOperatorType *ot) /* ******************** Snap Keyframes Operator *********************** */ /* defines for snap keyframes tool */ -EnumPropertyItem prop_graphkeys_snap_types[] = { +static EnumPropertyItem prop_graphkeys_snap_types[] = { {GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", ""}, {GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", ""}, {GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? @@ -1745,7 +1745,7 @@ void GRAPH_OT_snap (wmOperatorType *ot) /* ******************** Mirror Keyframes Operator *********************** */ /* defines for mirror keyframes tool */ -EnumPropertyItem prop_graphkeys_mirror_types[] = { +static EnumPropertyItem prop_graphkeys_mirror_types[] = { {GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", ""}, {GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", ""}, {GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""}, diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index e5aca9cb121..57e9f49f69d 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -159,7 +159,7 @@ static int graphview_cursor_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -void GRAPH_OT_cursor_set(wmOperatorType *ot) +static void GRAPH_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Cursor"; @@ -199,7 +199,7 @@ static int view_toggle_handles_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void GRAPH_OT_view_togglehandles (wmOperatorType *ot) +static void GRAPH_OT_view_togglehandles (wmOperatorType *ot) { /* identification */ ot->name= "Show/Hide All Handles"; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 37d58e5591b..7a8bc9a65d6 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -45,6 +45,7 @@ #include "BKE_fcurve.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "ED_anim_api.h" #include "ED_markers.h" diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index c038f58375c..1b3bd59f648 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -85,9 +85,6 @@ void IMAGE_OT_curves_point_set(struct wmOperatorType *ot); void IMAGE_OT_record_composite(struct wmOperatorType *ot); -/* uvedit_draw.c */ -void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit); - /* image_panels.c */ struct ImageUser *ntree_get_active_iuser(struct bNodeTree *ntree); void image_buttons_register(struct ARegionType *art); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index a0fda09c92b..9fad528b583 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1858,7 +1858,7 @@ typedef struct RecordCompositeData { int sfra, efra; } RecordCompositeData; -int record_composite_apply(bContext *C, wmOperator *op) +static int record_composite_apply(bContext *C, wmOperator *op) { SpaceImage *sima= CTX_wm_space_image(C); RecordCompositeData *rcd= op->customdata; diff --git a/source/blender/editors/space_image/image_render.c b/source/blender/editors/space_image/image_render.c index d80801f8868..f09a1353935 100644 --- a/source/blender/editors/space_image/image_render.c +++ b/source/blender/editors/space_image/image_render.c @@ -52,7 +52,7 @@ static ScrArea *image_area= NULL; /* can get as well the full picture, as the parts while rendering */ /* XXX will be obsolete, here for reference now */ -void imagewindow_progress(SpaceImage *sima, RenderResult *rr, volatile rcti *renrect) +static void imagewindow_progress(SpaceImage *sima, RenderResult *rr, volatile rcti *renrect) { float x1, y1, *rectf= NULL; unsigned int *rect32= NULL; @@ -124,7 +124,7 @@ void imagewindow_progress(SpaceImage *sima, RenderResult *rr, volatile rcti *ren /* coming from BIF_toggle_render_display() */ -void imagewindow_toggle_render(bContext *C) +static void imagewindow_toggle_render(bContext *C) { bScreen *sc= CTX_wm_screen(C); ScrArea *sa; @@ -163,7 +163,7 @@ static void imagewindow_renderinfo_cb(void *UNUSED(handle), RenderStats *UNUSED( } } -void ED_space_image_render_callbacks(bContext *C, Render *re) +static void ED_space_image_render_callbacks(bContext *C, Render *re) { // RE_display_init_cb(re, C, imagewindow_init_display_cb); diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index af4e496f68a..6606ca4cc4e 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -49,6 +49,7 @@ #include "IMB_imbuf_types.h" +#include "ED_image.h" #include "ED_mesh.h" #include "ED_space_api.h" #include "ED_screen.h" @@ -458,7 +459,7 @@ static SpaceLink *image_duplicate(SpaceLink *sl) return (SpaceLink *)simagen; } -void image_operatortypes(void) +static void image_operatortypes(void) { WM_operatortype_append(IMAGE_OT_view_all); WM_operatortype_append(IMAGE_OT_view_pan); @@ -491,7 +492,7 @@ void image_operatortypes(void) WM_operatortype_append(IMAGE_OT_scopes); } -void image_keymap(struct wmKeyConfig *keyconf) +static void image_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0); wmKeyMapItem *kmi; diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index aa5a00e1642..b5abc077eef 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -43,6 +43,7 @@ #include "BKE_mesh.h" #include "BKE_particle.h" +#include "ED_info.h" #include "ED_armature.h" #include "ED_mesh.h" #include "ED_curve.h" /* for ED_curve_editnurbs */ @@ -418,7 +419,7 @@ void ED_info_stats_clear(Scene *scene) } } -char *ED_info_stats_string(Scene *scene) +const char *ED_info_stats_string(Scene *scene) { if(!scene->stats) stats_update(scene); diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 80040f55a08..b7360f75de9 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -40,6 +40,7 @@ #include "BKE_global.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" @@ -51,7 +52,6 @@ #include "UI_interface.h" #include "UI_view2d.h" - #include "info_intern.h" // own include /* ******************** default callbacks for info space ***************** */ @@ -169,7 +169,7 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); } -void info_operatortypes(void) +static void info_operatortypes(void) { WM_operatortype_append(FILE_OT_pack_all); WM_operatortype_append(FILE_OT_unpack_all); @@ -189,7 +189,7 @@ void info_operatortypes(void) WM_operatortype_append(INFO_OT_report_copy); } -void info_keymap(struct wmKeyConfig *keyconf) +static void info_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Window", 0, 0); @@ -277,7 +277,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu) } } -void recent_files_menu_register(void) +static void recent_files_menu_register(void) { MenuType *mt; diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index cda2aea23fa..4bcb7c1d2f3 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -39,6 +39,7 @@ #include "BKE_main.h" #include "BKE_sca.h" +#include "ED_logic.h" #include "ED_object.h" #include "ED_screen.h" @@ -52,7 +53,6 @@ #include "logic_intern.h" /* ************* Generic Operator Helpers ************* */ - static int edit_sensor_poll(bContext *C) { PointerRNA ptr= CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor); @@ -247,7 +247,7 @@ static int sensor_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void LOGIC_OT_sensor_remove(wmOperatorType *ot) +static void LOGIC_OT_sensor_remove(wmOperatorType *ot) { ot->name= "Remove Sensor"; ot->description= "Remove a sensor from the active object"; @@ -299,7 +299,7 @@ static int sensor_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void LOGIC_OT_sensor_add(wmOperatorType *ot) +static void LOGIC_OT_sensor_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -350,7 +350,7 @@ static int controller_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void LOGIC_OT_controller_remove(wmOperatorType *ot) +static void LOGIC_OT_controller_remove(wmOperatorType *ot) { ot->name= "Remove Controller"; ot->description= "Remove a controller from the active object"; @@ -416,7 +416,7 @@ static int controller_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void LOGIC_OT_controller_add(wmOperatorType *ot) +static void LOGIC_OT_controller_add(wmOperatorType *ot) { /* identifiers */ ot->name= "Add Controller"; @@ -464,7 +464,7 @@ static int actuator_remove_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e return OPERATOR_CANCELLED; } -void LOGIC_OT_actuator_remove(wmOperatorType *ot) +static void LOGIC_OT_actuator_remove(wmOperatorType *ot) { ot->name= "Remove Actuator"; ot->description= "Remove a actuator from the active object"; @@ -516,7 +516,7 @@ static int actuator_add_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void LOGIC_OT_actuator_add(wmOperatorType *ot) +static void LOGIC_OT_actuator_add(wmOperatorType *ot) { PropertyRNA *prop; @@ -572,7 +572,7 @@ static int sensor_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event return OPERATOR_CANCELLED; } -void LOGIC_OT_sensor_move(wmOperatorType *ot) +static void LOGIC_OT_sensor_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move Sensor"; @@ -617,7 +617,7 @@ static int controller_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e return OPERATOR_CANCELLED; } -void LOGIC_OT_controller_move(wmOperatorType *ot) +static void LOGIC_OT_controller_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move Controller"; @@ -662,7 +662,7 @@ static int actuator_move_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve return OPERATOR_CANCELLED; } -void LOGIC_OT_actuator_move(wmOperatorType *ot) +static void LOGIC_OT_actuator_move(wmOperatorType *ot) { /* identifiers */ ot->name= "Move Actuator"; diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index ae533e80610..40206a314e8 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -356,7 +356,7 @@ static void old_sca_move_actuator(bContext *C, void *datav, void *move_up) } } -void do_logic_buts(bContext *C, void *UNUSED(arg), int event) +static void do_logic_buts(bContext *C, void *UNUSED(arg), int event) { Main *bmain= CTX_data_main(C); bSensor *sens; @@ -1786,13 +1786,13 @@ static void change_ipo_actuator(bContext *UNUSED(C), void *arg1_but, void *arg2_ but->retval = B_REDR; } -void update_object_actuator_PID(bContext *UNUSED(C), void *act, void *UNUSED(arg)) +static void update_object_actuator_PID(bContext *UNUSED(C), void *act, void *UNUSED(arg)) { bObjectActuator *oa = act; oa->forcerot[0] = 60.0f*oa->forcerot[1]; } -char *get_state_name(Object *ob, short bit) +static char *get_state_name(Object *ob, short bit) { bController *cont; unsigned int mask; @@ -3480,7 +3480,7 @@ static void draw_sensor_touch(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "material", 0, NULL, ICON_NULL); } -void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C) +static void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C) { uiLayout *box; @@ -3600,7 +3600,7 @@ static void draw_controller_state(uiLayout *UNUSED(layout), PointerRNA *UNUSED(p } -void draw_brick_controller(uiLayout *layout, PointerRNA *ptr) +static void draw_brick_controller(uiLayout *layout, PointerRNA *ptr) { uiLayout *box; @@ -4355,7 +4355,7 @@ static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr) uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NULL); } -void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C) +static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C) { uiLayout *box; diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c index a945af502a0..516130aa09b 100644 --- a/source/blender/editors/space_logic/space_logic.c +++ b/source/blender/editors/space_logic/space_logic.c @@ -39,6 +39,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" @@ -169,13 +170,13 @@ static SpaceLink *logic_duplicate(SpaceLink *sl) return (SpaceLink *)slogicn; } -void logic_operatortypes(void) +static void logic_operatortypes(void) { WM_operatortype_append(LOGIC_OT_properties); WM_operatortype_append(LOGIC_OT_links_cut); } -void logic_keymap(struct wmKeyConfig *keyconf) +static void logic_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap= WM_keymap_find(keyconf, "Logic Editor", SPACE_LOGIC, 0); diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index b70a6339fed..d43b86b436d 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -929,7 +929,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"; @@ -1555,7 +1555,7 @@ void NLA_OT_clear_scale (wmOperatorType *ot) /* Moves the start-point of the selected strips to the specified places */ /* defines for snap keyframes tool */ -EnumPropertyItem prop_nlaedit_snap_types[] = { +static EnumPropertyItem prop_nlaedit_snap_types[] = { {NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current frame", ""}, {NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry? {NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry? diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 294559a427b..d732ec71f03 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -86,7 +86,7 @@ static short selmodes_to_flagmodes (short sel) * 3) (de)select all - no testing is done; only for use internal tools as normal function... */ -enum { +static enum { DESELECT_STRIPS_NOTEST = 0, DESELECT_STRIPS_TEST, DESELECT_STRIPS_CLEARACTIVE, @@ -206,7 +206,7 @@ void NLA_OT_select_all_toggle (wmOperatorType *ot) */ /* defines for borderselect mode */ -enum { +static enum { NLA_BORDERSEL_ALLSTRIPS = 0, NLA_BORDERSEL_FRAMERANGE, NLA_BORDERSEL_CHANNELS, diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index db9255a867b..06b1b93b590 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -44,6 +44,7 @@ #include "BKE_main.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_anim_api.h" #include "ED_markers.h" #include "ED_screen.h" diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index e1577309afa..4c336c2c313 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -150,7 +150,7 @@ static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA } static float *_sample_col= NULL; // bad bad, 2.5 will do better? -void node_curvemap_sample(float *col) +static void node_curvemap_sample(float *col) { _sample_col= col; } diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index b8a205d6eb1..2d54353cb90 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -53,6 +53,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_node.h" #include "ED_gpencil.h" #include "UI_interface.h" diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 624630b9846..385dfbcd9a8 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -210,7 +210,7 @@ static int composite_node_active(bContext *C) } /* also checks for edited groups */ -bNode *editnode_get_active(bNodeTree *ntree) +static bNode *editnode_get_active(bNodeTree *ntree) { bNode *node; @@ -1352,7 +1352,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot) /* return 0, nothing done */ -/*static*/ int node_mouse_groupheader(SpaceNode *snode) +static int node_mouse_groupheader(SpaceNode *snode) { bNode *gnode; float mx=0, my=0; @@ -1481,7 +1481,7 @@ typedef struct bNodeListItem { struct bNode *node; } bNodeListItem; -int sort_nodes_locx(void *a, void *b) +static int sort_nodes_locx(void *a, void *b) { bNodeListItem *nli1 = (bNodeListItem *)a; bNodeListItem *nli2 = (bNodeListItem *)b; diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index db5c493dcd9..9c2b6f0274d 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -31,6 +31,7 @@ #include "BKE_context.h" +#include "ED_node.h" #include "ED_screen.h" #include "ED_transform.h" diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index 1ac745b8c0e..90bf8ebb39f 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -45,6 +45,7 @@ #include "BKE_screen.h" #include "BKE_node.h" +#include "ED_space_api.h" #include "ED_render.h" #include "ED_screen.h" diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 895cfc74498..1b6b4d2eaba 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -1189,7 +1189,7 @@ static void outliner_make_hierarchy(SpaceOops *soops, ListBase *lb) } /* Helped function to put duplicate sequence in the same tree. */ -int need_add_seq_dup(Sequence *seq) +static int need_add_seq_dup(Sequence *seq) { Sequence *p; @@ -1226,7 +1226,7 @@ int need_add_seq_dup(Sequence *seq) return(1); } -void add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index) +static void add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index) { TreeElement *ch; Sequence *p; @@ -1611,7 +1611,7 @@ static int common_restrict_check(bContext *C, Object *ob) return 1; } -void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base= (Base *)te->directdata; Object *ob = (Object *)tselem->id; @@ -1694,7 +1694,7 @@ void OUTLINER_OT_selectability_toggle(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; } -void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) +static void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem) { Base *base= (Base *)te->directdata; @@ -1900,7 +1900,7 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *te #endif // XXX just use View2D ops for this? -void outliner_page_up_down(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int up) +static void outliner_page_up_down(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int up) { int dy= ar->v2d.mask.ymax-ar->v2d.mask.ymin; @@ -3416,7 +3416,7 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li } } -void outliner_del(bContext *C, Scene *scene, ARegion *UNUSED(ar), SpaceOops *soops) +static void outliner_del(bContext *C, Scene *scene, ARegion *UNUSED(ar), SpaceOops *soops) { if(soops->outlinevis==SO_SEQUENCE) @@ -3962,7 +3962,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle /* These operators are only available in databrowser mode for now, as * they depend on having RNA paths and/or hierarchies available. */ -enum { +static enum { DRIVERS_EDITMODE_ADD = 0, DRIVERS_EDITMODE_REMOVE, } eDrivers_EditModes; @@ -4116,7 +4116,7 @@ void OUTLINER_OT_drivers_delete_selected(wmOperatorType *ot) /* These operators are only available in databrowser mode for now, as * they depend on having RNA paths and/or hierarchies available. */ -enum { +static enum { KEYINGSET_EDITMODE_ADD = 0, KEYINGSET_EDITMODE_REMOVE, } eKeyingSet_EditModes; diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 0b941e910f8..66404287693 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -39,6 +39,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "WM_api.h" diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index d0631f5651a..502b01c366a 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -39,6 +39,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 635e261b26e..afabbc93610 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -71,7 +71,7 @@ /* Note, Dont use WHILE_SEQ while drawing! - it messes up transform, - Campbell */ -int no_rightbox=0, no_leftbox= 0; +static int no_rightbox=0, no_leftbox= 0; static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, float y1, float x2, float y2); static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[3]) @@ -673,7 +673,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline static Sequence *special_seq_update= 0; -void set_special_seq_update(int val) +static void set_special_seq_update(int val) { // int x; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 505b38147f7..6299d22fac0 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -106,7 +106,7 @@ EnumPropertyItem prop_side_types[] = { {0, NULL, 0, NULL, NULL} }; -EnumPropertyItem prop_side_lr_types[] = { +static EnumPropertyItem prop_side_lr_types[] = { {SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""}, {SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""}, {0, NULL, 0, NULL, NULL} @@ -121,7 +121,7 @@ typedef struct TransSeq { int len; } TransSeq; -Sequence *get_foreground_frame_seq(Scene *scene, int frame) +static Sequence *get_foreground_frame_seq(Scene *scene, int frame) { Editing *ed= seq_give_editing(scene, FALSE); Sequence *seq, *best_seq=NULL; @@ -205,7 +205,7 @@ void boundbox_seq(Scene *scene, rctf *rect) } -int mouse_frame_side(View2D *v2d, short mouse_x, int frame ) +static int mouse_frame_side(View2D *v2d, short mouse_x, int frame ) { short mval[2]; float mouseloc[2]; @@ -252,7 +252,7 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se return NULL; } -Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel) +static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel) { /* sel - 0==unselected, 1==selected, -1==done care*/ Sequence *seq,*best_seq = NULL; @@ -506,7 +506,7 @@ static void reload_image_strip(Scene *scene, char *UNUSED(name)) } -void change_sequence(Scene *scene) +static void change_sequence(Scene *scene) { Editing *ed= seq_give_editing(scene, FALSE); Sequence *last_seq= seq_active_get(scene); @@ -952,7 +952,7 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe return did_something; } -int insert_gap(Scene *scene, int gap, int cfra) +static int insert_gap(Scene *scene, int gap, int cfra) { Sequence *seq; Editing *ed= seq_give_editing(scene, FALSE); @@ -974,7 +974,7 @@ int insert_gap(Scene *scene, int gap, int cfra) return done; } -void touch_seq_files(Scene *scene) +static void touch_seq_files(Scene *scene) { Sequence *seq; Editing *ed= seq_give_editing(scene, FALSE); @@ -1029,7 +1029,7 @@ static void set_filter_seq(Scene *scene) } */ -void seq_remap_paths(Scene *scene) +static void seq_remap_paths(Scene *scene) { Sequence *seq, *last_seq = seq_active_get(scene); Editing *ed= seq_give_editing(scene, FALSE); @@ -1070,7 +1070,7 @@ void seq_remap_paths(Scene *scene) } -void no_gaps(Scene *scene) +static void no_gaps(Scene *scene) { Editing *ed= seq_give_editing(scene, FALSE); int cfra, first= 0, done; @@ -1466,7 +1466,7 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -int sequencer_effect_poll(bContext *C) +static int sequencer_effect_poll(bContext *C) { Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index a20d2d7680e..869d8f17680 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -60,7 +60,7 @@ #include "sequencer_intern.h" static void *find_nearest_marker(int UNUSED(d1), int UNUSED(d2)) {return NULL;} -void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */ +static void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */ { Sequence *neighbor; @@ -154,7 +154,7 @@ void select_surround_from_last(Scene *scene) #endif -void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */ +static void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */ { Editing *ed= seq_give_editing(scene, FALSE); @@ -177,7 +177,7 @@ void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING B // remove this function, replace with invert operator //void swap_select_seq(Scene *scene) -void select_neighbor_from_last(Scene *scene, int lr) +static void select_neighbor_from_last(Scene *scene, int lr) { Sequence *seq= seq_active_get(scene); Sequence *neighbor; diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index ed280d765f0..5323c3d064e 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -43,6 +43,8 @@ #include "BKE_sequencer.h" #include "BKE_global.h" +#include "ED_space_api.h" +#include "ED_sequencer.h" #include "ED_screen.h" #include "ED_view3d.h" /* only for sequencer view3d drawing callback */ @@ -83,7 +85,7 @@ ARegion *sequencer_has_buttons_region(ScrArea *sa) return arnew; } -ARegion *sequencer_find_region(ScrArea *sa, short type) +static ARegion *sequencer_find_region(ScrArea *sa, short type) { ARegion *ar=NULL; diff --git a/source/blender/editors/space_sound/space_sound.c b/source/blender/editors/space_sound/space_sound.c index 200f15f6109..4ae452850a7 100644 --- a/source/blender/editors/space_sound/space_sound.c +++ b/source/blender/editors/space_sound/space_sound.c @@ -41,6 +41,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" @@ -165,12 +166,12 @@ static void sound_main_area_draw(const bContext *C, ARegion *ar) /* scrollers? */ } -void sound_operatortypes(void) +static void sound_operatortypes(void) { } -void sound_keymap(struct wmKeyConfig *UNUSED(keyconf)) +static void sound_keymap(struct wmKeyConfig *UNUSED(keyconf)) { } diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 75001b9514c..e9e98a9f7bf 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -42,6 +42,7 @@ #include "BKE_context.h" #include "BKE_screen.h" +#include "ED_space_api.h" #include "ED_screen.h" #include "BIF_gl.h" diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 6f9ad138bac..bc0eb0a773f 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -250,7 +250,7 @@ static int find_bool(char *string) /* Ensures the format string for the given line is long enough, reallocating as needed. Allocation is done here, alone, to ensure consistency. */ -int text_check_format_len(TextLine *line, unsigned int len) +static int text_check_format_len(TextLine *line, unsigned int len) { if(line->format) { if(strlen(line->format) < len) { @@ -954,7 +954,7 @@ void text_free_caches(SpaceText *st) /************************ word-wrap utilities *****************************/ /* cache should be updated in caller */ -int text_get_visible_lines_no(SpaceText *st, int lineno) +static int text_get_visible_lines_no(SpaceText *st, int lineno) { DrawCache *drawcache= (DrawCache *)st->drawcache; diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index 1287f68dc04..3b04b056f4e 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -70,7 +70,7 @@ /************************** properties ******************************/ -ARegion *text_has_properties_region(ScrArea *sa) +static ARegion *text_has_properties_region(ScrArea *sa) { ARegion *ar, *arnew; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index bfec734dad6..3d862030e40 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -52,6 +52,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_text.h" #include "ED_curve.h" #include "ED_screen.h" #include "UI_interface.h" @@ -2008,7 +2009,7 @@ static void screen_skip(SpaceText *st, ARegion *ar, int lines) } /* quick enum for tsc->zone (scroller handles) */ -enum { +static enum { SCROLLHANDLE_BAR, SCROLLHANDLE_MIN_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index e6f201e4147..a0d3264aa0d 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -187,7 +187,7 @@ static void confirm_suggestion(Text *text, int skipleft) // XXX static int doc_scroll= 0; -short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) +static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) { ARegion *ar= NULL; // XXX int qual= 0; // XXX @@ -370,7 +370,7 @@ short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val) ; // XXX redraw_alltext(); #endif -short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) +static short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) { Text *text; TextMarker *marker, *mrk, *nxt; diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index f05cb860d6f..f879b2b996d 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -56,6 +56,7 @@ #include "UI_resources.h" #include "UI_view2d.h" +#include "ED_space_api.h" #include "ED_markers.h" #include "time_intern.h" diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index 5bc59f06a19..167eabcdd08 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -41,6 +41,8 @@ #include "WM_api.h" #include "WM_types.h" +#include "time_intern.h" + /* ****************** Start/End Frame Operators *******************************/ static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op)) @@ -67,7 +69,7 @@ static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void TIME_OT_start_frame_set (wmOperatorType *ot) +static void TIME_OT_start_frame_set (wmOperatorType *ot) { /* identifiers */ ot->name= "Set Start Frame"; @@ -107,7 +109,7 @@ static int time_set_efra_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void TIME_OT_end_frame_set (wmOperatorType *ot) +static void TIME_OT_end_frame_set (wmOperatorType *ot) { /* identifiers */ ot->name= "Set End Frame"; @@ -149,7 +151,7 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void TIME_OT_view_all (wmOperatorType *ot) +static void TIME_OT_view_all (wmOperatorType *ot) { /* identifiers */ ot->name= "View All"; diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c index 6f155fc3b99..486713ab890 100644 --- a/source/blender/editors/space_userpref/space_userpref.c +++ b/source/blender/editors/space_userpref/space_userpref.c @@ -39,6 +39,7 @@ #include "BKE_screen.h" #include "ED_screen.h" +#include "ED_space_api.h" #include "WM_api.h" #include "WM_types.h" @@ -107,11 +108,11 @@ static void userpref_main_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, 1, NULL, -1); } -void userpref_operatortypes(void) +static void userpref_operatortypes(void) { } -void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf)) +static void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf)) { } diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 5c2adc10d85..59d9d1bb0b4 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -562,7 +562,7 @@ static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmoot return 1; } -void draw_mesh_text(Scene *scene, Object *ob, int glsl) +static void draw_mesh_text(Scene *scene, Object *ob, int glsl) { Mesh *me = ob->data; DerivedMesh *ddm; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index c90c301b6d1..321f68a157f 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5306,7 +5306,7 @@ static void draw_box(float vec[8][3]) } /* uses boundbox, function used by Ketsji */ -void get_local_bounds(Object *ob, float *center, float *size) +static void get_local_bounds(Object *ob, float *center, float *size) { BoundBox *bb= object_get_boundbox(ob); diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index d7c81fc624f..72ba3269246 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2202,7 +2202,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td) /* ************************** WARP *************************** */ -void postInputWarp(TransInfo *t, float values[3]) +static void postInputWarp(TransInfo *t, float values[3]) { mul_v3_fl(values, (float)(M_PI * 2)); @@ -2371,7 +2371,7 @@ int Warp(TransInfo *t, short UNUSED(mval[2])) /* ************************** SHEAR *************************** */ -void postInputShear(TransInfo *UNUSED(t), float values[3]) +static void postInputShear(TransInfo *UNUSED(t), float values[3]) { mul_v3_fl(values, 0.05f); } @@ -2857,7 +2857,7 @@ int ToSphere(TransInfo *t, short UNUSED(mval[2])) /* ************************** ROTATION *************************** */ -void postInputRotation(TransInfo *t, float values[3]) +static void postInputRotation(TransInfo *t, float values[3]) { if ((t->con.mode & CON_APPLY) && t->con.applyRot) { t->con.applyRot(t, NULL, t->axis, values); @@ -5890,7 +5890,7 @@ void BIF_TransformSetUndo(char *UNUSED(str)) } -void NDofTransform(void) +static void NDofTransform(void) { #if 0 // TRANSFORM_FIX_ME float fval[7]; diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index d5700db8c57..23899398921 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -69,7 +69,7 @@ static void drawObjectConstraint(TransInfo *t); /* ************************** CONSTRAINTS ************************* */ -void constraintAutoValues(TransInfo *t, float vec[3]) +static void constraintAutoValues(TransInfo *t, float vec[3]) { int mode = t->con.mode; if (mode & CON_APPLY) diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index bbadce5369d..de80c0a0423 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1359,7 +1359,7 @@ static void calc_distanceCurveVerts(TransData *head, TransData *tail) { } /* Utility function for getting the handle data from bezier's */ -TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, struct BezTriple *bezt) { +static TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, struct BezTriple *bezt) { TransDataCurveHandleFlags *hdata; td->flag |= TD_BEZTRIPLE; hdata = td->hdata = MEM_mallocN(sizeof(TransDataCurveHandleFlags), "CuHandle Data"); @@ -1941,7 +1941,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert } } -void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head *td) { +static void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head *td) { BME_Vert *v; BME_TransData *vtd; TransData *tob; @@ -5106,7 +5106,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node) unit_m3(td->smtx); } -void createTransNodeData(bContext *C, TransInfo *t) +static void createTransNodeData(bContext *C, TransInfo *t) { TransData *td; TransData2D *td2d; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 85a7526b7b4..8f7c1001fe8 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1318,7 +1318,7 @@ void calculateCenterCursor2D(TransInfo *t) calculateCenter2D(t); } -void calculateCenterCursorGraph2D(TransInfo *t) +static void calculateCenterCursorGraph2D(TransInfo *t) { SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first; Scene *scene= t->scene; diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index a06e5ab21e6..6a9f89362f1 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -38,7 +38,7 @@ /* ************************** INPUT FROM MOUSE *************************** */ -void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +static void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float vec[3], dvec[3]; if(mi->precision) @@ -56,7 +56,7 @@ void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) } -void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { float ratio, precise_ratio, dx, dy; if(mi->precision) @@ -82,7 +82,7 @@ void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float outp output[0] = ratio; } -void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +static void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { InputSpring(t, mi, mval, output); @@ -94,7 +94,7 @@ void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3 } } -void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { if(mi->precision) @@ -112,7 +112,7 @@ void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float o output[1] *= mi->factor; } -void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float x, pad; pad = t->ar->winx / 10; @@ -129,7 +129,7 @@ void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float out output[0] = (x - pad) / (t->ar->winx - 2 * pad); } -void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float vec[3]; InputVector(t, mi, mval, vec); @@ -138,7 +138,7 @@ void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[0] = dot_v3v3(t->viewinv[0], vec) * 2.0f; } -void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float y, pad; pad = t->ar->winy / 10; @@ -154,7 +154,7 @@ void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float outpu output[0] = (y - pad) / (t->ar->winy - 2 * pad); } -void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float vec[3]; InputVector(t, mi, mval, vec); @@ -179,7 +179,7 @@ void setCustomPoints(TransInfo *UNUSED(t), MouseInput *mi, short start[2], short data[3] = end[1]; } -void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { float length; float distance; @@ -212,7 +212,7 @@ void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float } } -void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { double dx2 = mval[0] - mi->center[0]; double dy2 = mval[1] - mi->center[1]; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index d69ba22585b..49080b86e87 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -546,7 +546,7 @@ int calc_manipulator_stats(const bContext *C) } /* don't draw axis perpendicular to the view */ -void test_manipulator_axis(const bContext *C) +static void test_manipulator_axis(const bContext *C) { RegionView3D *rv3d= CTX_wm_region_view3d(C); float angle; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 82cec1eec42..5c42a59ac69 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -54,20 +54,20 @@ typedef struct TransformModeItem static float VecOne[3] = {1, 1, 1}; -char OP_TRANSLATION[] = "TRANSFORM_OT_translate"; -char OP_ROTATION[] = "TRANSFORM_OT_rotate"; -char OP_TOSPHERE[] = "TRANSFORM_OT_tosphere"; -char OP_RESIZE[] = "TRANSFORM_OT_resize"; -char OP_SHEAR[] = "TRANSFORM_OT_shear"; -char OP_WARP[] = "TRANSFORM_OT_warp"; -char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten"; -char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull"; -char OP_TILT[] = "TRANSFORM_OT_tilt"; -char OP_TRACKBALL[] = "TRANSFORM_OT_trackball"; -char OP_MIRROR[] = "TRANSFORM_OT_mirror"; -char OP_EDGE_SLIDE[] = "TRANSFORM_OT_edge_slide"; -char OP_EDGE_CREASE[] = "TRANSFORM_OT_edge_crease"; -char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide"; +static char OP_TRANSLATION[] = "TRANSFORM_OT_translate"; +static char OP_ROTATION[] = "TRANSFORM_OT_rotate"; +static char OP_TOSPHERE[] = "TRANSFORM_OT_tosphere"; +static char OP_RESIZE[] = "TRANSFORM_OT_resize"; +static char OP_SHEAR[] = "TRANSFORM_OT_shear"; +static char OP_WARP[] = "TRANSFORM_OT_warp"; +static char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten"; +static char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull"; +static char OP_TILT[] = "TRANSFORM_OT_tilt"; +static char OP_TRACKBALL[] = "TRANSFORM_OT_trackball"; +static char OP_MIRROR[] = "TRANSFORM_OT_mirror"; +static char OP_EDGE_SLIDE[] = "TRANSFORM_OT_edge_slide"; +static char OP_EDGE_CREASE[] = "TRANSFORM_OT_edge_crease"; +static char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide"; void TRANSFORM_OT_translate(struct wmOperatorType *ot); void TRANSFORM_OT_rotate(struct wmOperatorType *ot); @@ -84,7 +84,7 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot); void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot); void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot); -TransformModeItem transform_modes[] = +static TransformModeItem transform_modes[] = { {OP_TRANSLATION, TFM_TRANSLATION, TRANSFORM_OT_translate}, {OP_ROTATION, TFM_ROTATION, TRANSFORM_OT_rotate}, @@ -114,7 +114,7 @@ static int snap_type_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void TRANSFORM_OT_snap_type(wmOperatorType *ot) +static void TRANSFORM_OT_snap_type(wmOperatorType *ot) { /* identifiers */ ot->name= "Snap Type"; @@ -159,7 +159,7 @@ static int select_orientation_invoke(bContext *C, wmOperator *UNUSED(op), wmEven return OPERATOR_CANCELLED; } -void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) { PropertyRNA *prop; @@ -214,7 +214,7 @@ static int delete_orientation_poll(bContext *C) return selected_index >= 0; } -void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Orientation"; @@ -249,7 +249,7 @@ static int create_orientation_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE return create_orientation_exec(C, op); } -void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) { /* identifiers */ ot->name = "Create Orientation"; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 93403ea5817..cf84e02b8ae 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -356,7 +356,7 @@ int validSnappingNormal(TransInfo *t) return 0; } -void initSnappingMode(TransInfo *t) +static void initSnappingMode(TransInfo *t) { ToolSettings *ts = t->settings; Object *obedit = t->obedit; @@ -1021,7 +1021,7 @@ void TargetSnapClosest(TransInfo *t) } /*================================================================*/ -int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4co, float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) +static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4co, float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) { float lambda; int result; @@ -1072,7 +1072,7 @@ int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4 return retval; } -int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) +static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) { float intersect[3] = {0, 0, 0}, ray_end[3], dvec[3]; int result; @@ -1157,7 +1157,7 @@ int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2n return retval; } -int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) +static int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) { int retval = 0; float dvec[3]; @@ -1201,7 +1201,7 @@ int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray return retval; } -int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *UNUSED(no), int *dist, float *depth) +static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *UNUSED(no), int *dist, float *depth) { float imat[4][4]; float ray_start_local[3], ray_normal_local[3]; @@ -1266,7 +1266,7 @@ int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float return retval; } -int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, EditMesh *em, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) +static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, EditMesh *em, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) { int retval = 0; int totvert = dm->getNumVerts(dm); @@ -1534,7 +1534,7 @@ int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, E return retval; } -int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) +static int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) { ToolSettings *ts= scene->toolsettings; int retval = 0; @@ -1567,7 +1567,7 @@ int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obma return retval; } -int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) { +static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) { Base *base; float depth = FLT_MAX; int retval = 0; @@ -1636,7 +1636,7 @@ int snapObjectsContext(bContext *C, float mval[2], int *dist, float *loc, float /******************** PEELING *********************************/ -int cmpPeel(void *arg1, void *arg2) +static int cmpPeel(void *arg1, void *arg2) { DepthPeel *p1 = arg1; DepthPeel *p2 = arg2; @@ -1654,7 +1654,7 @@ int cmpPeel(void *arg1, void *arg2) return val; } -void removeDoublesPeel(ListBase *depth_peels) +static void removeDoublesPeel(ListBase *depth_peels) { DepthPeel *peel; @@ -1676,7 +1676,7 @@ void removeDoublesPeel(ListBase *depth_peels) } } -void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], Object *ob) +static void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], Object *ob) { DepthPeel *peel = MEM_callocN(sizeof(DepthPeel), "DepthPeel"); @@ -1690,7 +1690,7 @@ void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], O peel->flag = 0; } -int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float UNUSED(mval[2]), ListBase *depth_peels) +static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float UNUSED(mval[2]), ListBase *depth_peels) { int retval = 0; int totvert = dm->getNumVerts(dm); @@ -1798,7 +1798,7 @@ int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta return retval; } -int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, float mval[2]) +static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, float mval[2]) { Base *base; int retval = 0; diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index 7617e1d2066..20b7c255922 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -43,6 +43,8 @@ #include "BLI_math.h" #include "BLI_editVert.h" +#include "ED_util.h" + #define TAN_MAKE_VEC(a, b, c) a[0]= b[0] + 0.2f*(b[0]-c[0]); a[1]= b[1] + 0.2f*(b[1]-c[1]); a[2]= b[2] + 0.2f*(b[2]-c[2]) static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3, float *def1, float *def2, float *def3) { diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 85f343e3311..767a2adacb2 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -46,11 +46,14 @@ #include "BKE_depsgraph.h" #include "BKE_global.h" +#include "ED_util.h" #include "ED_mesh.h" #include "UI_interface.h" #include "UI_resources.h" +#include "util_intern.h" + /* ***************** generic editmode undo system ********************* */ /* @@ -75,7 +78,7 @@ void undo_editmode_menu(void) // history menu /* ********************************************************************* */ /* ****** XXX ***** */ -void error(const char *UNUSED(arg)) {} +static void error(const char *UNUSED(arg)) {} /* ****** XXX ***** */ diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 0158719b2fb..a992e33e7d6 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -257,6 +257,7 @@ static int ed_redo_exec(bContext *C, wmOperator *UNUSED(op)) return ed_undo_step(C, -1, NULL); } +#if 0 /* UNUSED */ void ED_undo_menu(bContext *C) { Object *obedit= CTX_data_edit_object(C); @@ -281,6 +282,7 @@ void ED_undo_menu(bContext *C) } } } +#endif /* ********************** */ diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 98c71407631..1cee7a16b98 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -46,6 +46,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" +#include "ED_util.h" #include "ED_image.h" #include "ED_mesh.h" #include "ED_uvedit.h" diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 0d3e9b94f98..a00a3c59626 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -403,7 +403,7 @@ int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float return sel; } -int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mode) +static int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mode) { EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data); EditFace *efa; @@ -1032,7 +1032,7 @@ static int align_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_align(wmOperatorType *ot) +static void UV_OT_align(wmOperatorType *ot) { static EnumPropertyItem axis_items[] = { {'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already"}, @@ -1063,7 +1063,7 @@ static int weld_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void UV_OT_weld(wmOperatorType *ot) +static void UV_OT_weld(wmOperatorType *ot) { /* identifiers */ ot->name= "Weld"; @@ -1247,7 +1247,7 @@ static int stitch_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_stitch(wmOperatorType *ot) +static void UV_OT_stitch(wmOperatorType *ot) { /* identifiers */ ot->name= "Stitch"; @@ -1304,7 +1304,7 @@ static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void UV_OT_select_inverse(wmOperatorType *ot) +static void UV_OT_select_inverse(wmOperatorType *ot) { /* identifiers */ ot->name= "Select Inverse"; @@ -1400,7 +1400,7 @@ static int select_all_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_select_all(wmOperatorType *ot) +static void UV_OT_select_all(wmOperatorType *ot) { /* identifiers */ ot->name= "Select or Deselect All"; @@ -1735,7 +1735,7 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event) return select_exec(C, op); } -void UV_OT_select(wmOperatorType *ot) +static void UV_OT_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Select"; @@ -1784,7 +1784,7 @@ static int select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) return select_loop_exec(C, op); } -void UV_OT_select_loop(wmOperatorType *ot) +static void UV_OT_select_loop(wmOperatorType *ot) { /* identifiers */ ot->name= "Loop Select"; @@ -1865,7 +1865,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) return select_linked_internal(C, op, NULL, 0); } -void UV_OT_select_linked(wmOperatorType *ot) +static void UV_OT_select_linked(wmOperatorType *ot) { /* identifiers */ ot->name= "Select Linked"; @@ -1892,7 +1892,7 @@ static int select_linked_pick_exec(bContext *C, wmOperator *op) return select_linked_internal(C, op, NULL, 1); } -void UV_OT_select_linked_pick(wmOperatorType *ot) +static void UV_OT_select_linked_pick(wmOperatorType *ot) { /* identifiers */ ot->name= "Select Linked Pick"; @@ -1949,7 +1949,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_unlink_selection(wmOperatorType *ot) +static void UV_OT_unlink_selection(wmOperatorType *ot) { /* identifiers */ ot->name= "Unlink Selection"; @@ -2230,7 +2230,7 @@ static int border_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -void UV_OT_select_border(wmOperatorType *ot) +static void UV_OT_select_border(wmOperatorType *ot) { /* identifiers */ ot->name= "Border Select"; @@ -2271,7 +2271,7 @@ static void select_uv_inside_ellipse(Scene *scene, int select, EditFace *efa, MT } } -int circle_select_exec(bContext *C, wmOperator *op) +static int circle_select_exec(bContext *C, wmOperator *op) { SpaceImage *sima= CTX_wm_space_image(C); Scene *scene= CTX_data_scene(C); @@ -2319,7 +2319,7 @@ int circle_select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_circle_select(wmOperatorType *ot) +static void UV_OT_circle_select(wmOperatorType *ot) { /* identifiers */ ot->name= "Circle Select"; @@ -2389,7 +2389,7 @@ static int snap_cursor_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_snap_cursor(wmOperatorType *ot) +static void UV_OT_snap_cursor(wmOperatorType *ot) { static EnumPropertyItem target_items[] = { {0, "PIXELS", 0, "Pixels", ""}, @@ -2629,7 +2629,7 @@ static int snap_selection_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_snap_selection(wmOperatorType *ot) +static void UV_OT_snap_selection(wmOperatorType *ot) { static EnumPropertyItem target_items[] = { {0, "PIXELS", 0, "Pixels", ""}, @@ -2690,7 +2690,7 @@ static int pin_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_pin(wmOperatorType *ot) +static void UV_OT_pin(wmOperatorType *ot) { /* identifiers */ ot->name= "Pin"; @@ -2736,7 +2736,7 @@ static int select_pinned_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void UV_OT_select_pinned(wmOperatorType *ot) +static void UV_OT_select_pinned(wmOperatorType *ot) { /* identifiers */ ot->name= "Selected Pinned"; @@ -2875,7 +2875,7 @@ static int hide_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void UV_OT_hide(wmOperatorType *ot) +static void UV_OT_hide(wmOperatorType *ot) { /* identifiers */ ot->name= "Hide Selected"; @@ -3009,7 +3009,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -void UV_OT_reveal(wmOperatorType *ot) +static void UV_OT_reveal(wmOperatorType *ot) { /* identifiers */ ot->name= "Reveal Hidden"; @@ -3055,7 +3055,7 @@ static int set_2d_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) return set_2d_cursor_exec(C, op); } -void UV_OT_cursor_set(wmOperatorType *ot) +static void UV_OT_cursor_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set 2D Cursor"; @@ -3123,7 +3123,7 @@ static int set_tile_invoke(bContext *C, wmOperator *op, wmEvent *event) return set_tile_exec(C, op); } -void UV_OT_tile_set(wmOperatorType *ot) +static void UV_OT_tile_set(wmOperatorType *ot) { /* identifiers */ ot->name= "Set Tile"; diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 09069be6d5f..3b6581b7893 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -129,7 +129,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) /****************** Parametrizer Conversion ***************/ -ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit, short fill, short sel, short correct_aspect) +static ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit, short fill, short sel, short correct_aspect) { ParamHandle *handle; EditFace *efa; diff --git a/source/blender/python/generic/mathutils_Euler.c b/source/blender/python/generic/mathutils_Euler.c index c42387f77fb..dd48df63e25 100644 --- a/source/blender/python/generic/mathutils_Euler.c +++ b/source/blender/python/generic/mathutils_Euler.c @@ -243,9 +243,6 @@ static char Euler_make_compatible_doc[] = "\n" " Make this euler compatible with another, so interpolating between them works as intended.\n" "\n" -" :arg other: make compatible with this rotation.\n" -" :type other: :class:`Euler`\n" -"\n" " .. note:: the rotation order is not taken into account for this function.\n" ; static PyObject *Euler_make_compatible(EulerObject * self, PyObject *value) diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index e3118ecd057..ea461a4675e 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5356,7 +5356,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun if(strcmp(identifier, rna_attr) == 0) { \ item= PyObject_GetAttrString(py_class, py_attr); \ if(item && item != Py_None) { \ - if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class error:") != 0) { \ + if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class:") != 0) { \ Py_DECREF(item); \ return -1; \ } \ @@ -5380,7 +5380,7 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun else { Py_DECREF(item); /* no need to keep a ref, the class owns it */ - if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class error:") != 0) + if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class:") != 0) return -1; } } diff --git a/source/creator/creator.c b/source/creator/creator.c index 2fdf920506e..bf797d69c18 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1275,7 +1275,7 @@ int main(int argc, char **argv) return 0; } /* end of int main(argc,argv) */ -static void error_cb(char *err) +static void error_cb(const char *err) { printf("%s\n", err); /* XXX do this in WM too */