- remove deprecated pose channel members
authorCampbell Barton <ideasman42@gmail.com>
Fri, 16 Sep 2011 02:42:50 +0000 (02:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 16 Sep 2011 02:42:50 +0000 (02:42 +0000)
- change short -> char for flags that support it.
- add pose 'temp' pointer to use for outliner drawing (was using 'prev' and restoring which seems dodjy)

doc/python_api/sphinx_doc_gen.py
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/makesdna/DNA_action_types.h
source/gameengine/Converter/BL_ArmatureObject.cpp

index dec4a7a..91248c0 100644 (file)
@@ -621,7 +621,7 @@ def pycontext2sphinx(BASEPATH):
     file.close()
 
 
-def pyrna_enum2sphinx(prop, use_empty_descriptions=True):
+def pyrna_enum2sphinx(prop, use_empty_descriptions=False):
     """ write a bullet point list of enum + descrptons
     """
 
index 9c24675..f75773d 100644 (file)
@@ -524,7 +524,6 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
                if (copycon) {
                        copy_constraints(&listb, &pchan->constraints, TRUE);  // copy_constraints NULLs listb
                        pchan->constraints= listb;
-                       pchan->path= NULL; // XXX remove this line when the new motionpaths are ready... (depreceated code)
                        pchan->mpath= NULL; /* motion paths should not get copied yet... */
                }
                
@@ -595,17 +594,12 @@ void free_pose_channels_hash(bPose *pose)
 
 void free_pose_channel(bPoseChannel *pchan)
 {
-       // XXX this case here will need to be removed when the new motionpaths are ready
-       if (pchan->path) {
-               MEM_freeN(pchan->path);
-               pchan->path= NULL;
-       }
-       
+
        if (pchan->mpath) {
                animviz_free_motionpath(pchan->mpath);
                pchan->mpath= NULL;
        }
-       
+
        free_constraints(&pchan->constraints);
        
        if (pchan->prop) {
index 62ce184..08a9547 100644 (file)
@@ -1483,7 +1483,6 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
                        pchanw.next= pchan->next;
                        pchanw.parent= pchan->parent;
                        pchanw.child= pchan->child;
-                       pchanw.path= NULL;
                        
                        /* this is freed so copy a copy, else undo crashes */
                        if(pchanw.prop) {
index 8364f04..d0c3437 100644 (file)
@@ -3967,7 +3967,6 @@ static void direct_link_pose(FileData *fd, bPose *pose)
                        direct_link_motionpath(fd, pchan->mpath);
                
                pchan->iktree.first= pchan->iktree.last= NULL;
-               pchan->path= NULL;
                
                /* incase this value changes in future, clamp else we get undefined behavior */
                CLAMP(pchan->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
index 60b6a0d..fc87578 100644 (file)
@@ -473,7 +473,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
                                ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
                                ten->name= pchan->name;
                                ten->directdata= pchan;
-                               pchan->prev= (bPoseChannel *)ten;
+                               pchan->temp= (void *)ten;
                                
                                if(pchan->constraints.first) {
                                        //Object *target;
@@ -506,19 +506,13 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
                                        pchan= (bPoseChannel *)ten->directdata;
                                        if(pchan->parent) {
                                                BLI_remlink(&tenla->subtree, ten);
-                                               par= (TreeElement *)pchan->parent->prev;
+                                               par= (TreeElement *)pchan->parent->temp;
                                                BLI_addtail(&par->subtree, ten);
                                                ten->parent= par;
                                        }
                                }
                                ten= nten;
                        }
-                       /* restore prev pointers */
-                       pchan= ob->pose->chanbase.first;
-                       if(pchan) pchan->prev= NULL;
-                       for(; pchan; pchan= pchan->next) {
-                               if(pchan->next) pchan->next->prev= pchan;
-                       }
                }
                
                /* Pose Groups */
index a820e59..492dd34 100644 (file)
@@ -188,18 +188,13 @@ typedef struct bPoseChannel {
        char                            name[32];       /* Channels need longer names than normal blender objects */
        
        short                           flag;           /* dynamic, for detecting transform changes */
-       short                           constflag;  /* for quick detecting which constraints affect this channel */
        short                           ikflag;         /* settings for IK bones */
-       short               selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
        short                           protectflag; /* protect channels from being transformed */
        short                           agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */
-       
-// XXX depreceated.... old animation system (armature only viz) ----
-       int                                 pathlen;    /* for drawing paths, the amount of frames */
-       int                             pathsf;         /* for drawing paths, the start frame number */
-       int                                     pathef;         /* for drawing paths, the end frame number */
-// XXX end of depreceated code -------------------------------------
-       
+       char                            constflag;  /* for quick detecting which constraints affect this channel */
+       char                selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
+       char                            pad0[6];
+
        struct Bone                     *bone;          /* set on read file or rebuild pose */
        struct bPoseChannel *parent;    /* set on read file or rebuild pose */
        struct bPoseChannel *child;             /* set on read file or rebuild pose, the 'ik' child, for b-bones */
@@ -233,7 +228,7 @@ typedef struct bPoseChannel {
        float           ikrotweight;            /* weight of joint rotation constraint */
        float           iklinweight;            /* weight of joint stretch constraint */
 
-       float           *path;                          /* totpath x 3 x float */               // XXX depreceated... old animation system (armature only viz)
+       void            *temp;                          /* use for outliner */
 } bPoseChannel;
 
 
index 684bd3f..c5bf28b 100644 (file)
@@ -110,7 +110,6 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
        for (pchan=(bPoseChannel*)out->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) {
                pchan->parent= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->parent);
                pchan->child= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->child);
-               pchan->path= NULL;
 
                if (copy_constraint) {
                        ListBase listb;