diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 5ee8210d256..5945be51aac 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -492,8 +492,9 @@ static void mesh_edges_nearest_point(void *userdata, int index, const float *co, t0 = vert[ edge->v1 ].co; t1 = vert[ edge->v2 ].co; - closest_to_line_segment_v3(nearest_tmp, co, t0, t1); - dist = len_v3v3(nearest_tmp, co); + // NOTE: casts to "float*" here are due to co being "const float*" + closest_to_line_segment_v3(nearest_tmp, (float*)co, t0, t1); + dist = len_v3v3(nearest_tmp, (float*)co); if(dist < nearest->dist) { diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 3d995d7b6e8..2ea54ac1f03 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -726,6 +726,7 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap return collpair; } +#if 0 static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end ) { int result = 0; @@ -834,6 +835,7 @@ static int cloth_collision_response_moving( ClothModifierData *clmd, CollisionMo } return result; } +#endif static float projectPointOntoLine(float *p, float *a, float *b) { @@ -1065,6 +1067,7 @@ static float edgedge_distance(float np11[3], float np12[3], float np21[3], float return 0; } +#if 0 static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair ) { EdgeCollPair edgecollpair; @@ -1292,6 +1295,7 @@ static int cloth_collision_moving ( ClothModifierData *clmd, CollisionModifierDa return 1; } +#endif // return all collision objects in scene diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 073b4e80ae7..f2b737fa3c2 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -297,6 +297,7 @@ DO_INLINE void sub_lfvector_lfvector(float (*to)[3], float (*fLongVectorA)[3], f /////////////////////////// // 3x3 matrix /////////////////////////// +#if 0 /* printf 3x3 matrix on console: for debug output */ static void print_fmatrix(float m3[3][3]) { @@ -304,6 +305,7 @@ static void print_fmatrix(float m3[3][3]) printf("%f\t%f\t%f\n",m3[1][0],m3[1][1],m3[1][2]); printf("%f\t%f\t%f\n\n",m3[2][0],m3[2][1],m3[2][2]); } +#endif /* copy 3x3 matrix */ DO_INLINE void cp_fmatrix(float to[3][3], float from[3][3]) @@ -972,6 +974,7 @@ DO_INLINE void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv) } } +#if 0 /* // version 1.3 static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S, fmatrix3x3 *P, fmatrix3x3 *Pinv) @@ -1143,6 +1146,7 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector return iterationsblock, k, t, 0); - + if(flag==0) - ; /* do_key(a, a+step, tot, (char *)out, key, k, t, 0); */ + do_key(a, a+step, tot, (char *)out, key, actkb, k, t, 0); else - ; /* cp_key(a, a+step, tot, (char *)out, key, k[2],0); */ + cp_key(a, a+step, tot, (char *)out, key, actkb, k[2], NULL, 0); } } else { diff --git a/source/blender/blenkernel/intern/sequence.c b/source/blender/blenkernel/intern/sequence.c index 1ab085f5fa8..a986e9d7a94 100644 --- a/source/blender/blenkernel/intern/sequence.c +++ b/source/blender/blenkernel/intern/sequence.c @@ -63,8 +63,8 @@ /* **** XXX ******** */ static int seqrectx= 0; /* bad bad global! */ static int seqrecty= 0; -static void waitcursor(int val) {} -static int blender_test_break() {return 0;} +//static void waitcursor(int val) {} +//static int blender_test_break() {return 0;} /* **** XXX ******** */ @@ -1230,6 +1230,7 @@ static struct ImBuf * seq_proxy_fetch(Scene *scene, Sequence * seq, int cfra, in } } +#if 0 static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int cfra, int build_proxy_run, int render_size); @@ -1360,6 +1361,7 @@ static void seq_proxy_rebuild(Scene *scene, Sequence * seq) } waitcursor(0); } +#endif /* ********************************************************************** @@ -2631,6 +2633,7 @@ ImBuf *give_ibuf_seq(Scene *scene, int rectx, int recty, int cfra, int chanshown return i; } +#if 0 /* check used when we need to change seq->blend_mode but not to effect or audio strips */ static int seq_can_blend(Sequence *seq) { @@ -2640,6 +2643,7 @@ static int seq_can_blend(Sequence *seq) return 0; } } +#endif /* *********************** threading api ******************* */ @@ -2651,8 +2655,8 @@ static pthread_mutex_t queue_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t wakeup_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t wakeup_cond = PTHREAD_COND_INITIALIZER; -static pthread_mutex_t prefetch_ready_lock = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t prefetch_ready_cond = PTHREAD_COND_INITIALIZER; +//static pthread_mutex_t prefetch_ready_lock = PTHREAD_MUTEX_INITIALIZER; +//static pthread_cond_t prefetch_ready_cond = PTHREAD_COND_INITIALIZER; static pthread_mutex_t frame_done_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t frame_done_cond = PTHREAD_COND_INITIALIZER; @@ -2685,6 +2689,7 @@ typedef struct PrefetchQueueElem { struct ImBuf * ibuf; } PrefetchQueueElem; +#if 0 static void *seq_prefetch_thread(void * This_) { PrefetchThread * This = This_; @@ -2833,6 +2838,7 @@ static void seq_stop_threads() /* deinit malloc mutex */ BLI_end_threads(0); } +#endif void give_ibuf_prefetch_request(int rectx, int recty, int cfra, int chanshown, int render_size) @@ -2859,6 +2865,7 @@ void give_ibuf_prefetch_request(int rectx, int recty, int cfra, int chanshown, pthread_mutex_unlock(&wakeup_lock); } +#if 0 static void seq_wait_for_prefetch_ready() { PrefetchThread *tslot; @@ -2887,6 +2894,7 @@ static void seq_wait_for_prefetch_ready() fprintf(stderr, "SEQ-THREAD: prefetch done\n"); } +#endif ImBuf *give_ibuf_seq_threaded(Scene *scene, int rectx, int recty, int cfra, int chanshown, int render_size) { @@ -2993,6 +3001,7 @@ static void free_anim_seq(Sequence *seq) } } +#if 0 static void free_imbuf_seq_except(Scene *scene, int cfra) { Editing *ed= seq_give_editing(scene, FALSE); @@ -3042,6 +3051,7 @@ static void free_imbuf_seq_except(Scene *scene, int cfra) } SEQ_END } +#endif void free_imbuf_seq(ListBase * seqbase, int check_mem_usage) { @@ -3187,6 +3197,7 @@ void free_imbuf_seq() } #endif +#if 0 // XXX old animation system static void free_imbuf_seq_with_ipo(Scene *scene, struct Ipo *ipo) { /* force update of all sequences with this ipo, on ipo changes */ @@ -3206,6 +3217,7 @@ static void free_imbuf_seq_with_ipo(Scene *scene, struct Ipo *ipo) } SEQ_END } +#endif /* seq funcs's for transforming internally notice the difference between start/end and left/right. diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 0a68ad6e803..34071b0034c 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -593,7 +593,7 @@ static void add_mesh_quad_diag_springs(Object *ob) if (ob->soft){ int nofquads; - float s_shear = ob->soft->shearstiff*ob->soft->shearstiff; + //float s_shear = ob->soft->shearstiff*ob->soft->shearstiff; nofquads = count_mesh_quads(me); if (nofquads) { diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 75eb9b3bb28..3f4b9fbae25 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -332,10 +332,12 @@ static void sort(BVHNode **a0, int begin, int end, int axis) bvh_insertionsort(a, begin, end, axis); } } +#if 0 static void sort_along_axis(BVHTree *tree, int start, int end, int axis) { sort(tree->nodes, start, end, axis); } +#endif //after a call to this function you can expect one of: // every node to left of a[n] are smaller or equal to it @@ -1532,6 +1534,7 @@ static void dfs_raycast(BVHRayCastData *data, BVHNode *node) } } +#if 0 static void iterative_raycast(BVHRayCastData *data, BVHNode *node) { while(node) @@ -1562,6 +1565,7 @@ static void iterative_raycast(BVHRayCastData *data, BVHNode *node) } } } +#endif int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float radius, BVHTreeRayHit *hit, BVHTree_RayCastCallback callback, void *userdata) { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index b164b2aa404..1fa9090ba45 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -10485,6 +10485,9 @@ static void expand_nodetree(FileData *fd, Main *mainvar, bNodeTree *ntree) if(ntree->adt) expand_animdata(fd, mainvar, ntree->adt); + + if(ntree->gpd) + expand_doit(fd, mainvar, ntree->gpd); for(node= ntree->nodes.first; node; node= node->next) if(node->id && node->type!=CMP_NODE_R_LAYERS) diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 111f0df6d3d..dbf5eb1d0ea 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -110,7 +110,7 @@ static void id_search_cb(const bContext *C, void *arg_template, char *str, uiSea } /* ID Search browse menu, open */ -static uiBlock *search_menu(bContext *C, ARegion *ar, void *arg_litem) +static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) { static char search[256]; static TemplateID template; @@ -262,7 +262,7 @@ static void template_ID(bContext *C, uiBlock *block, TemplateID *template, Struc type= idptr.type; if(flag & UI_ID_BROWSE) { - but= uiDefBlockButN(block, search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, "Browse ID data"); + but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, "Browse ID data"); if(type) { but->icon= RNA_struct_ui_icon(type); but->flag|= UI_HAS_ICON; @@ -448,6 +448,8 @@ void uiTemplateAnyID(uiLayout *layout, bContext *C, PointerRNA *ptr, char *propn /********************* RNA Path Builder Template ********************/ +/* ---------- */ + /* This is creating/editing RNA-Paths * * - ptr: struct which holds the path property diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 88a67c25478..7e403e965d7 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -1666,7 +1666,6 @@ static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int round { uiWidgetBase wtb; float rad= 0.5f*(rect->ymax - rect->ymin); - int textoffs; widget_init(&wtb); diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index a44b59d1377..041ccd6641a 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2717,4 +2717,5 @@ void SEQUENCER_OT_rendersize(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ -} \ No newline at end of file +} + diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index e808d70da33..9ce77f751c0 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -190,7 +190,6 @@ static void pointdensity_cache_object(Render *re, PointDensity *pd, Object *ob) int i; DerivedMesh *dm; MVert *mvert = NULL; - float cam_mat[4][4]; dm = mesh_create_derived_render(re->scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL); mvert= dm->getVertArray(dm); /* local object space */ diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index 4ec30721274..e9162b7367f 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -175,6 +175,7 @@ static void lightcache_filter(VolumePrecache *vp) } } +#if 0 static void lightcache_filter2(VolumePrecache *vp) { int x, y, z; @@ -211,6 +212,7 @@ static void lightcache_filter2(VolumePrecache *vp) if (new_g) { MEM_freeN(new_g); new_g=NULL; } if (new_b) { MEM_freeN(new_b); new_b=NULL; } } +#endif static inline int ms_I(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation {