Revision: 18551
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18551
Author:   ton
Date:     2009-01-17 15:56:12 +0100 (Sat, 17 Jan 2009)

Log Message:
-----------
2.5

Cleanup warnings from Joshua's commit (mostly unused variables,
but also used functions that were not prototyped).

Two bugfixes; passing on &ob->adt instead of ob->adt

But; the DNA system is now messed up, with two structs using
the same ID (nAction and bAction), that goes horrible wrong!

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/blenkernel/BKE_ipo.h
    branches/blender2.5/blender/source/blender/blenkernel/intern/action.c
    branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c
    branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
    branches/blender2.5/blender/source/blender/blenkernel/intern/particle.c
    
branches/blender2.5/blender/source/blender/blenkernel/intern/particle_system.c
    branches/blender2.5/blender/source/blender/blenlib/BLI_dynamiclist.h
    branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c
    branches/blender2.5/blender/source/blender/editors/armature/poselib.c
    branches/blender2.5/blender/source/blender/editors/armature/poseobject.c
    
branches/blender2.5/blender/source/blender/editors/space_action/action_edit.c
    branches/blender2.5/blender/source/blender/editors/space_ipo/ipo_draw.c
    
branches/blender2.5/blender/source/blender/editors/space_view3d/drawarmature.c

Modified: branches/blender2.5/blender/source/blender/blenkernel/BKE_ipo.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/BKE_ipo.h     
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenkernel/BKE_ipo.h     
2009-01-17 14:56:12 UTC (rev 18551)
@@ -35,6 +35,12 @@
 extern "C" {
 #endif
 
+       
+/* -------- IPO-Curve (Bezier) Calculations ---------- */
+
+void correct_bezpart(float *v1, float *v2, float *v3, float *v4);
+       
+       
 #if 0 // XXX old animation system
 
 typedef struct CfraElem {

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/action.c       
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/action.c       
2009-01-17 14:56:12 UTC (rev 18551)
@@ -95,7 +95,7 @@
 // does copy_fcurve...
 void make_local_action(nAction *act)
 {
-       Object *ob;
+       // Object *ob;
        nAction *actn;
        int local=0, lib=0;
        
@@ -149,15 +149,15 @@
 
 void free_action (nAction *act)
 {
-       FCurve *fcu, *fcn;
+       FCurve *fcu;
        
        /* sanity check */
        if (act == NULL)
                return;
        
        /* Free F-Curves */
-       for (fcu= act->curves.first; fcu; fcu= fcn) {
-               fcn= fcu->next;
+       while ((fcu= act->curves.first)) {
+               BLI_remlink(&act->curves, fcu);
                free_fcurve(fcu);
        }
        
@@ -174,7 +174,7 @@
 {
        nAction *dst = NULL;
        //bActionChannel *dchan, *schan;
-       bActionGroup *dgrp, *sgrp;
+       // bActionGroup *dgrp, *sgrp;
        
        if (!src) return NULL;
        
@@ -573,7 +573,7 @@
 /* Calculate the extents of given action */
 void calc_action_range(const bAction *act, float *start, float *end, int 
incl_hidden)
 {
-       FCurve *fcu;
+       // FCurve *fcu;
        float min=999999999.0f, max=-999999999.0f;
        int     foundvert=0;
 

Modified: 
branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c    
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/depsgraph.c    
2009-01-17 14:56:12 UTC (rev 18551)
@@ -1953,9 +1953,9 @@
        return 0;
 }
 
+#if 0 // XXX old animation system
 static int exists_channel(Object *ob, char *name)
 {
-#if 0 // XXX old animation system
        bActionStrip *strip;
        
        if(ob->action)
@@ -1965,16 +1965,18 @@
        for (strip=ob->nlastrips.first; strip; strip=strip->next)
                if(get_action_channel(strip->act, name))
                        return 1;
-#endif // XXX old animation system
 
        return 0;
 }
+#endif // XXX old animation system
 
 
 static short animdata_use_time(AnimData *adt)
 {
        NlaTrack *nlt;
        
+       if(adt==NULL) return 0;
+       
        /* check action - only if assigned, and it has anim curves */
        if (adt->action && adt->action->curves.first)
                return 1;
@@ -2038,7 +2040,7 @@
                }
        }
 #endif // XXX old animation system
-       if(animdata_use_time(&ob->adt)) ob->recalc |= OB_RECALC;
+       if(animdata_use_time(ob->adt)) ob->recalc |= OB_RECALC;
        
        if(object_modifiers_use_time(ob)) ob->recalc |= OB_RECALC_DATA;
        if((ob->pose) && (ob->pose->flag & POSE_CONSTRAINTS_TIMEDEPEND)) 
ob->recalc |= OB_RECALC_DATA;

Modified: branches/blender2.5/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/object.c       
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/object.c       
2009-01-17 14:56:12 UTC (rev 18551)
@@ -1867,7 +1867,7 @@
 #endif // XXX old animation system
 
        /* execute drivers only, as animation has already been done */
-       BKE_animsys_evaluate_animdata(&ob->id, &ob->adt, ctime, 
ADT_RECALC_DRIVERS);
+       BKE_animsys_evaluate_animdata(&ob->id, ob->adt, ctime, 
ADT_RECALC_DRIVERS);
        
        if(ob->parent) {
                Object *par= ob->parent;

Modified: 
branches/blender2.5/blender/source/blender/blenkernel/intern/particle.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/intern/particle.c     
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenkernel/intern/particle.c     
2009-01-17 14:56:12 UTC (rev 18551)
@@ -3300,7 +3300,7 @@
 float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float 
cfra, float *pa_time)
 {
        ParticleSettings *part = psys->part;
-       float size, time;
+       float size; // time XXX
        
        if(part->childtype==PART_CHILD_FACES){
                size=part->size;

Modified: 
branches/blender2.5/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/blenkernel/intern/particle_system.c  
    2009-01-17 13:54:56 UTC (rev 18550)
+++ 
branches/blender2.5/blender/source/blender/blenkernel/intern/particle_system.c  
    2009-01-17 14:56:12 UTC (rev 18551)
@@ -4215,7 +4215,7 @@
        IpoCurve *icu_esize= NULL; //=find_ipocurve(part->ipo,PART_EMIT_SIZE); 
// XXX old animation system
        Material *ma=give_current_material(ob,part->omat);
        int p;
-       float ipotime=cfra, disp, birthtime, dietime, *vg_size= NULL;
+       float disp, birthtime, dietime, *vg_size= NULL; // XXX ipotime=cfra
 
        if(part->from!=PART_FROM_PARTICLE)
                vg_size= psys_cache_vgroup(psmd->dm,psys,PSYS_VG_SIZE);

Modified: branches/blender2.5/blender/source/blender/blenlib/BLI_dynamiclist.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/BLI_dynamiclist.h        
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenlib/BLI_dynamiclist.h        
2009-01-17 14:56:12 UTC (rev 18551)
@@ -50,15 +50,16 @@
        struct ListBase lb;             /* two way linked dynamic list */
 } DynamicList;
 
-struct DynamicList *BLI_dlist_from_listbase(struct ListBase *lb);
-struct ListBase *BLI_listbase_from_dlist(struct DynamicList *dlist, struct 
ListBase *lb);
-void * BLI_dlist_find_link(struct DynamicList *dlist, unsigned int index);
-unsigned int BLI_count_items(struct DynamicList *dlist);
-void BLI_dlist_free_item(struct DynamicList *dlist, unsigned int index);
-void BLI_dlist_rem_item(struct DynamicList *dlist, unsigned int index);
-void * BLI_dlist_add_item_index(struct DynamicList *dlist, void *item, 
unsigned int index);
-void BLI_dlist_destroy(struct DynamicList *dlist);
-void BLI_dlist_init(struct DynamicList *dlist);
-void BLI_dlist_reinit(struct DynamicList *dlist);
+/* note: 'index' is a string.h function, do not use in includes */
+struct DynamicList *BLI_dlist_from_listbase(struct ListBase *);
+struct ListBase *BLI_listbase_from_dlist(struct DynamicList *, struct ListBase 
*);
+void * BLI_dlist_find_link(struct DynamicList *, unsigned int);
+unsigned int BLI_count_items(struct DynamicList *);
+void BLI_dlist_free_item(struct DynamicList *, unsigned int);
+void BLI_dlist_rem_item(struct DynamicList *, unsigned int);
+void * BLI_dlist_add_item_index(struct DynamicList *, void *, unsigned int);
+void BLI_dlist_destroy(struct DynamicList *);
+void BLI_dlist_init(struct DynamicList *);
+void BLI_dlist_reinit(struct DynamicList *);
 
 #endif

Modified: branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c 
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/blenlib/intern/fileops.c 
2009-01-17 14:56:12 UTC (rev 18551)
@@ -31,16 +31,13 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "zlib.h"
 
 #ifdef WIN32
 #include "BLI_winstuff.h"
 #include <io.h>
 #else
+#include <unistd.h> // for read close
 #include <sys/param.h>
 #endif
 

Modified: branches/blender2.5/blender/source/blender/editors/armature/poselib.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/poselib.c       
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/editors/armature/poselib.c       
2009-01-17 14:56:12 UTC (rev 18551)
@@ -193,7 +193,8 @@
        /* init object's poselib action (unlink old one if there) */
        if (ob->poselib)
                ob->poselib->id.us--;
-       ob->poselib= add_empty_action("PoseLib");
+       // XXX old anim stuff
+       // ob->poselib= add_empty_action("PoseLib");
        
        return ob->poselib;
 }
@@ -272,11 +273,11 @@
 }
 
 /* ************************************************************* */
+#if 0 // XXX old animation system
 
 /* This function adds an ipo-curve of the right type where it's needed */
 static IpoCurve *poselib_verify_icu (Ipo *ipo, int adrcode)
 {
-#if 0 // XXX old animation system
        IpoCurve *icu;
        
        for (icu= ipo->curve.first; icu; icu= icu->next) {
@@ -297,9 +298,8 @@
        }
        
        return icu;
+}
 #endif // XXX old animation system
-       return NULL;
-}
 
 /* This tool adds the current pose to the poselib 
  *     Note: Standard insertkey cannot be used for this due to its limitations
@@ -311,8 +311,8 @@
        bPoseChannel *pchan;
        TimeMarker *marker;
        bAction *act;
-       bActionChannel *achan;
-       IpoCurve *icu;
+       // bActionChannel *achan;
+       // IpoCurve *icu;
        int frame;
        char name[64];
        
@@ -430,7 +430,7 @@
 {
        bPose *pose= (ob) ? ob->pose : NULL;
        bAction *act= (ob) ? ob->poselib : NULL;
-       bActionChannel *achan;
+       // bActionChannel *achan;
        char *menustr;
        int val;
        

Modified: 
branches/blender2.5/blender/source/blender/editors/armature/poseobject.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/poseobject.c    
2009-01-17 13:54:56 UTC (rev 18550)
+++ branches/blender2.5/blender/source/blender/editors/armature/poseobject.c    
2009-01-17 14:56:12 UTC (rev 18551)
@@ -86,7 +86,6 @@
 static void countall() {}
 static void add_constraint() {}
 static void select_actionchannel_by_name() {}
-static int autokeyframe_cfra_can_key() {return 0;}
 static void autokeyframe_pose_cb_func() {}
 /* ************* XXX *************** */
 
@@ -1423,7 +1422,8 @@
        }
 }
 
-
+#if 0
+// XXX old sys
 /* for use with pose_relax only */
 static int pose_relax_icu(struct IpoCurve *icu, float framef, float *val, 
float *frame_prev, float *frame_next)
 {
@@ -1479,6 +1479,7 @@
                return 1;
        }
 }
+#endif
 
 void pose_relax(Scene *scene)
 {
@@ -1487,19 +1488,19 @@
        bAction *act;

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to